lib/api/metrc-gw/metrc_gw_models/facility.go

369 lines
9.7 KiB
Go
Raw Permalink Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-01-19 16:58:40 +00:00
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
2021-01-08 17:40:28 +00:00
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package metrc_gw_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
2021-02-09 16:56:57 +00:00
"context"
2021-01-08 17:40:28 +00:00
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// Facility facility
//
// swagger:model Facility
type Facility struct {
// alias
2021-02-09 16:56:57 +00:00
// Example: OR Larger Rec-WHSLR 1
2021-01-08 17:40:28 +00:00
Alias string `json:"Alias,omitempty"`
// credentialed date
2021-02-09 16:56:57 +00:00
// Example: 2017-08-13
2021-01-08 17:40:28 +00:00
CredentialedDate string `json:"CredentialedDate,omitempty"`
// display name
2021-02-09 16:56:57 +00:00
// Example: OR Larger Rec-WHSLR 1
2021-01-08 17:40:28 +00:00
DisplayName string `json:"DisplayName,omitempty"`
// facility type
FacilityType *FacilityFacilityType `json:"FacilityType,omitempty"`
// hire date
2021-02-09 16:56:57 +00:00
// Example: 2017-08-14
2021-01-08 17:40:28 +00:00
HireDate string `json:"HireDate,omitempty"`
// is manager
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
IsManager bool `json:"IsManager,omitempty"`
// is owner
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
IsOwner bool `json:"IsOwner,omitempty"`
// license
License *License `json:"License,omitempty"`
// name
2021-02-09 16:56:57 +00:00
// Example: OR LARGER THAN SALES, LLC
2021-01-08 17:40:28 +00:00
Name string `json:"Name,omitempty"`
// occupations
2021-02-09 16:56:57 +00:00
// Example: []
2021-01-08 17:40:28 +00:00
Occupations []string `json:"Occupations"`
}
// Validate validates this facility
func (m *Facility) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateFacilityType(formats); err != nil {
res = append(res, err)
}
if err := m.validateLicense(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Facility) validateFacilityType(formats strfmt.Registry) error {
if swag.IsZero(m.FacilityType) { // not required
return nil
}
if m.FacilityType != nil {
if err := m.FacilityType.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("FacilityType")
}
return err
}
}
return nil
}
func (m *Facility) validateLicense(formats strfmt.Registry) error {
if swag.IsZero(m.License) { // not required
return nil
}
if m.License != nil {
if err := m.License.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("License")
}
return err
}
}
return nil
}
2021-02-09 16:56:57 +00:00
// ContextValidate validate this facility based on the context it is used
func (m *Facility) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateFacilityType(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateLicense(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Facility) contextValidateFacilityType(ctx context.Context, formats strfmt.Registry) error {
if m.FacilityType != nil {
if err := m.FacilityType.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("FacilityType")
}
return err
}
}
return nil
}
func (m *Facility) contextValidateLicense(ctx context.Context, formats strfmt.Registry) error {
if m.License != nil {
if err := m.License.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("License")
}
return err
}
}
return nil
}
2021-01-08 17:40:28 +00:00
// MarshalBinary interface implementation
func (m *Facility) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Facility) UnmarshalBinary(b []byte) error {
var res Facility
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// FacilityFacilityType facility facility type
//
// swagger:model FacilityFacilityType
type FacilityFacilityType struct {
// advanced sales
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
AdvancedSales bool `json:"AdvancedSales,omitempty"`
// can assign rooms to packages
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanAssignRoomsToPackages bool `json:"CanAssignRoomsToPackages,omitempty"`
// can assign rooms to plant batches
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanAssignRoomsToPlantBatches bool `json:"CanAssignRoomsToPlantBatches,omitempty"`
// can create derived packages
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
CanCreateDerivedPackages bool `json:"CanCreateDerivedPackages,omitempty"`
// can create opening balance packages
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
CanCreateOpeningBalancePackages bool `json:"CanCreateOpeningBalancePackages,omitempty"`
// can create process validation packages
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
CanCreateProcessValidationPackages bool `json:"CanCreateProcessValidationPackages,omitempty"`
// can deliver sales to consumers
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanDeliverSalesToConsumers bool `json:"CanDeliverSalesToConsumers,omitempty"`
// can deliver sales to patients
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanDeliverSalesToPatients bool `json:"CanDeliverSalesToPatients,omitempty"`
// can grow plants
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanGrowPlants bool `json:"CanGrowPlants,omitempty"`
// can have member patients
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanHaveMemberPatients bool `json:"CanHaveMemberPatients,omitempty"`
// can infuse products
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanInfuseProducts bool `json:"CanInfuseProducts,omitempty"`
// can package vegetative plants
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanPackageVegetativePlants bool `json:"CanPackageVegetativePlants,omitempty"`
// can remediate packages with failed lab results
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanRemediatePackagesWithFailedLabResults bool `json:"CanRemediatePackagesWithFailedLabResults,omitempty"`
// can report harvest schedules
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanReportHarvestSchedules bool `json:"CanReportHarvestSchedules,omitempty"`
// can report patients adverse responses
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanReportPatientsAdverseResponses bool `json:"CanReportPatientsAdverseResponses,omitempty"`
// can request product remediation
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanRequestProductRemediation bool `json:"CanRequestProductRemediation,omitempty"`
// can require harvest sample lab test batches
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanRequireHarvestSampleLabTestBatches bool `json:"CanRequireHarvestSampleLabTestBatches,omitempty"`
// can require package sample lab test batches
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanRequirePackageSampleLabTestBatches bool `json:"CanRequirePackageSampleLabTestBatches,omitempty"`
// can sell to caregivers
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanSellToCaregivers bool `json:"CanSellToCaregivers,omitempty"`
// can sell to consumers
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanSellToConsumers bool `json:"CanSellToConsumers,omitempty"`
// can sell to external patients
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanSellToExternalPatients bool `json:"CanSellToExternalPatients,omitempty"`
// can sell to patients
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanSellToPatients bool `json:"CanSellToPatients,omitempty"`
// can submit harvests for testing
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanSubmitHarvestsForTesting bool `json:"CanSubmitHarvestsForTesting,omitempty"`
// can submit packages for testing
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
CanSubmitPackagesForTesting bool `json:"CanSubmitPackagesForTesting,omitempty"`
// can tag plant batches
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanTagPlantBatches bool `json:"CanTagPlantBatches,omitempty"`
// can test packages
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanTestPackages bool `json:"CanTestPackages,omitempty"`
// can track vegetative plants
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
CanTrackVegetativePlants bool `json:"CanTrackVegetativePlants,omitempty"`
// can transfer from external facilities
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
CanTransferFromExternalFacilities bool `json:"CanTransferFromExternalFacilities,omitempty"`
// can update plant strains
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
CanUpdatePlantStrains bool `json:"CanUpdatePlantStrains,omitempty"`
// is medical
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
IsMedical bool `json:"IsMedical,omitempty"`
// is retail
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
IsRetail bool `json:"IsRetail,omitempty"`
// packages require patient affiliation
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
PackagesRequirePatientAffiliation bool `json:"PackagesRequirePatientAffiliation,omitempty"`
// plants require patient affiliation
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
PlantsRequirePatientAffiliation bool `json:"PlantsRequirePatientAffiliation,omitempty"`
// sales delivery require patient number
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
SalesDeliveryRequirePatientNumber bool `json:"SalesDeliveryRequirePatientNumber,omitempty"`
// sales require caregiver number
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
SalesRequireCaregiverNumber bool `json:"SalesRequireCaregiverNumber,omitempty"`
// sales require caregiver patient number
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
SalesRequireCaregiverPatientNumber bool `json:"SalesRequireCaregiverPatientNumber,omitempty"`
// sales require external patient identification method
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
SalesRequireExternalPatientIdentificationMethod bool `json:"SalesRequireExternalPatientIdentificationMethod,omitempty"`
// sales require external patient number
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
SalesRequireExternalPatientNumber bool `json:"SalesRequireExternalPatientNumber,omitempty"`
// sales require patient number
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
SalesRequirePatientNumber bool `json:"SalesRequirePatientNumber,omitempty"`
}
// Validate validates this facility facility type
func (m *FacilityFacilityType) Validate(formats strfmt.Registry) error {
return nil
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this facility facility type based on context it is used
func (m *FacilityFacilityType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// MarshalBinary interface implementation
func (m *FacilityFacilityType) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *FacilityFacilityType) UnmarshalBinary(b []byte) error {
var res FacilityFacilityType
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}