lib/api/research/research_models/account.go

296 lines
6.8 KiB
Go
Raw Normal View History

2021-08-14 22:34:08 +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 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
2022-09-05 00:01:32 +00:00
AccountNumber string `json:"AccountNumber,omitempty"`
2021-08-14 22:34:08 +00:00
// The marketing orgin of this account
2022-09-05 00:01:32 +00:00
AccountSource string `json:"AccountSource,omitempty"`
2021-08-14 22:34:08 +00:00
// Annual Revenue Estimate
2022-09-05 00:01:32 +00:00
AnnualRevenue float64 `json:"AnnualRevenue,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// billing address
BillingAddress *Address `json:"BillingAddress,omitempty"`
2021-08-14 22:34:08 +00:00
// Contact ID
2022-09-05 00:01:32 +00:00
BillingContactID string `json:"BillingContactID,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// Date company closed
CloseDate string `json:"CloseDate,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// cloud revenue total
CloudRevenueTotal float64 `json:"CloudRevenueTotal,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// cloud type
CloudType string `json:"CloudType,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// cloud year
CloudYear string `json:"CloudYear,omitempty"`
2021-08-14 22:34:08 +00:00
// Created By User ID
2022-09-05 00:01:32 +00:00
CreatedByID string `json:"CreatedByID,omitempty"`
2021-08-14 22:34:08 +00:00
// Created Date
2022-09-05 00:01:32 +00:00
CreatedDate string `json:"CreatedDate,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// crunchbase URL
CrunchbaseURL string `json:"CrunchbaseURL,omitempty"`
2021-08-14 22:34:08 +00:00
// Description
2022-09-05 00:01:32 +00:00
Description string `json:"Description,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// earnings call
EarningsCall string `json:"EarningsCall,omitempty"`
2021-08-14 22:34:08 +00:00
// Main Account Email
2022-09-05 00:01:32 +00:00
Email string `json:"Email,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// equity funding
EquityFunding float64 `json:"EquityFunding,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// facebook
Facebook string `json:"Facebook,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// Fax
Fax string `json:"Fax,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// founded date
FoundedDate string `json:"FoundedDate,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// Taxnexus Account Id
ID string `json:"ID,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// IP o date
IPODate string `json:"IPODate,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// industries
Industries string `json:"Industries,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// Industry
Industry string `json:"Industry,omitempty"`
2021-08-14 22:34:08 +00:00
// Last Modified By User ID
2022-09-05 00:01:32 +00:00
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
2021-08-14 22:34:08 +00:00
// Last Modified Date
2022-09-05 00:01:32 +00:00
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// linked in
LinkedIn string `json:"LinkedIn,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// location
Location string `json:"Location,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// market capitalization
MarketCapitalization float64 `json:"MarketCapitalization,omitempty"`
2021-08-14 22:34:08 +00:00
// Account Name
2022-09-05 00:01:32 +00:00
Name string `json:"Name,omitempty"`
2021-08-14 22:34:08 +00:00
// Number of Locations Estimate
2022-09-05 00:01:32 +00:00
NumberInvestments int64 `json:"NumberInvestments,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// Employee Count Estimate
NumberOfEmployees int64 `json:"NumberOfEmployees,omitempty"`
2021-08-14 22:34:08 +00:00
// Account Owner User ID
2022-09-05 00:01:32 +00:00
OwnerID string `json:"OwnerID,omitempty"`
2021-08-14 22:34:08 +00:00
// Ownership
2022-09-05 00:01:32 +00:00
Ownership string `json:"Ownership,omitempty"`
2021-08-14 22:34:08 +00:00
// Parent Account
2022-09-05 00:01:32 +00:00
ParentID string `json:"ParentID,omitempty"`
2021-08-14 22:34:08 +00:00
// Phone
2022-09-05 00:01:32 +00:00
Phone string `json:"Phone,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// publish
Publish bool `json:"Publish,omitempty"`
2021-08-14 22:34:08 +00:00
// SIC Code
2022-09-05 00:01:32 +00:00
SIC string `json:"SIC,omitempty"`
2021-08-14 22:34:08 +00:00
// SIC Description
2022-09-05 00:01:32 +00:00
SICDesc string `json:"SICDesc,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// salesforce first
SalesforceFirst bool `json:"SalesforceFirst,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// shipping address
ShippingAddress *Address `json:"ShippingAddress,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// shipping contact ID
ShippingContactID string `json:"ShippingContactID,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// Account Site
Site string `json:"Site,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// tag line
TagLine string `json:"TagLine,omitempty"`
2021-08-14 22:34:08 +00:00
// tenant identifier
2022-09-05 00:01:32 +00:00
TenantID string `json:"TenantID,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// ticker symbol
TickerSymbol string `json:"TickerSymbol,omitempty"`
2021-08-14 22:34:08 +00:00
2022-09-05 00:01:32 +00:00
// twitter
Twitter string `json:"Twitter,omitempty"`
2021-08-14 22:34:08 +00:00
// Type
2022-09-05 00:01:32 +00:00
Type string `json:"Type,omitempty"`
2021-08-14 22:34:08 +00:00
// Website
2022-09-05 00:01:32 +00:00
Website string `json:"Website,omitempty"`
2021-08-14 22:34:08 +00:00
// Year Started
2022-09-05 00:01:32 +00:00
YearStarted string `json:"YearStarted,omitempty"`
2021-08-14 22:34:08 +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-14 22:34:08 +00:00
res = append(res, err)
}
2022-09-05 00:01:32 +00:00
if err := m.validateShippingAddress(formats); err != nil {
2021-08-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +00:00
res = append(res, err)
}
2022-09-05 00:01:32 +00:00
if err := m.contextValidateShippingAddress(ctx, formats); err != nil {
2021-08-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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-14 22:34:08 +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
}