lib/api/sfgate/sfgate_models/contact.go

275 lines
6.4 KiB
Go
Raw 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"
)
// Contact contact
//
// swagger:model Contact
type Contact struct {
// The primary account ID of this contact
2023-04-15 14:27:18 +00:00
AccountID *string `json:"AccountID,omitempty"`
2021-08-05 19:37:53 +00:00
// Assistant Name
2023-04-15 14:27:18 +00:00
AssistantName *string `json:"AssistantName,omitempty"`
2021-08-05 19:37:53 +00:00
// Asst. Phone
2023-04-15 14:27:18 +00:00
AssistantPhone *string `json:"AssistantPhone,omitempty"`
2021-08-05 19:37:53 +00:00
// Birthdate
2023-04-15 14:27:18 +00:00
BirthDate *string `json:"BirthDate,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"`
2023-03-28 17:47:34 +00:00
2021-08-05 19:37:53 +00:00
// Department
2023-04-15 14:27:18 +00:00
Department *string `json:"Department,omitempty"`
2021-08-05 19:37:53 +00:00
// Description
2023-04-15 14:27:18 +00:00
Description *string `json:"Description,omitempty"`
2021-08-05 19:37:53 +00:00
// Do Not Call?
2023-04-15 14:27:18 +00:00
DoNotCall *bool `json:"DoNotCall,omitempty"`
2021-08-05 19:37:53 +00:00
// Email address
2023-04-15 14:27:18 +00:00
Email *string `json:"Email,omitempty"`
2021-08-05 19:37:53 +00:00
// Email Bounce Date
2023-04-15 14:27:18 +00:00
EmailBounceDate *string `json:"EmailBounceDate,omitempty"`
2021-08-05 19:37:53 +00:00
// Email Bounce Reason
2023-04-15 14:27:18 +00:00
EmailBounceReason *string `json:"EmailBounceReason,omitempty"`
2021-08-05 19:37:53 +00:00
// Fax Number
2023-04-15 14:27:18 +00:00
Facebook *string `json:"Facebook,omitempty"`
2022-09-05 00:01:32 +00:00
// fax
2023-04-15 14:27:18 +00:00
Fax *string `json:"Fax,omitempty"`
2021-08-05 19:37:53 +00:00
// First Name
2023-04-15 14:27:18 +00:00
FirstName *string `json:"FirstName,omitempty"`
2021-08-05 19:37:53 +00:00
// Email Opt Out
2023-04-15 14:27:18 +00:00
HasOptedOutOfEmail *bool `json:"HasOptedOutOfEmail,omitempty"`
2021-08-05 19:37:53 +00:00
// Fax Opt Out
2023-04-15 14:27:18 +00:00
HasOptedOutOfFax *bool `json:"HasOptedOutOfFax,omitempty"`
2021-08-05 19:37:53 +00:00
// Home Phone
2023-04-15 14:27:18 +00:00
HomePhone *string `json:"HomePhone,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Record Id
2022-09-05 00:01:32 +00:00
ID string `json:"ID,omitempty"`
2021-08-05 19:37:53 +00:00
// Does this contact have bounced emails?
2023-04-15 14:27:18 +00:00
IsEmailBounced *bool `json:"IsEmailBounced,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
// Last Name
2023-04-15 14:27:18 +00:00
LastName *string `json:"LastName,omitempty"`
2021-08-05 19:37:53 +00:00
// Lead Source
2023-04-15 14:27:18 +00:00
LeadSource *string `json:"LeadSource,omitempty"`
2021-08-05 19:37:53 +00:00
// LinkedIn Page
2023-04-15 14:27:18 +00:00
LinkedIn *string `json:"LinkedIn,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// mailing address
MailingAddress *Address `json:"MailingAddress,omitempty"`
2021-08-05 19:37:53 +00:00
// Mobile Phone
2023-04-15 14:27:18 +00:00
MobilePhone *string `json:"MobilePhone,omitempty"`
2021-08-05 19:37:53 +00:00
// Full Name
2023-04-15 14:27:18 +00:00
Name *string `json:"Name,omitempty"`
2021-08-05 19:37:53 +00:00
2023-04-07 00:34:49 +00:00
// Number of Investments
2023-04-15 14:27:18 +00:00
NumberInvestments *float64 `json:"NumberInvestments,omitempty"`
2023-04-07 00:34:49 +00:00
2022-09-05 00:01:32 +00:00
// other address
OtherAddress *Address `json:"OtherAddress,omitempty"`
2021-08-05 19:37:53 +00:00
// Other Phone
2023-04-15 14:27:18 +00:00
OtherPhone *string `json:"OtherPhone,omitempty"`
2021-08-05 19:37:53 +00:00
// The User ID of the user who owns this Contact
2023-04-15 14:27:18 +00:00
OwnerID *string `json:"OwnerID,omitempty"`
2021-08-05 19:37:53 +00:00
// Personal Email Address for this Contact
2023-04-15 14:27:18 +00:00
PersonalEmail *string `json:"PersonalEmail,omitempty"`
2021-08-05 19:37:53 +00:00
// Phone Number
2023-04-15 14:27:18 +00:00
Phone *string `json:"Phone,omitempty"`
2021-08-05 19:37:53 +00:00
// URL of a photograph of this User
2023-04-15 14:27:18 +00:00
PhotoURL *string `json:"PhotoURL,omitempty"`
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
// Reports To User ID
2023-04-15 14:27:18 +00:00
ReportsToID *string `json:"ReportsToID,omitempty"`
2023-03-28 17:47:34 +00:00
// Salutation
2023-04-15 14:27:18 +00:00
Salutation *string `json:"Salutation,omitempty"`
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
2021-08-05 19:37:53 +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
// Contact Title
2023-04-15 14:27:18 +00:00
Title *string `json:"Title,omitempty"`
2021-08-05 19:37:53 +00:00
2022-09-05 00:01:32 +00:00
// twitter
2023-04-15 14:27:18 +00:00
Twitter *string `json:"Twitter,omitempty"`
2021-08-05 19:37:53 +00:00
}
// Validate validates this contact
func (m *Contact) Validate(formats strfmt.Registry) error {
var res []error
2022-09-05 00:01:32 +00:00
if err := m.validateMailingAddress(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.validateOtherAddress(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 *Contact) validateMailingAddress(formats strfmt.Registry) error {
if swag.IsZero(m.MailingAddress) { // not required
2021-08-05 19:37:53 +00:00
return nil
}
2022-09-05 00:01:32 +00:00
if m.MailingAddress != nil {
if err := m.MailingAddress.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("MailingAddress")
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("MailingAddress")
2021-08-05 19:37:53 +00:00
}
return err
}
}
return nil
}
2022-09-05 00:01:32 +00:00
func (m *Contact) validateOtherAddress(formats strfmt.Registry) error {
if swag.IsZero(m.OtherAddress) { // not required
2021-08-05 19:37:53 +00:00
return nil
}
2022-09-05 00:01:32 +00:00
if m.OtherAddress != nil {
if err := m.OtherAddress.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("OtherAddress")
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("OtherAddress")
2021-08-05 19:37:53 +00:00
}
return err
}
}
return nil
}
// ContextValidate validate this contact based on the context it is used
func (m *Contact) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
2022-09-05 00:01:32 +00:00
if err := m.contextValidateMailingAddress(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.contextValidateOtherAddress(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 *Contact) contextValidateMailingAddress(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.MailingAddress != nil {
if err := m.MailingAddress.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("MailingAddress")
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("MailingAddress")
2021-08-05 19:37:53 +00:00
}
return err
}
}
return nil
}
2022-09-05 00:01:32 +00:00
func (m *Contact) contextValidateOtherAddress(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.OtherAddress != nil {
if err := m.OtherAddress.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("OtherAddress")
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("OtherAddress")
2021-08-05 19:37:53 +00:00
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *Contact) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Contact) UnmarshalBinary(b []byte) error {
var res Contact
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}