lib/api/sfgate/sfgate_models/account.go

314 lines
7.3 KiB
Go
Raw Permalink Normal View History

2021-08-05 19:37:53 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package sfgate_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// Account account
//
// swagger:model Account
type Account struct {
// Account Number
2022-09-05 00:01:32 +00:00
AccountNumber string `json:"AccountNumber,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// The marketing origin of this account
2022-09-05 00:01:32 +00:00
AccountSource string `json:"AccountSource,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// active
Active bool `json:"Active,omitempty"`
2021-08-05 19:37:53 +00:00
// Annual Revenue Estimate
2022-09-05 00:01:32 +00:00
AnnualRevenue float64 `json:"AnnualRevenue,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// billing address
BillingAddress *Address `json:"BillingAddress,omitempty"`
2021-08-05 19:37:53 +00:00
// Contact ID
2022-09-05 00:01:32 +00:00
BillingContactID string `json:"BillingContactID,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Close Date
2022-09-05 00:01:32 +00:00
CloseDate string `json:"CloseDate,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// cloud revenue total
CloudRevenueTotal float64 `json:"CloudRevenueTotal,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// The type of cloud company
2022-09-05 00:01:32 +00:00
CloudType string `json:"CloudType,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// The year company started cloud revenue
2022-09-05 00:01:32 +00:00
CloudYear string `json:"CloudYear,omitempty"`
2021-08-05 19:37:53 +00:00
// Created By User ID
2022-09-05 00:01:32 +00:00
CreatedByID string `json:"CreatedByID,omitempty"`
2021-08-05 19:37:53 +00:00
// Created Date
2022-09-05 00:01:32 +00:00
CreatedDate string `json:"CreatedDate,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Crunchbase URL
2022-09-05 00:01:32 +00:00
CrunchbaseURL string `json:"CrunchbaseURL,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Description of the account
2022-09-05 00:01:32 +00:00
Description string `json:"Description,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// e i n
EIN string `json:"EIN,omitempty"`
// Earnings Call Date
2022-09-05 00:01:32 +00:00
EarningsCall string `json:"EarningsCall,omitempty"`
2021-08-05 19:37:53 +00:00
// Main Account Email
2022-09-05 00:01:32 +00:00
Email string `json:"Email,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// The amount of equity EquityFunding
2022-09-05 00:01:32 +00:00
EquityFunding float64 `json:"EquityFunding,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Company Facebook URL
2022-09-05 00:01:32 +00:00
Facebook string `json:"Facebook,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Fax number
2022-09-05 00:01:32 +00:00
Fax string `json:"Fax,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Date company founded
2022-09-05 00:01:32 +00:00
FoundedDate string `json:"FoundedDate,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// Taxnexus Account Id
ID string `json:"ID,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// IPO Date
2022-09-05 00:01:32 +00:00
IPODate string `json:"IPODate,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// image alt text
ImageAltText string `json:"ImageAltText,omitempty"`
// image URL
ImageURL string `json:"ImageURL,omitempty"`
// Industries
2022-09-05 00:01:32 +00:00
Industries string `json:"Industries,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// Industry
Industry string `json:"Industry,omitempty"`
2021-08-05 19:37:53 +00:00
// Last Modified By User ID
2022-09-05 00:01:32 +00:00
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
2021-08-05 19:37:53 +00:00
// Last Modified Date
2022-09-05 00:01:32 +00:00
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Company LinkedIn URL
2022-09-05 00:01:32 +00:00
LinkedIn string `json:"LinkedIn,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Headquarters Location Description
2022-09-05 00:01:32 +00:00
Location string `json:"Location,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Company Logo URL
2022-09-05 00:22:53 +00:00
Logo string `json:"Logo,omitempty"`
2023-03-28 17:47:34 +00:00
// Market Capitalization
2022-09-05 00:01:32 +00:00
MarketCapitalization float64 `json:"MarketCapitalization,omitempty"`
2021-08-05 19:37:53 +00:00
// Account Name
2022-09-05 00:01:32 +00:00
Name string `json:"Name,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Number of Investments
NumberInvestments float64 `json:"NumberInvestments,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// Employee Count Estimate
NumberOfEmployees int64 `json:"NumberOfEmployees,omitempty"`
2021-08-05 19:37:53 +00:00
// Account Owner User ID
2022-09-05 00:01:32 +00:00
OwnerID string `json:"OwnerID,omitempty"`
2021-08-05 19:37:53 +00:00
// Ownership
2022-09-05 00:01:32 +00:00
Ownership string `json:"Ownership,omitempty"`
2021-08-05 19:37:53 +00:00
// Parent Account
2022-09-05 00:01:32 +00:00
ParentID string `json:"ParentID,omitempty"`
2021-08-05 19:37:53 +00:00
// Phone
2022-09-05 00:01:32 +00:00
Phone string `json:"Phone,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Publish this record?
2022-09-05 00:01:32 +00:00
Publish bool `json:"Publish,omitempty"`
2021-08-05 19:37:53 +00:00
// SIC Code
2022-09-05 00:01:32 +00:00
SIC string `json:"SIC,omitempty"`
2021-08-05 19:37:53 +00:00
// SIC Description
2022-09-05 00:01:32 +00:00
SICDesc string `json:"SICDesc,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// A Salesforce-First company?
2022-09-05 00:01:32 +00:00
SalesforceFirst bool `json:"SalesforceFirst,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// shipping address
ShippingAddress *Address `json:"ShippingAddress,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Shipping Contact ID
2022-09-05 00:01:32 +00:00
ShippingContactID string `json:"ShippingContactID,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// Account Site
Site string `json:"Site,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Slug
Slug string `json:"Slug,omitempty"`
// Company tagline
2022-09-05 00:01:32 +00:00
TagLine string `json:"TagLine,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Tenant Identifier
2022-09-05 00:01:32 +00:00
TenantID string `json:"TenantID,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Ticker Symbol
2022-09-05 00:01:32 +00:00
TickerSymbol string `json:"TickerSymbol,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Twitter URL
2022-09-05 00:01:32 +00:00
Twitter string `json:"Twitter,omitempty"`
2021-08-05 19:37:53 +00:00
// Type
2022-09-05 00:01:32 +00:00
Type string `json:"Type,omitempty"`
2021-08-05 19:37:53 +00:00
// Website
2022-09-05 00:01:32 +00:00
Website string `json:"Website,omitempty"`
2021-08-05 19:37:53 +00:00
// Year Started
2022-09-05 00:01:32 +00:00
YearStarted string `json:"YearStarted,omitempty"`
2021-08-05 19:37:53 +00:00
}
// Validate validates this account
func (m *Account) Validate(formats strfmt.Registry) error {
var res []error
2022-09-05 00:01:32 +00:00
if err := m.validateBillingAddress(formats); err != nil {
2021-08-05 19:37:53 +00:00
res = append(res, err)
}
2022-09-05 00:01:32 +00:00
if err := m.validateShippingAddress(formats); err != nil {
2021-08-05 19:37:53 +00:00
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
2022-09-05 00:01:32 +00:00
func (m *Account) validateBillingAddress(formats strfmt.Registry) error {
if swag.IsZero(m.BillingAddress) { // not required
2021-08-05 19:37:53 +00:00
return nil
}
2022-09-05 00:01:32 +00:00
if m.BillingAddress != nil {
if err := m.BillingAddress.Validate(formats); err != nil {
2021-08-05 19:37:53 +00:00
if ve, ok := err.(*errors.Validation); ok {
2022-09-05 00:01:32 +00:00
return ve.ValidateName("BillingAddress")
2022-05-28 19:45:41 +00:00
} else if ce, ok := err.(*errors.CompositeError); ok {
2022-09-05 00:01:32 +00:00
return ce.ValidateName("BillingAddress")
2021-08-05 19:37:53 +00:00
}
return err
}
}
return nil
}
2022-09-05 00:01:32 +00:00
func (m *Account) validateShippingAddress(formats strfmt.Registry) error {
if swag.IsZero(m.ShippingAddress) { // not required
2021-08-05 19:37:53 +00:00
return nil
}
2022-09-05 00:01:32 +00:00
if m.ShippingAddress != nil {
if err := m.ShippingAddress.Validate(formats); err != nil {
2021-08-05 19:37:53 +00:00
if ve, ok := err.(*errors.Validation); ok {
2022-09-05 00:01:32 +00:00
return ve.ValidateName("ShippingAddress")
2022-05-28 19:45:41 +00:00
} else if ce, ok := err.(*errors.CompositeError); ok {
2022-09-05 00:01:32 +00:00
return ce.ValidateName("ShippingAddress")
2021-08-05 19:37:53 +00:00
}
return err
}
}
return nil
}
// ContextValidate validate this account based on the context it is used
func (m *Account) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
2022-09-05 00:01:32 +00:00
if err := m.contextValidateBillingAddress(ctx, formats); err != nil {
2021-08-05 19:37:53 +00:00
res = append(res, err)
}
2022-09-05 00:01:32 +00:00
if err := m.contextValidateShippingAddress(ctx, formats); err != nil {
2021-08-05 19:37:53 +00:00
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
2022-09-05 00:01:32 +00:00
func (m *Account) contextValidateBillingAddress(ctx context.Context, formats strfmt.Registry) error {
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
if m.BillingAddress != nil {
if err := m.BillingAddress.ContextValidate(ctx, formats); err != nil {
2021-08-05 19:37:53 +00:00
if ve, ok := err.(*errors.Validation); ok {
2022-09-05 00:01:32 +00:00
return ve.ValidateName("BillingAddress")
2022-05-28 19:45:41 +00:00
} else if ce, ok := err.(*errors.CompositeError); ok {
2022-09-05 00:01:32 +00:00
return ce.ValidateName("BillingAddress")
2021-08-05 19:37:53 +00:00
}
return err
}
}
return nil
}
2022-09-05 00:01:32 +00:00
func (m *Account) contextValidateShippingAddress(ctx context.Context, formats strfmt.Registry) error {
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
if m.ShippingAddress != nil {
if err := m.ShippingAddress.ContextValidate(ctx, formats); err != nil {
2021-08-05 19:37:53 +00:00
if ve, ok := err.(*errors.Validation); ok {
2022-09-05 00:01:32 +00:00
return ve.ValidateName("ShippingAddress")
2022-05-28 19:45:41 +00:00
} else if ce, ok := err.(*errors.CompositeError); ok {
2022-09-05 00:01:32 +00:00
return ce.ValidateName("ShippingAddress")
2021-08-05 19:37:53 +00:00
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *Account) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Account) UnmarshalBinary(b []byte) error {
var res Account
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}