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

271 lines
7.5 KiB
Go
Raw Normal View History

2021-01-08 17:40:28 +00:00
// 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 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 (
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// Facility facility
//
// swagger:model Facility
type Facility struct {
// alias
Alias string `json:"Alias,omitempty"`
// credentialed date
CredentialedDate string `json:"CredentialedDate,omitempty"`
// display name
DisplayName string `json:"DisplayName,omitempty"`
// facility type
FacilityType *FacilityFacilityType `json:"FacilityType,omitempty"`
// hire date
HireDate string `json:"HireDate,omitempty"`
// is manager
IsManager bool `json:"IsManager,omitempty"`
// is owner
IsOwner bool `json:"IsOwner,omitempty"`
// license
License *License `json:"License,omitempty"`
// name
Name string `json:"Name,omitempty"`
// occupations
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
}
// 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
AdvancedSales bool `json:"AdvancedSales,omitempty"`
// can assign rooms to packages
CanAssignRoomsToPackages bool `json:"CanAssignRoomsToPackages,omitempty"`
// can assign rooms to plant batches
CanAssignRoomsToPlantBatches bool `json:"CanAssignRoomsToPlantBatches,omitempty"`
// can create derived packages
CanCreateDerivedPackages bool `json:"CanCreateDerivedPackages,omitempty"`
// can create opening balance packages
CanCreateOpeningBalancePackages bool `json:"CanCreateOpeningBalancePackages,omitempty"`
// can create process validation packages
CanCreateProcessValidationPackages bool `json:"CanCreateProcessValidationPackages,omitempty"`
// can deliver sales to consumers
CanDeliverSalesToConsumers bool `json:"CanDeliverSalesToConsumers,omitempty"`
// can deliver sales to patients
CanDeliverSalesToPatients bool `json:"CanDeliverSalesToPatients,omitempty"`
// can grow plants
CanGrowPlants bool `json:"CanGrowPlants,omitempty"`
// can have member patients
CanHaveMemberPatients bool `json:"CanHaveMemberPatients,omitempty"`
// can infuse products
CanInfuseProducts bool `json:"CanInfuseProducts,omitempty"`
// can package vegetative plants
CanPackageVegetativePlants bool `json:"CanPackageVegetativePlants,omitempty"`
// can remediate packages with failed lab results
CanRemediatePackagesWithFailedLabResults bool `json:"CanRemediatePackagesWithFailedLabResults,omitempty"`
// can report harvest schedules
CanReportHarvestSchedules bool `json:"CanReportHarvestSchedules,omitempty"`
// can report patients adverse responses
CanReportPatientsAdverseResponses bool `json:"CanReportPatientsAdverseResponses,omitempty"`
// can request product remediation
CanRequestProductRemediation bool `json:"CanRequestProductRemediation,omitempty"`
// can require harvest sample lab test batches
CanRequireHarvestSampleLabTestBatches bool `json:"CanRequireHarvestSampleLabTestBatches,omitempty"`
// can require package sample lab test batches
CanRequirePackageSampleLabTestBatches bool `json:"CanRequirePackageSampleLabTestBatches,omitempty"`
// can sell to caregivers
CanSellToCaregivers bool `json:"CanSellToCaregivers,omitempty"`
// can sell to consumers
CanSellToConsumers bool `json:"CanSellToConsumers,omitempty"`
// can sell to external patients
CanSellToExternalPatients bool `json:"CanSellToExternalPatients,omitempty"`
// can sell to patients
CanSellToPatients bool `json:"CanSellToPatients,omitempty"`
// can submit harvests for testing
CanSubmitHarvestsForTesting bool `json:"CanSubmitHarvestsForTesting,omitempty"`
// can submit packages for testing
CanSubmitPackagesForTesting bool `json:"CanSubmitPackagesForTesting,omitempty"`
// can tag plant batches
CanTagPlantBatches bool `json:"CanTagPlantBatches,omitempty"`
// can test packages
CanTestPackages bool `json:"CanTestPackages,omitempty"`
// can track vegetative plants
CanTrackVegetativePlants bool `json:"CanTrackVegetativePlants,omitempty"`
// can transfer from external facilities
CanTransferFromExternalFacilities bool `json:"CanTransferFromExternalFacilities,omitempty"`
// can update plant strains
CanUpdatePlantStrains bool `json:"CanUpdatePlantStrains,omitempty"`
// is medical
IsMedical bool `json:"IsMedical,omitempty"`
// is retail
IsRetail bool `json:"IsRetail,omitempty"`
// packages require patient affiliation
PackagesRequirePatientAffiliation bool `json:"PackagesRequirePatientAffiliation,omitempty"`
// plants require patient affiliation
PlantsRequirePatientAffiliation bool `json:"PlantsRequirePatientAffiliation,omitempty"`
// sales delivery require patient number
SalesDeliveryRequirePatientNumber bool `json:"SalesDeliveryRequirePatientNumber,omitempty"`
// sales require caregiver number
SalesRequireCaregiverNumber bool `json:"SalesRequireCaregiverNumber,omitempty"`
// sales require caregiver patient number
SalesRequireCaregiverPatientNumber bool `json:"SalesRequireCaregiverPatientNumber,omitempty"`
// sales require external patient identification method
SalesRequireExternalPatientIdentificationMethod bool `json:"SalesRequireExternalPatientIdentificationMethod,omitempty"`
// sales require external patient number
SalesRequireExternalPatientNumber bool `json:"SalesRequireExternalPatientNumber,omitempty"`
// sales require patient number
SalesRequirePatientNumber bool `json:"SalesRequirePatientNumber,omitempty"`
}
// Validate validates this facility facility type
func (m *FacilityFacilityType) Validate(formats strfmt.Registry) error {
return nil
}
// 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
}