lib/api/blaze/blaze_models/vendor_response.go

468 lines
10 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package blaze_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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// VendorResponse vendor response
//
// swagger:model VendorResponse
type VendorResponse struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// additional address list
// Example: ["string"]
AdditionalAddressList []string `json:"additionalAddressList"`
// address
Address *VendorResponseAddress `json:"address,omitempty"`
// arms length type
// Example: ARMS_LENGTH
ArmsLengthType string `json:"armsLengthType,omitempty"`
// assets
// Example: ["string"]
Assets []*VendorResponseAssetsItems0 `json:"assets"`
// back order enabled
// Example: false
BackOrderEnabled bool `json:"backOrderEnabled,omitempty"`
// brand list
// Example: ["string"]
BrandList []string `json:"brandList"`
// brands
// Example: ["string"]
Brands []string `json:"brands"`
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// company licenses
// Example: ["string"]
CompanyLicenses []string `json:"companyLicenses"`
// company type
// Example: string
CompanyType string `json:"companyType,omitempty"`
// created
// Example: 1554825414778
Created int64 `json:"created,omitempty"`
// credits
// Example: 0
Credits float64 `json:"credits,omitempty"`
// dba name
// Example: string
DbaName string `json:"dbaName,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// description
Description string `json:"description,omitempty"`
// email
Email string `json:"email,omitempty"`
// fax
Fax string `json:"fax,omitempty"`
// first name
FirstName string `json:"firstName,omitempty"`
// id
// Example: 5cacc0c66218d174d3f17b0d
ID string `json:"id,omitempty"`
// import Id
// Example: string
ImportID string `json:"importId,omitempty"`
// last name
LastName string `json:"lastName,omitempty"`
// licence type
// Example: string
LicenceType string `json:"licenceType,omitempty"`
// license expiration date
// Example: 0
LicenseExpirationDate float64 `json:"licenseExpirationDate,omitempty"`
// license number
LicenseNumber string `json:"licenseNumber,omitempty"`
// mobile number
// Example: string
MobileNumber string `json:"mobileNumber,omitempty"`
// modified
// Example: 1554825414778
Modified int64 `json:"modified,omitempty"`
// name
// Example: Binsky
Name string `json:"name,omitempty"`
// notes
// Example: ["string"]
Notes []string `json:"notes"`
// phone
Phone string `json:"phone,omitempty"`
// qb desktop ref
// Example: string
QbDesktopRef string `json:"qbDesktopRef,omitempty"`
// qb vendor ref
// Example: ["string"]
QbVendorRef []string `json:"qbVendorRef"`
// related entity
// Example: false
RelatedEntity bool `json:"relatedEntity,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
// vendor key
// Example: NWNhYmQ0YmE2MjE4ZDE0ODM5NWI0MDJjX2JpbnNreQ==
VendorKey string `json:"vendorKey,omitempty"`
// vendor type
// Example: VENDOR
VendorType string `json:"vendorType,omitempty"`
// website
Website string `json:"website,omitempty"`
}
// Validate validates this vendor response
func (m *VendorResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAddress(formats); err != nil {
res = append(res, err)
}
if err := m.validateAssets(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *VendorResponse) validateAddress(formats strfmt.Registry) error {
if swag.IsZero(m.Address) { // not required
return nil
}
if m.Address != nil {
if err := m.Address.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("address")
}
return err
}
}
return nil
}
func (m *VendorResponse) validateAssets(formats strfmt.Registry) error {
if swag.IsZero(m.Assets) { // not required
return nil
}
for i := 0; i < len(m.Assets); i++ {
if swag.IsZero(m.Assets[i]) { // not required
continue
}
if m.Assets[i] != nil {
if err := m.Assets[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this vendor response based on the context it is used
func (m *VendorResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAddress(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateAssets(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *VendorResponse) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error {
if m.Address != nil {
if err := m.Address.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("address")
}
return err
}
}
return nil
}
func (m *VendorResponse) contextValidateAssets(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Assets); i++ {
if m.Assets[i] != nil {
if err := m.Assets[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *VendorResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *VendorResponse) UnmarshalBinary(b []byte) error {
var res VendorResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// VendorResponseAddress vendor response address
//
// swagger:model VendorResponseAddress
type VendorResponseAddress struct {
// address
Address string `json:"address,omitempty"`
// city
City string `json:"city,omitempty"`
// company Id
// Example: string
CompanyID string `json:"companyId,omitempty"`
// country
// Example: US
Country string `json:"country,omitempty"`
// created
// Example: 1554825414778
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// id
// Example: 5cacc0c66218d174d3f17b0c
ID string `json:"id,omitempty"`
// modified
// Example: 1554825414778
Modified int64 `json:"modified,omitempty"`
// state
State string `json:"state,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
// zip code
ZipCode string `json:"zipCode,omitempty"`
}
// Validate validates this vendor response address
func (m *VendorResponseAddress) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this vendor response address based on context it is used
func (m *VendorResponseAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *VendorResponseAddress) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *VendorResponseAddress) UnmarshalBinary(b []byte) error {
var res VendorResponseAddress
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// VendorResponseAssetsItems0 vendor response assets items0
//
// swagger:model VendorResponseAssetsItems0
type VendorResponseAssetsItems0 struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// asset type
// Example: Photo
AssetType string `json:"assetType,omitempty"`
// company Id
// Example: 5c7e8c7b722ed607e61edb06
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1556052368662
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// id
// Example: 5cbf79908a29f808183540e7
ID string `json:"id,omitempty"`
// key
// Example: c71adc95-bb07-47f2-b9f6-cc4db7936686.png
Key string `json:"key,omitempty"`
// large URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-800x800.png
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-1600x1600.png
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-500x500.png
MediumURL string `json:"mediumURL,omitempty"`
// modified
// Example: 1556052368662
Modified int64 `json:"modified,omitempty"`
// name
// Example: Brian Main DL.png
Name string `json:"name,omitempty"`
// priority
// Example: 0
Priority float64 `json:"priority,omitempty"`
// secured
// Example: true
Secured bool `json:"secured,omitempty"`
// thumb URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-200x200.png
ThumbURL string `json:"thumbURL,omitempty"`
// type
// Example: Photo
Type string `json:"type,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
// Validate validates this vendor response assets items0
func (m *VendorResponseAssetsItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this vendor response assets items0 based on context it is used
func (m *VendorResponseAssetsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *VendorResponseAssetsItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *VendorResponseAssetsItems0) UnmarshalBinary(b []byte) error {
var res VendorResponseAssetsItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}