lib/api/research/research_models/account.go

296 lines
6.8 KiB
Go

// 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 research_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
AccountNumber string `json:"AccountNumber,omitempty"`
// The marketing orgin of this account
AccountSource string `json:"AccountSource,omitempty"`
// Annual Revenue Estimate
AnnualRevenue float64 `json:"AnnualRevenue,omitempty"`
// billing address
BillingAddress *Address `json:"BillingAddress,omitempty"`
// Contact ID
BillingContactID string `json:"BillingContactID,omitempty"`
// Date company closed
CloseDate string `json:"CloseDate,omitempty"`
// cloud revenue total
CloudRevenueTotal float64 `json:"CloudRevenueTotal,omitempty"`
// cloud type
CloudType string `json:"CloudType,omitempty"`
// cloud year
CloudYear string `json:"CloudYear,omitempty"`
// Created By User ID
CreatedByID string `json:"CreatedByID,omitempty"`
// Created Date
CreatedDate string `json:"CreatedDate,omitempty"`
// crunchbase URL
CrunchbaseURL string `json:"CrunchbaseURL,omitempty"`
// Description
Description string `json:"Description,omitempty"`
// earnings call
EarningsCall string `json:"EarningsCall,omitempty"`
// Main Account Email
Email string `json:"Email,omitempty"`
// equity funding
EquityFunding float64 `json:"EquityFunding,omitempty"`
// facebook
Facebook string `json:"Facebook,omitempty"`
// Fax
Fax string `json:"Fax,omitempty"`
// founded date
FoundedDate string `json:"FoundedDate,omitempty"`
// Taxnexus Account Id
ID string `json:"ID,omitempty"`
// IP o date
IPODate string `json:"IPODate,omitempty"`
// industries
Industries string `json:"Industries,omitempty"`
// Industry
Industry string `json:"Industry,omitempty"`
// Last Modified By User ID
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
// Last Modified Date
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
// linked in
LinkedIn string `json:"LinkedIn,omitempty"`
// location
Location string `json:"Location,omitempty"`
// market capitalization
MarketCapitalization float64 `json:"MarketCapitalization,omitempty"`
// Account Name
Name string `json:"Name,omitempty"`
// Number of Locations Estimate
NumberInvestments int64 `json:"NumberInvestments,omitempty"`
// Employee Count Estimate
NumberOfEmployees int64 `json:"NumberOfEmployees,omitempty"`
// Account Owner User ID
OwnerID string `json:"OwnerID,omitempty"`
// Ownership
Ownership string `json:"Ownership,omitempty"`
// Parent Account
ParentID string `json:"ParentID,omitempty"`
// Phone
Phone string `json:"Phone,omitempty"`
// publish
Publish bool `json:"Publish,omitempty"`
// SIC Code
SIC string `json:"SIC,omitempty"`
// SIC Description
SICDesc string `json:"SICDesc,omitempty"`
// salesforce first
SalesforceFirst bool `json:"SalesforceFirst,omitempty"`
// shipping address
ShippingAddress *Address `json:"ShippingAddress,omitempty"`
// shipping contact ID
ShippingContactID string `json:"ShippingContactID,omitempty"`
// Account Site
Site string `json:"Site,omitempty"`
// tag line
TagLine string `json:"TagLine,omitempty"`
// tenant identifier
TenantID string `json:"TenantID,omitempty"`
// ticker symbol
TickerSymbol string `json:"TickerSymbol,omitempty"`
// twitter
Twitter string `json:"Twitter,omitempty"`
// Type
Type string `json:"Type,omitempty"`
// Website
Website string `json:"Website,omitempty"`
// Year Started
YearStarted string `json:"YearStarted,omitempty"`
}
// Validate validates this account
func (m *Account) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateBillingAddress(formats); err != nil {
res = append(res, err)
}
if err := m.validateShippingAddress(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Account) validateBillingAddress(formats strfmt.Registry) error {
if swag.IsZero(m.BillingAddress) { // not required
return nil
}
if m.BillingAddress != nil {
if err := m.BillingAddress.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("BillingAddress")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("BillingAddress")
}
return err
}
}
return nil
}
func (m *Account) validateShippingAddress(formats strfmt.Registry) error {
if swag.IsZero(m.ShippingAddress) { // not required
return nil
}
if m.ShippingAddress != nil {
if err := m.ShippingAddress.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ShippingAddress")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ShippingAddress")
}
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
if err := m.contextValidateBillingAddress(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateShippingAddress(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Account) contextValidateBillingAddress(ctx context.Context, formats strfmt.Registry) error {
if m.BillingAddress != nil {
if err := m.BillingAddress.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("BillingAddress")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("BillingAddress")
}
return err
}
}
return nil
}
func (m *Account) contextValidateShippingAddress(ctx context.Context, formats strfmt.Registry) error {
if m.ShippingAddress != nil {
if err := m.ShippingAddress.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ShippingAddress")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ShippingAddress")
}
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
}