lib/api/sfgate/sfgate_models/account.go

317 lines
7.4 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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
AccountSource *string `json:"AccountSource,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// active
2023-04-15 14:27:18 +00:00
Active *bool `json:"Active,omitempty"`
2023-03-28 17:47:34 +00:00
2021-08-05 19:37:53 +00:00
// Annual Revenue Estimate
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
BillingContactID *string `json:"BillingContactID,omitempty"`
2021-08-05 19:37:53 +00:00
2023-04-15 14:27:18 +00:00
// Closed Date
ClosedDate *string `json:"ClosedDate,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// cloud revenue total
2023-04-15 14:27:18 +00:00
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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
CloudYear *string `json:"CloudYear,omitempty"`
2021-08-05 19:37:53 +00:00
// Created By User ID
2023-04-15 14:27:18 +00:00
CreatedByID *string `json:"CreatedByID,omitempty"`
2021-08-05 19:37:53 +00:00
// Created Date
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
EIN *string `json:"EIN,omitempty"`
2023-03-28 17:47:34 +00:00
// Earnings Call Date
2023-04-15 14:27:18 +00:00
EarningsCall *string `json:"EarningsCall,omitempty"`
2021-08-05 19:37:53 +00:00
// Main Account Email
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
FoundedDate *string `json:"FoundedDate,omitempty"`
2021-08-05 19:37:53 +00:00
// Full Description
FullDescription *string `json:"FullDescription,omitempty"`
2023-04-15 14:27:18 +00:00
// Account Id
2022-09-05 00:01:32 +00:00
ID string `json:"ID,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// IPO Date
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
ImageAltText *string `json:"ImageAltText,omitempty"`
2023-03-28 17:47:34 +00:00
// image URL
2023-04-15 14:27:18 +00:00
ImageURL *string `json:"ImageURL,omitempty"`
2023-03-28 17:47:34 +00:00
// Industries
2023-04-15 14:27:18 +00:00
Industries *string `json:"Industries,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// Industry
2023-04-15 14:27:18 +00:00
Industry *string `json:"Industry,omitempty"`
2021-08-05 19:37:53 +00:00
// Last Modified By User ID
2023-04-15 14:27:18 +00:00
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
2021-08-05 19:37:53 +00:00
// Last Modified Date
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
Logo *string `json:"Logo,omitempty"`
2022-09-05 00:22:53 +00:00
2023-03-28 17:47:34 +00:00
// Market Capitalization
2023-04-15 14:27:18 +00:00
MarketCapitalization *float64 `json:"MarketCapitalization,omitempty"`
2021-08-05 19:37:53 +00:00
// Account Name
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
NumberInvestments *float64 `json:"NumberInvestments,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// Employee Count Estimate
2023-04-15 14:27:18 +00:00
NumberOfEmployees *int64 `json:"NumberOfEmployees,omitempty"`
2021-08-05 19:37:53 +00:00
// Account Owner User ID
2023-04-15 14:27:18 +00:00
OwnerID *string `json:"OwnerID,omitempty"`
2021-08-05 19:37:53 +00:00
// Ownership
2023-04-15 14:27:18 +00:00
Ownership *string `json:"Ownership,omitempty"`
2021-08-05 19:37:53 +00:00
// Parent Account
2023-04-15 14:27:18 +00:00
ParentID *string `json:"ParentID,omitempty"`
2021-08-05 19:37:53 +00:00
// Phone
2023-04-15 14:27:18 +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?
2023-04-15 14:27:18 +00:00
Publish *bool `json:"Publish,omitempty"`
2021-08-05 19:37:53 +00:00
// SIC Code
2023-04-15 14:27:18 +00:00
SIC *string `json:"SIC,omitempty"`
2021-08-05 19:37:53 +00:00
// SIC Description
2023-04-15 14:27:18 +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?
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
Site *string `json:"Site,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Slug
2023-04-15 14:27:18 +00:00
Slug *string `json:"Slug,omitempty"`
2023-03-28 17:47:34 +00:00
// Company tagline
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +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
2023-04-15 14:27:18 +00:00
Twitter *string `json:"Twitter,omitempty"`
2021-08-05 19:37:53 +00:00
// Type
2023-04-15 14:27:18 +00:00
Type *string `json:"Type,omitempty"`
2021-08-05 19:37:53 +00:00
// Website
2023-04-15 14:27:18 +00:00
Website *string `json:"Website,omitempty"`
2021-08-05 19:37:53 +00:00
// Year Started
2023-04-15 14:27:18 +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
}