2021-07-31 03:05:02 +00:00
|
|
|
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
|
2021-08-05 19:37:53 +00:00
|
|
|
// (c) 2012-2020 by Taxnexus, Inc.
|
2021-07-31 03:05:02 +00:00
|
|
|
// All rights reserved worldwide.
|
|
|
|
// Proprietary product; unlicensed use is not allowed
|
|
|
|
|
|
|
|
package crm_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
|
|
|
|
//
|
2023-04-06 01:28:58 +00:00
|
|
|
// swagger:model contact
|
2021-07-31 03:05:02 +00:00
|
|
|
type Contact struct {
|
|
|
|
|
|
|
|
// The primary account ID of this contact
|
2023-04-15 14:27:18 +00:00
|
|
|
AccountID *string `json:"AccountID,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Assistant Name
|
2023-04-15 14:27:18 +00:00
|
|
|
AssistantName *string `json:"AssistantName,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Asst. Phone
|
2023-04-15 14:27:18 +00:00
|
|
|
AssistantPhone *string `json:"AssistantPhone,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Birthdate
|
2023-04-15 14:27:18 +00:00
|
|
|
BirthDate *string `json:"BirthDate,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Created By User ID
|
2023-04-15 14:27:18 +00:00
|
|
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Created Date
|
2023-04-15 14:27:18 +00:00
|
|
|
CreatedDate *string `json:"CreatedDate,omitempty"`
|
2021-07-31 03:05:02 +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-07-31 03:05:02 +00:00
|
|
|
// Department
|
2023-04-15 14:27:18 +00:00
|
|
|
Department *string `json:"Department,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Description
|
2023-04-15 14:27:18 +00:00
|
|
|
Description *string `json:"Description,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Do Not Call?
|
2023-04-15 14:27:18 +00:00
|
|
|
DoNotCall *bool `json:"DoNotCall,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Email address
|
2023-04-15 14:27:18 +00:00
|
|
|
Email *string `json:"Email,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Email Bounce Date
|
2023-04-15 14:27:18 +00:00
|
|
|
EmailBounceDate *string `json:"EmailBounceDate,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Email Bounce Reason
|
2023-04-15 14:27:18 +00:00
|
|
|
EmailBouncedReason *string `json:"EmailBouncedReason,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
2023-04-06 01:28:58 +00:00
|
|
|
// Facebook Page
|
2023-04-15 14:27:18 +00:00
|
|
|
Facebook *string `json:"Facebook,omitempty"`
|
2023-04-06 01:28:58 +00:00
|
|
|
|
2021-07-31 03:05:02 +00:00
|
|
|
// Fax Number
|
2023-04-15 14:27:18 +00:00
|
|
|
Fax *string `json:"Fax,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// First Name
|
2023-04-15 14:27:18 +00:00
|
|
|
FirstName *string `json:"FirstName,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Email Opt Out
|
2023-04-15 14:27:18 +00:00
|
|
|
HasOptedOutOfEmail *bool `json:"HasOptedOutOfEmail,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Fax Opt Out
|
2023-04-15 14:27:18 +00:00
|
|
|
HasOptedOutOfFax *bool `json:"HasOptedOutOfFax,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Home Phone
|
2023-04-15 14:27:18 +00:00
|
|
|
HomePhone *string `json:"HomePhone,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
2023-03-28 17:47:34 +00:00
|
|
|
// Record Id
|
2021-07-31 03:05:02 +00:00
|
|
|
ID string `json:"ID,omitempty"`
|
|
|
|
|
|
|
|
// Does this contact have bounced emails?
|
2023-04-15 14:27:18 +00:00
|
|
|
IsEmailBounced *bool `json:"IsEmailBounced,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Last Modified By User ID
|
2023-04-15 14:27:18 +00:00
|
|
|
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Last Modified Date
|
2023-04-15 14:27:18 +00:00
|
|
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Last Name
|
2023-04-15 14:27:18 +00:00
|
|
|
LastName *string `json:"LastName,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Lead Source
|
2023-04-15 14:27:18 +00:00
|
|
|
LeadSource *string `json:"LeadSource,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// LinkedIn Page
|
2023-04-15 14:27:18 +00:00
|
|
|
LinkedIn *string `json:"LinkedIn,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// mailing address
|
|
|
|
MailingAddress *Address `json:"MailingAddress,omitempty"`
|
|
|
|
|
|
|
|
// Mobile Phone
|
2023-04-15 14:27:18 +00:00
|
|
|
MobilePhone *string `json:"MobilePhone,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Full Name
|
2023-04-15 14:27:18 +00:00
|
|
|
Name *string `json:"Name,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
2022-09-07 00:16:25 +00:00
|
|
|
// number investments
|
2023-04-15 14:27:18 +00:00
|
|
|
NumberInvestments *float64 `json:"NumberInvestments,omitempty"`
|
2022-09-07 00:16:25 +00:00
|
|
|
|
2021-07-31 03:05:02 +00:00
|
|
|
// other address
|
|
|
|
OtherAddress *Address `json:"OtherAddress,omitempty"`
|
|
|
|
|
|
|
|
// Other Phone
|
2023-04-15 14:27:18 +00:00
|
|
|
OtherPhone *string `json:"OtherPhone,omitempty"`
|
2021-07-31 03:05:02 +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-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Personal Email Address for this Contact
|
2023-04-15 14:27:18 +00:00
|
|
|
PersonalEmail *string `json:"PersonalEmail,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Phone Number
|
2023-04-15 14:27:18 +00:00
|
|
|
Phone *string `json:"Phone,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// URL of a photograph of this User
|
2023-04-15 14:27:18 +00:00
|
|
|
PhotoURL *string `json:"PhotoURL,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
2023-03-28 17:47:34 +00:00
|
|
|
// Reports To
|
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-07-31 03:05:02 +00:00
|
|
|
// Tenant Identifier
|
2023-04-15 14:27:18 +00:00
|
|
|
TenantID *string `json:"TenantID,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
|
|
|
|
// Contact Title
|
2023-04-15 14:27:18 +00:00
|
|
|
Title *string `json:"Title,omitempty"`
|
2022-09-07 00:16:25 +00:00
|
|
|
|
|
|
|
// Twitter URL
|
2023-04-15 14:27:18 +00:00
|
|
|
Twitter *string `json:"Twitter,omitempty"`
|
2021-07-31 03:05:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Validate validates this contact
|
|
|
|
func (m *Contact) Validate(formats strfmt.Registry) error {
|
|
|
|
var res []error
|
|
|
|
|
|
|
|
if err := m.validateMailingAddress(formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := m.validateOtherAddress(formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(res) > 0 {
|
|
|
|
return errors.CompositeValidationError(res...)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Contact) validateMailingAddress(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(m.MailingAddress) { // not required
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
if m.MailingAddress != nil {
|
|
|
|
if err := m.MailingAddress.Validate(formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("MailingAddress")
|
2022-05-28 19:45:41 +00:00
|
|
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
|
|
return ce.ValidateName("MailingAddress")
|
2021-07-31 03:05:02 +00:00
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Contact) validateOtherAddress(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(m.OtherAddress) { // not required
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
if m.OtherAddress != nil {
|
|
|
|
if err := m.OtherAddress.Validate(formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("OtherAddress")
|
2022-05-28 19:45:41 +00:00
|
|
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
|
|
return ce.ValidateName("OtherAddress")
|
2021-07-31 03:05:02 +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
|
|
|
|
|
|
|
|
if err := m.contextValidateMailingAddress(ctx, formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := m.contextValidateOtherAddress(ctx, formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(res) > 0 {
|
|
|
|
return errors.CompositeValidationError(res...)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Contact) contextValidateMailingAddress(ctx context.Context, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
if m.MailingAddress != nil {
|
|
|
|
if err := m.MailingAddress.ContextValidate(ctx, formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("MailingAddress")
|
2022-05-28 19:45:41 +00:00
|
|
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
|
|
return ce.ValidateName("MailingAddress")
|
2021-07-31 03:05:02 +00:00
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Contact) contextValidateOtherAddress(ctx context.Context, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
if m.OtherAddress != nil {
|
|
|
|
if err := m.OtherAddress.ContextValidate(ctx, formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("OtherAddress")
|
2022-05-28 19:45:41 +00:00
|
|
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
|
|
return ce.ValidateName("OtherAddress")
|
2021-07-31 03:05:02 +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
|
|
|
|
}
|