// Code generated by go-swagger; DO NOT EDIT.

// All Code Copyright(c) 2018-2020 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 (
	"strconv"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)

// PurchaseOrderListResponse purchase order list response
//
// swagger:model PurchaseOrderListResponse
type PurchaseOrderListResponse struct {

	// after date
	AfterDate float64 `json:"afterDate,omitempty"`

	// before date
	BeforeDate int64 `json:"beforeDate,omitempty"`

	// limit
	Limit float64 `json:"limit,omitempty"`

	// skip
	Skip float64 `json:"skip,omitempty"`

	// total
	Total float64 `json:"total,omitempty"`

	// values
	Values []*PurchaseOrderListResponseValuesItems0 `json:"values"`
}

// Validate validates this purchase order list response
func (m *PurchaseOrderListResponse) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateValues(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *PurchaseOrderListResponse) validateValues(formats strfmt.Registry) error {

	if swag.IsZero(m.Values) { // not required
		return nil
	}

	for i := 0; i < len(m.Values); i++ {
		if swag.IsZero(m.Values[i]) { // not required
			continue
		}

		if m.Values[i] != nil {
			if err := m.Values[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("values" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponse) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponse) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponse
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0 purchase order list response values items0
//
// swagger:model PurchaseOrderListResponseValuesItems0
type PurchaseOrderListResponseValuesItems0 struct {

	// amount paid
	AmountPaid float64 `json:"amountPaid,omitempty"`

	// approved by
	ApprovedBy string `json:"approvedBy,omitempty"`

	// approved by member
	ApprovedByMember *PurchaseOrderListResponseValuesItems0ApprovedByMember `json:"approvedByMember,omitempty"`

	// approved date
	ApprovedDate int64 `json:"approvedDate,omitempty"`

	// approved signature
	ApprovedSignature string `json:"approvedSignature,omitempty"`

	// archive
	Archive bool `json:"archive,omitempty"`

	// archive date
	ArchiveDate string `json:"archiveDate,omitempty"`

	// company asset list
	CompanyAssetList []string `json:"companyAssetList"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// company logo
	CompanyLogo string `json:"companyLogo,omitempty"`

	// completed by employee Id
	CompletedByEmployeeID string `json:"completedByEmployeeId,omitempty"`

	// completed date
	CompletedDate int64 `json:"completedDate,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// created by employee Id
	CreatedByEmployeeID string `json:"createdByEmployeeId,omitempty"`

	// custom term date
	CustomTermDate int64 `json:"customTermDate,omitempty"`

	// customer type
	CustomerType string `json:"customerType,omitempty"`

	// decline date
	DeclineDate string `json:"declineDate,omitempty"`

	// decline reason
	DeclineReason string `json:"declineReason,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// delivered by
	DeliveredBy string `json:"deliveredBy,omitempty"`

	// delivery address
	DeliveryAddress string `json:"deliveryAddress,omitempty"`

	// delivery charge
	DeliveryCharge float64 `json:"deliveryCharge,omitempty"`

	// delivery date
	DeliveryDate float64 `json:"deliveryDate,omitempty"`

	// delivery time
	DeliveryTime string `json:"deliveryTime,omitempty"`

	// dirty
	Dirty bool `json:"dirty,omitempty"`

	// discount
	Discount float64 `json:"discount,omitempty"`

	// due date
	DueDate float64 `json:"dueDate,omitempty"`

	// enable delivery charge
	EnableDeliveryCharge bool `json:"enableDeliveryCharge,omitempty"`

	// fees
	Fees float64 `json:"fees,omitempty"`

	// flower source type
	FlowerSourceType string `json:"flowerSourceType,omitempty"`

	// grand total
	GrandTotal float64 `json:"grandTotal,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// license Id
	LicenseID string `json:"licenseId,omitempty"`

	// manager receive signature
	ManagerReceiveSignature string `json:"managerReceiveSignature,omitempty"`

	// manual close
	ManualClose bool `json:"manualClose,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// notes
	Notes string `json:"notes,omitempty"`

	// parent p o Id
	ParentPOID string `json:"parentPOId,omitempty"`

	// parent p o number
	ParentPONumber string `json:"parentPONumber,omitempty"`

	// po activity log
	PoActivityLog []*PurchaseOrderListResponseValuesItems0PoActivityLogItems0 `json:"poActivityLog"`

	// po number
	PoNumber string `json:"poNumber,omitempty"`

	// po payment options
	PoPaymentOptions string `json:"poPaymentOptions,omitempty"`

	// po payment terms
	PoPaymentTerms string `json:"poPaymentTerms,omitempty"`

	// po product request list
	PoProductRequestList string `json:"poProductRequestList,omitempty"`

	// po product request result list
	PoProductRequestResultList []*PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0 `json:"poProductRequestResultList"`

	// po qr code asset
	PoQrCodeAsset *PurchaseOrderListResponseValuesItems0PoQrCodeAsset `json:"poQrCodeAsset,omitempty"`

	// po qr code Url
	PoQrCodeURL string `json:"poQrCodeUrl,omitempty"`

	// po type
	PoType string `json:"poType,omitempty"`

	// podue date
	PodueDate int64 `json:"podueDate,omitempty"`

	// purchase order date
	PurchaseOrderDate float64 `json:"purchaseOrderDate,omitempty"`

	// purchase order status
	PurchaseOrderStatus string `json:"purchaseOrderStatus,omitempty"`

	// qb purchase order ref
	QbPurchaseOrderRef string `json:"qbPurchaseOrderRef,omitempty"`

	// received by employee Id
	ReceivedByEmployeeID string `json:"receivedByEmployeeId,omitempty"`

	// received date
	ReceivedDate int64 `json:"receivedDate,omitempty"`

	// reference
	Reference string `json:"reference,omitempty"`

	// shipment bill Id
	ShipmentBillID string `json:"shipmentBillId,omitempty"`

	// shop Id
	ShopID string `json:"shopId,omitempty"`

	// submit for approval date
	SubmitForApprovalDate int64 `json:"submitForApprovalDate,omitempty"`

	// tax result
	TaxResult *PurchaseOrderListResponseValuesItems0TaxResult `json:"taxResult,omitempty"`

	// terms and condition
	TermsAndCondition string `json:"termsAndCondition,omitempty"`

	// total calc tax
	TotalCalcTax float64 `json:"totalCalcTax,omitempty"`

	// total cost
	TotalCost float64 `json:"totalCost,omitempty"`

	// total pre calc tax
	TotalPreCalcTax float64 `json:"totalPreCalcTax,omitempty"`

	// total tax
	TotalTax float64 `json:"totalTax,omitempty"`

	// transaction type
	TransactionType string `json:"transactionType,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`

	// vendor
	Vendor *PurchaseOrderListResponseValuesItems0Vendor `json:"vendor,omitempty"`

	// vendor Id
	VendorID string `json:"vendorId,omitempty"`
}

// Validate validates this purchase order list response values items0
func (m *PurchaseOrderListResponseValuesItems0) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateApprovedByMember(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validatePoActivityLog(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validatePoProductRequestResultList(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validatePoQrCodeAsset(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateTaxResult(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateVendor(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *PurchaseOrderListResponseValuesItems0) validateApprovedByMember(formats strfmt.Registry) error {

	if swag.IsZero(m.ApprovedByMember) { // not required
		return nil
	}

	if m.ApprovedByMember != nil {
		if err := m.ApprovedByMember.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("approvedByMember")
			}
			return err
		}
	}

	return nil
}

func (m *PurchaseOrderListResponseValuesItems0) validatePoActivityLog(formats strfmt.Registry) error {

	if swag.IsZero(m.PoActivityLog) { // not required
		return nil
	}

	for i := 0; i < len(m.PoActivityLog); i++ {
		if swag.IsZero(m.PoActivityLog[i]) { // not required
			continue
		}

		if m.PoActivityLog[i] != nil {
			if err := m.PoActivityLog[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("poActivityLog" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (m *PurchaseOrderListResponseValuesItems0) validatePoProductRequestResultList(formats strfmt.Registry) error {

	if swag.IsZero(m.PoProductRequestResultList) { // not required
		return nil
	}

	for i := 0; i < len(m.PoProductRequestResultList); i++ {
		if swag.IsZero(m.PoProductRequestResultList[i]) { // not required
			continue
		}

		if m.PoProductRequestResultList[i] != nil {
			if err := m.PoProductRequestResultList[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("poProductRequestResultList" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (m *PurchaseOrderListResponseValuesItems0) validatePoQrCodeAsset(formats strfmt.Registry) error {

	if swag.IsZero(m.PoQrCodeAsset) { // not required
		return nil
	}

	if m.PoQrCodeAsset != nil {
		if err := m.PoQrCodeAsset.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("poQrCodeAsset")
			}
			return err
		}
	}

	return nil
}

func (m *PurchaseOrderListResponseValuesItems0) validateTaxResult(formats strfmt.Registry) error {

	if swag.IsZero(m.TaxResult) { // not required
		return nil
	}

	if m.TaxResult != nil {
		if err := m.TaxResult.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("taxResult")
			}
			return err
		}
	}

	return nil
}

func (m *PurchaseOrderListResponseValuesItems0) validateVendor(formats strfmt.Registry) error {

	if swag.IsZero(m.Vendor) { // not required
		return nil
	}

	if m.Vendor != nil {
		if err := m.Vendor.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("vendor")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0ApprovedByMember purchase order list response values items0 approved by member
//
// swagger:model PurchaseOrderListResponseValuesItems0ApprovedByMember
type PurchaseOrderListResponseValuesItems0ApprovedByMember struct {

	// address
	Address *PurchaseOrderListResponseValuesItems0ApprovedByMemberAddress `json:"address,omitempty"`

	// app access list
	AppAccessList []string `json:"appAccessList"`

	// assigned inventory Id
	AssignedInventoryID string `json:"assignedInventoryId,omitempty"`

	// assigned terminal Id
	AssignedTerminalID string `json:"assignedTerminalId,omitempty"`

	// can apply custom discount
	CanApplyCustomDiscount bool `json:"canApplyCustomDiscount,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// disabled
	Disabled bool `json:"disabled,omitempty"`

	// dl expiration date
	DlExpirationDate string `json:"dlExpirationDate,omitempty"`

	// drivers license
	DriversLicense string `json:"driversLicense,omitempty"`

	// email
	Email string `json:"email,omitempty"`

	// employee on fleet info list
	EmployeeOnFleetInfoList string `json:"employeeOnFleetInfoList,omitempty"`

	// first name
	FirstName string `json:"firstName,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// insurance company name
	InsuranceCompanyName string `json:"insuranceCompanyName,omitempty"`

	// insurance expire date
	InsuranceExpireDate float64 `json:"insuranceExpireDate,omitempty"`

	// last logged in shop Id
	LastLoggedInShopID string `json:"lastLoggedInShopId,omitempty"`

	// last name
	LastName string `json:"lastName,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// notes
	Notes []string `json:"notes"`

	// password
	Password string `json:"password,omitempty"`

	// phone number
	PhoneNumber string `json:"phoneNumber,omitempty"`

	// pin
	Pin string `json:"pin,omitempty"`

	// policy number
	PolicyNumber string `json:"policyNumber,omitempty"`

	// recent location
	RecentLocation string `json:"recentLocation,omitempty"`

	// registration expire date
	RegistrationExpireDate float64 `json:"registrationExpireDate,omitempty"`

	// role
	Role string `json:"role,omitempty"`

	// role Id
	RoleID string `json:"roleId,omitempty"`

	// shops
	Shops []string `json:"shops"`

	// time card
	TimeCard string `json:"timeCard,omitempty"`

	// timecard Id
	TimecardID string `json:"timecardId,omitempty"`

	// tookan info list
	TookanInfoList string `json:"tookanInfoList,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`

	// vehicle license plate
	VehicleLicensePlate string `json:"vehicleLicensePlate,omitempty"`

	// vehicle make
	VehicleMake string `json:"vehicleMake,omitempty"`

	// vehicle model
	VehicleModel string `json:"vehicleModel,omitempty"`

	// vehicle pin
	VehiclePin string `json:"vehiclePin,omitempty"`

	// vin no
	VinNo string `json:"vinNo,omitempty"`
}

// Validate validates this purchase order list response values items0 approved by member
func (m *PurchaseOrderListResponseValuesItems0ApprovedByMember) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateAddress(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *PurchaseOrderListResponseValuesItems0ApprovedByMember) 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("approvedByMember" + "." + "address")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0ApprovedByMember) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0ApprovedByMember) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0ApprovedByMember
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0ApprovedByMemberAddress purchase order list response values items0 approved by member address
//
// swagger:model PurchaseOrderListResponseValuesItems0ApprovedByMemberAddress
type PurchaseOrderListResponseValuesItems0ApprovedByMemberAddress struct {

	// address
	Address string `json:"address,omitempty"`

	// city
	City string `json:"city,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// country
	Country string `json:"country,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// state
	State string `json:"state,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`

	// zip code
	ZipCode string `json:"zipCode,omitempty"`
}

// Validate validates this purchase order list response values items0 approved by member address
func (m *PurchaseOrderListResponseValuesItems0ApprovedByMemberAddress) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0ApprovedByMemberAddress) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0ApprovedByMemberAddress) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0ApprovedByMemberAddress
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoActivityLogItems0 purchase order list response values items0 po activity log items0
//
// swagger:model PurchaseOrderListResponseValuesItems0PoActivityLogItems0
type PurchaseOrderListResponseValuesItems0PoActivityLogItems0 struct {

	// activity type
	ActivityType string `json:"activityType,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// dirty
	Dirty bool `json:"dirty,omitempty"`

	// employee Id
	EmployeeID string `json:"employeeId,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// log
	Log string `json:"log,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// purchase order Id
	PurchaseOrderID string `json:"purchaseOrderId,omitempty"`

	// shop Id
	ShopID string `json:"shopId,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`
}

// Validate validates this purchase order list response values items0 po activity log items0
func (m *PurchaseOrderListResponseValuesItems0PoActivityLogItems0) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoActivityLogItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoActivityLogItems0) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoActivityLogItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0 purchase order list response values items0 po product request result list items0
//
// swagger:model PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0
type PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0 struct {

	// batch add details
	BatchAddDetails string `json:"batchAddDetails,omitempty"`

	// batch quantity map
	BatchQuantityMap string `json:"batchQuantityMap,omitempty"`

	// cannabis
	Cannabis bool `json:"cannabis,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// decline reason
	DeclineReason string `json:"declineReason,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// dirty
	Dirty bool `json:"dirty,omitempty"`

	// excise tax
	ExciseTax float64 `json:"exciseTax,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// notes
	Notes string `json:"notes,omitempty"`

	// product
	Product *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product `json:"product,omitempty"`

	// product Id
	ProductID string `json:"productId,omitempty"`

	// product name
	ProductName string `json:"productName,omitempty"`

	// receive batch status
	ReceiveBatchStatus string `json:"receiveBatchStatus,omitempty"`

	// received quantity
	ReceivedQuantity float64 `json:"receivedQuantity,omitempty"`

	// request quantity
	RequestQuantity float64 `json:"requestQuantity,omitempty"`

	// request status
	RequestStatus string `json:"requestStatus,omitempty"`

	// shop Id
	ShopID string `json:"shopId,omitempty"`

	// total cost
	TotalCost float64 `json:"totalCost,omitempty"`

	// total cultivation tax
	TotalCultivationTax float64 `json:"totalCultivationTax,omitempty"`

	// total excise tax
	TotalExciseTax float64 `json:"totalExciseTax,omitempty"`

	// track trace system
	TrackTraceSystem string `json:"trackTraceSystem,omitempty"`

	// tracking packages list
	TrackingPackagesList []string `json:"trackingPackagesList"`

	// unit price
	UnitPrice float64 `json:"unitPrice,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`
}

// Validate validates this purchase order list response values items0 po product request result list items0
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateProduct(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0) validateProduct(formats strfmt.Registry) error {

	if swag.IsZero(m.Product) { // not required
		return nil
	}

	if m.Product != nil {
		if err := m.Product.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("product")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product purchase order list response values items0 po product request result list items0 product
//
// swagger:model PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product
type PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product struct {

	// active
	Active bool `json:"active,omitempty"`

	// assets
	Assets []*PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductAssetsItems0 `json:"assets"`

	// automatic re order
	AutomaticReOrder bool `json:"automaticReOrder,omitempty"`

	// brand
	Brand string `json:"brand,omitempty"`

	// brand Id
	BrandID string `json:"brandId,omitempty"`

	// bundle items
	BundleItems []string `json:"bundleItems"`

	// by gram
	ByGram bool `json:"byGram,omitempty"`

	// by prepackage
	ByPrepackage bool `json:"byPrepackage,omitempty"`

	// cannabis type
	CannabisType string `json:"cannabisType,omitempty"`

	// category
	Category *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategory `json:"category,omitempty"`

	// category Id
	CategoryID string `json:"categoryId,omitempty"`

	// cbd
	Cbd float64 `json:"cbd,omitempty"`

	// cbda
	Cbda float64 `json:"cbda,omitempty"`

	// cbn
	Cbn float64 `json:"cbn,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// company link Id
	CompanyLinkID string `json:"companyLinkId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// custom gram type
	CustomGramType string `json:"customGramType,omitempty"`

	// custom tax info
	CustomTaxInfo string `json:"customTaxInfo,omitempty"`

	// custom weight
	CustomWeight float64 `json:"customWeight,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// description
	Description string `json:"description,omitempty"`

	// dirty
	Dirty bool `json:"dirty,omitempty"`

	// discountable
	Discountable bool `json:"discountable,omitempty"`

	// enable excise tax
	EnableExciseTax bool `json:"enableExciseTax,omitempty"`

	// enable mix match
	EnableMixMatch bool `json:"enableMixMatch,omitempty"`

	// enable weedmap
	EnableWeedmap bool `json:"enableWeedmap,omitempty"`

	// flower type
	FlowerType string `json:"flowerType,omitempty"`

	// genetics
	Genetics string `json:"genetics,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// import Id
	ImportID string `json:"importId,omitempty"`

	// import src
	ImportSrc string `json:"importSrc,omitempty"`

	// low inventory notification
	LowInventoryNotification bool `json:"lowInventoryNotification,omitempty"`

	// low threshold
	LowThreshold float64 `json:"lowThreshold,omitempty"`

	// medical conditions
	MedicalConditions []string `json:"medicalConditions"`

	// medicinal
	Medicinal bool `json:"medicinal,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// notes
	Notes []string `json:"notes"`

	// potency
	Potency bool `json:"potency,omitempty"`

	// potency amount
	PotencyAmount string `json:"potencyAmount,omitempty"`

	// price breaks
	PriceBreaks []string `json:"priceBreaks"`

	// price includes a l excise
	PriceIncludesALExcise bool `json:"priceIncludesALExcise,omitempty"`

	// price includes excise
	PriceIncludesExcise bool `json:"priceIncludesExcise,omitempty"`

	// price ranges
	PriceRanges []*PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0 `json:"priceRanges"`

	// pricing template Id
	PricingTemplateID string `json:"pricingTemplateId,omitempty"`

	// product sale type
	ProductSaleType string `json:"productSaleType,omitempty"`

	// product type
	ProductType string `json:"productType,omitempty"`

	// qb desktop item ref
	QbDesktopItemRef string `json:"qbDesktopItemRef,omitempty"`

	// qb item ref
	QbItemRef string `json:"qbItemRef,omitempty"`

	// quantities
	Quantities []*PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductQuantitiesItems0 `json:"quantities"`

	// re order level
	ReOrderLevel float64 `json:"reOrderLevel,omitempty"`

	// shop Id
	ShopID string `json:"shopId,omitempty"`

	// show in widget
	ShowInWidget bool `json:"showInWidget,omitempty"`

	// sku
	Sku string `json:"sku,omitempty"`

	// tags
	Tags []string `json:"tags"`

	// tax order
	TaxOrder string `json:"taxOrder,omitempty"`

	// tax tables
	TaxTables []string `json:"taxTables"`

	// tax type
	TaxType string `json:"taxType,omitempty"`

	// thc
	Thc float64 `json:"thc,omitempty"`

	// thca
	Thca float64 `json:"thca,omitempty"`

	// unit price
	UnitPrice float64 `json:"unitPrice,omitempty"`

	// unit value
	UnitValue float64 `json:"unitValue,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`

	// vendor
	Vendor string `json:"vendor,omitempty"`

	// vendor Id
	VendorID string `json:"vendorId,omitempty"`

	// weight per unit
	WeightPerUnit string `json:"weightPerUnit,omitempty"`
}

// Validate validates this purchase order list response values items0 po product request result list items0 product
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateAssets(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateCategory(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validatePriceRanges(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateQuantities(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product) 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("product" + "." + "assets" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product) validateCategory(formats strfmt.Registry) error {

	if swag.IsZero(m.Category) { // not required
		return nil
	}

	if m.Category != nil {
		if err := m.Category.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("product" + "." + "category")
			}
			return err
		}
	}

	return nil
}

func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product) validatePriceRanges(formats strfmt.Registry) error {

	if swag.IsZero(m.PriceRanges) { // not required
		return nil
	}

	for i := 0; i < len(m.PriceRanges); i++ {
		if swag.IsZero(m.PriceRanges[i]) { // not required
			continue
		}

		if m.PriceRanges[i] != nil {
			if err := m.PriceRanges[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("product" + "." + "priceRanges" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product) validateQuantities(formats strfmt.Registry) error {

	if swag.IsZero(m.Quantities) { // not required
		return nil
	}

	for i := 0; i < len(m.Quantities); i++ {
		if swag.IsZero(m.Quantities[i]) { // not required
			continue
		}

		if m.Quantities[i] != nil {
			if err := m.Quantities[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("product" + "." + "quantities" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0Product
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductAssetsItems0 purchase order list response values items0 po product request result list items0 product assets items0
//
// swagger:model PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductAssetsItems0
type PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductAssetsItems0 struct {

	// active
	Active bool `json:"active,omitempty"`

	// asset type
	AssetType string `json:"assetType,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// key
	Key string `json:"key,omitempty"`

	// large URL
	LargeURL string `json:"largeURL,omitempty"`

	// large x2 URL
	LargeX2URL string `json:"largeX2URL,omitempty"`

	// medium URL
	MediumURL string `json:"mediumURL,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// priority
	Priority float64 `json:"priority,omitempty"`

	// secured
	Secured bool `json:"secured,omitempty"`

	// thumb URL
	ThumbURL string `json:"thumbURL,omitempty"`

	// type
	Type string `json:"type,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`
}

// Validate validates this purchase order list response values items0 po product request result list items0 product assets items0
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductAssetsItems0) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductAssetsItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductAssetsItems0) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductAssetsItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategory purchase order list response values items0 po product request result list items0 product category
//
// swagger:model PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategory
type PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategory struct {

	// active
	Active bool `json:"active,omitempty"`

	// cannabis
	Cannabis bool `json:"cannabis,omitempty"`

	// cannabis type
	CannabisType string `json:"cannabisType,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// dirty
	Dirty bool `json:"dirty,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// low threshold
	LowThreshold string `json:"lowThreshold,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// photo
	Photo *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategoryPhoto `json:"photo,omitempty"`

	// priority
	Priority float64 `json:"priority,omitempty"`

	// shop Id
	ShopID string `json:"shopId,omitempty"`

	// unit type
	UnitType string `json:"unitType,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`
}

// Validate validates this purchase order list response values items0 po product request result list items0 product category
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategory) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validatePhoto(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategory) validatePhoto(formats strfmt.Registry) error {

	if swag.IsZero(m.Photo) { // not required
		return nil
	}

	if m.Photo != nil {
		if err := m.Photo.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("product" + "." + "category" + "." + "photo")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategory) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategory) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategory
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategoryPhoto purchase order list response values items0 po product request result list items0 product category photo
//
// swagger:model PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategoryPhoto
type PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategoryPhoto struct {

	// active
	Active bool `json:"active,omitempty"`

	// asset type
	AssetType string `json:"assetType,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// key
	Key string `json:"key,omitempty"`

	// large URL
	LargeURL string `json:"largeURL,omitempty"`

	// large x2 URL
	LargeX2URL string `json:"largeX2URL,omitempty"`

	// medium URL
	MediumURL string `json:"mediumURL,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// orig URL
	OrigURL string `json:"origURL,omitempty"`

	// priority
	Priority float64 `json:"priority,omitempty"`

	// public URL
	PublicURL string `json:"publicURL,omitempty"`

	// secured
	Secured bool `json:"secured,omitempty"`

	// thumb URL
	ThumbURL string `json:"thumbURL,omitempty"`

	// type
	Type string `json:"type,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`
}

// Validate validates this purchase order list response values items0 po product request result list items0 product category photo
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategoryPhoto) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategoryPhoto) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategoryPhoto) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductCategoryPhoto
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0 purchase order list response values items0 po product request result list items0 product price ranges items0
//
// swagger:model PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0
type PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0 struct {

	// id
	ID string `json:"id,omitempty"`

	// price
	Price float64 `json:"price,omitempty"`

	// priority
	Priority float64 `json:"priority,omitempty"`

	// weight tolerance
	WeightTolerance *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0WeightTolerance `json:"weightTolerance,omitempty"`

	// weight tolerance Id
	WeightToleranceID string `json:"weightToleranceId,omitempty"`
}

// Validate validates this purchase order list response values items0 po product request result list items0 product price ranges items0
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateWeightTolerance(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0) validateWeightTolerance(formats strfmt.Registry) error {

	if swag.IsZero(m.WeightTolerance) { // not required
		return nil
	}

	if m.WeightTolerance != nil {
		if err := m.WeightTolerance.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("weightTolerance")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0WeightTolerance purchase order list response values items0 po product request result list items0 product price ranges items0 weight tolerance
//
// swagger:model PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0WeightTolerance
type PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0WeightTolerance struct {

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// enabled
	Enabled bool `json:"enabled,omitempty"`

	// end weight
	EndWeight float64 `json:"endWeight,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// priority
	Priority float64 `json:"priority,omitempty"`

	// start weight
	StartWeight float64 `json:"startWeight,omitempty"`

	// unit value
	UnitValue float64 `json:"unitValue,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`

	// weight key
	WeightKey string `json:"weightKey,omitempty"`

	// weight value
	WeightValue float64 `json:"weightValue,omitempty"`
}

// Validate validates this purchase order list response values items0 po product request result list items0 product price ranges items0 weight tolerance
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0WeightTolerance) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0WeightTolerance) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0WeightTolerance) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductPriceRangesItems0WeightTolerance
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductQuantitiesItems0 purchase order list response values items0 po product request result list items0 product quantities items0
//
// swagger:model PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductQuantitiesItems0
type PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductQuantitiesItems0 struct {

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// dirty
	Dirty bool `json:"dirty,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// inventory Id
	InventoryID string `json:"inventoryId,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// quantity
	Quantity float64 `json:"quantity,omitempty"`

	// shop Id
	ShopID string `json:"shopId,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`
}

// Validate validates this purchase order list response values items0 po product request result list items0 product quantities items0
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductQuantitiesItems0) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductQuantitiesItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductQuantitiesItems0) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoProductRequestResultListItems0ProductQuantitiesItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0PoQrCodeAsset purchase order list response values items0 po qr code asset
//
// swagger:model PurchaseOrderListResponseValuesItems0PoQrCodeAsset
type PurchaseOrderListResponseValuesItems0PoQrCodeAsset struct {

	// active
	Active bool `json:"active,omitempty"`

	// asset type
	AssetType string `json:"assetType,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// key
	Key string `json:"key,omitempty"`

	// large URL
	LargeURL string `json:"largeURL,omitempty"`

	// large x2 URL
	LargeX2URL string `json:"largeX2URL,omitempty"`

	// medium URL
	MediumURL string `json:"mediumURL,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// orig URL
	OrigURL string `json:"origURL,omitempty"`

	// priority
	Priority float64 `json:"priority,omitempty"`

	// public URL
	PublicURL string `json:"publicURL,omitempty"`

	// secured
	Secured bool `json:"secured,omitempty"`

	// thumb URL
	ThumbURL string `json:"thumbURL,omitempty"`

	// type
	Type string `json:"type,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`
}

// Validate validates this purchase order list response values items0 po qr code asset
func (m *PurchaseOrderListResponseValuesItems0PoQrCodeAsset) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoQrCodeAsset) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0PoQrCodeAsset) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0PoQrCodeAsset
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0TaxResult purchase order list response values items0 tax result
//
// swagger:model PurchaseOrderListResponseValuesItems0TaxResult
type PurchaseOrderListResponseValuesItems0TaxResult struct {

	// created
	Created int64 `json:"created,omitempty"`

	// cultivation tax result
	CultivationTaxResult *PurchaseOrderListResponseValuesItems0TaxResultCultivationTaxResult `json:"cultivationTaxResult,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// total a l excise tax
	TotalALExciseTax float64 `json:"totalALExciseTax,omitempty"`

	// total a l post excise tax
	TotalALPostExciseTax float64 `json:"totalALPostExciseTax,omitempty"`

	// total city pre tax
	TotalCityPreTax float64 `json:"totalCityPreTax,omitempty"`

	// total city tax
	TotalCityTax float64 `json:"totalCityTax,omitempty"`

	// total county pre tax
	TotalCountyPreTax float64 `json:"totalCountyPreTax,omitempty"`

	// total county tax
	TotalCountyTax float64 `json:"totalCountyTax,omitempty"`

	// total excise tax
	TotalExciseTax float64 `json:"totalExciseTax,omitempty"`

	// total fed pre tax
	TotalFedPreTax float64 `json:"totalFedPreTax,omitempty"`

	// total fed tax
	TotalFedTax float64 `json:"totalFedTax,omitempty"`

	// total n a l pre excise tax
	TotalNALPreExciseTax float64 `json:"totalNALPreExciseTax,omitempty"`

	// total post calc tax
	TotalPostCalcTax float64 `json:"totalPostCalcTax,omitempty"`

	// total pre calc tax
	TotalPreCalcTax float64 `json:"totalPreCalcTax,omitempty"`

	// total state pre tax
	TotalStatePreTax float64 `json:"totalStatePreTax,omitempty"`

	// total state tax
	TotalStateTax float64 `json:"totalStateTax,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`
}

// Validate validates this purchase order list response values items0 tax result
func (m *PurchaseOrderListResponseValuesItems0TaxResult) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateCultivationTaxResult(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *PurchaseOrderListResponseValuesItems0TaxResult) validateCultivationTaxResult(formats strfmt.Registry) error {

	if swag.IsZero(m.CultivationTaxResult) { // not required
		return nil
	}

	if m.CultivationTaxResult != nil {
		if err := m.CultivationTaxResult.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("taxResult" + "." + "cultivationTaxResult")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0TaxResult) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0TaxResult) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0TaxResult
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0TaxResultCultivationTaxResult purchase order list response values items0 tax result cultivation tax result
//
// swagger:model PurchaseOrderListResponseValuesItems0TaxResultCultivationTaxResult
type PurchaseOrderListResponseValuesItems0TaxResultCultivationTaxResult struct {

	// flower tax oz
	FlowerTaxOz float64 `json:"flowerTaxOz,omitempty"`

	// leaf tax oz
	LeafTaxOz float64 `json:"leafTaxOz,omitempty"`

	// total cultivation tax
	TotalCultivationTax float64 `json:"totalCultivationTax,omitempty"`

	// total flower oz
	TotalFlowerOz float64 `json:"totalFlowerOz,omitempty"`

	// total flower tax
	TotalFlowerTax float64 `json:"totalFlowerTax,omitempty"`

	// total leaf oz
	TotalLeafOz float64 `json:"totalLeafOz,omitempty"`

	// total leaf tax
	TotalLeafTax float64 `json:"totalLeafTax,omitempty"`
}

// Validate validates this purchase order list response values items0 tax result cultivation tax result
func (m *PurchaseOrderListResponseValuesItems0TaxResultCultivationTaxResult) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0TaxResultCultivationTaxResult) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0TaxResultCultivationTaxResult) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0TaxResultCultivationTaxResult
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0Vendor purchase order list response values items0 vendor
//
// swagger:model PurchaseOrderListResponseValuesItems0Vendor
type PurchaseOrderListResponseValuesItems0Vendor struct {

	// active
	Active bool `json:"active,omitempty"`

	// additional address list
	AdditionalAddressList []string `json:"additionalAddressList"`

	// address
	Address *PurchaseOrderListResponseValuesItems0VendorAddress `json:"address,omitempty"`

	// arms length type
	ArmsLengthType string `json:"armsLengthType,omitempty"`

	// assets
	Assets []*PurchaseOrderListResponseValuesItems0VendorAssetsItems0 `json:"assets"`

	// back order enabled
	BackOrderEnabled bool `json:"backOrderEnabled,omitempty"`

	// brands
	Brands []string `json:"brands"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// company licenses
	CompanyLicenses []string `json:"companyLicenses"`

	// company type
	CompanyType string `json:"companyType,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// credits
	Credits float64 `json:"credits,omitempty"`

	// dba name
	DbaName string `json:"dbaName,omitempty"`

	// deleted
	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
	ID string `json:"id,omitempty"`

	// import Id
	ImportID string `json:"importId,omitempty"`

	// last name
	LastName string `json:"lastName,omitempty"`

	// licence type
	LicenceType string `json:"licenceType,omitempty"`

	// license expiration date
	LicenseExpirationDate float64 `json:"licenseExpirationDate,omitempty"`

	// license number
	LicenseNumber string `json:"licenseNumber,omitempty"`

	// mobile number
	MobileNumber string `json:"mobileNumber,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// notes
	Notes []string `json:"notes"`

	// phone
	Phone string `json:"phone,omitempty"`

	// qb desktop ref
	QbDesktopRef string `json:"qbDesktopRef,omitempty"`

	// qb vendor ref
	QbVendorRef []string `json:"qbVendorRef"`

	// related entity
	RelatedEntity bool `json:"relatedEntity,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`

	// vendor key
	VendorKey string `json:"vendorKey,omitempty"`

	// vendor type
	VendorType string `json:"vendorType,omitempty"`

	// website
	Website string `json:"website,omitempty"`
}

// Validate validates this purchase order list response values items0 vendor
func (m *PurchaseOrderListResponseValuesItems0Vendor) 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 *PurchaseOrderListResponseValuesItems0Vendor) 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("vendor" + "." + "address")
			}
			return err
		}
	}

	return nil
}

func (m *PurchaseOrderListResponseValuesItems0Vendor) 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("vendor" + "." + "assets" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0Vendor) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0Vendor) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0Vendor
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0VendorAddress purchase order list response values items0 vendor address
//
// swagger:model PurchaseOrderListResponseValuesItems0VendorAddress
type PurchaseOrderListResponseValuesItems0VendorAddress struct {

	// address
	Address string `json:"address,omitempty"`

	// city
	City string `json:"city,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// country
	Country string `json:"country,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// state
	State string `json:"state,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`

	// zip code
	ZipCode string `json:"zipCode,omitempty"`
}

// Validate validates this purchase order list response values items0 vendor address
func (m *PurchaseOrderListResponseValuesItems0VendorAddress) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0VendorAddress) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0VendorAddress) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0VendorAddress
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// PurchaseOrderListResponseValuesItems0VendorAssetsItems0 purchase order list response values items0 vendor assets items0
//
// swagger:model PurchaseOrderListResponseValuesItems0VendorAssetsItems0
type PurchaseOrderListResponseValuesItems0VendorAssetsItems0 struct {

	// active
	Active bool `json:"active,omitempty"`

	// asset type
	AssetType string `json:"assetType,omitempty"`

	// company Id
	CompanyID string `json:"companyId,omitempty"`

	// created
	Created int64 `json:"created,omitempty"`

	// deleted
	Deleted bool `json:"deleted,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// key
	Key string `json:"key,omitempty"`

	// large URL
	LargeURL string `json:"largeURL,omitempty"`

	// large x2 URL
	LargeX2URL string `json:"largeX2URL,omitempty"`

	// medium URL
	MediumURL string `json:"mediumURL,omitempty"`

	// modified
	Modified int64 `json:"modified,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// priority
	Priority float64 `json:"priority,omitempty"`

	// secured
	Secured bool `json:"secured,omitempty"`

	// thumb URL
	ThumbURL string `json:"thumbURL,omitempty"`

	// type
	Type string `json:"type,omitempty"`

	// updated
	Updated bool `json:"updated,omitempty"`
}

// Validate validates this purchase order list response values items0 vendor assets items0
func (m *PurchaseOrderListResponseValuesItems0VendorAssetsItems0) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0VendorAssetsItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PurchaseOrderListResponseValuesItems0VendorAssetsItems0) UnmarshalBinary(b []byte) error {
	var res PurchaseOrderListResponseValuesItems0VendorAssetsItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
