508 lines
12 KiB
Go
508 lines
12 KiB
Go
// 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 transfers
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
"time"
|
|
|
|
"github.com/go-openapi/errors"
|
|
"github.com/go-openapi/runtime"
|
|
cr "github.com/go-openapi/runtime/client"
|
|
"github.com/go-openapi/strfmt"
|
|
"github.com/go-openapi/swag"
|
|
)
|
|
|
|
// NewGetTransfersParams creates a new GetTransfersParams object
|
|
// with the default values initialized.
|
|
func NewGetTransfersParams() *GetTransfersParams {
|
|
var ()
|
|
return &GetTransfersParams{
|
|
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewGetTransfersParamsWithTimeout creates a new GetTransfersParams object
|
|
// with the default values initialized, and the ability to set a timeout on a request
|
|
func NewGetTransfersParamsWithTimeout(timeout time.Duration) *GetTransfersParams {
|
|
var ()
|
|
return &GetTransfersParams{
|
|
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewGetTransfersParamsWithContext creates a new GetTransfersParams object
|
|
// with the default values initialized, and the ability to set a context for a request
|
|
func NewGetTransfersParamsWithContext(ctx context.Context) *GetTransfersParams {
|
|
var ()
|
|
return &GetTransfersParams{
|
|
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewGetTransfersParamsWithHTTPClient creates a new GetTransfersParams object
|
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
func NewGetTransfersParamsWithHTTPClient(client *http.Client) *GetTransfersParams {
|
|
var ()
|
|
return &GetTransfersParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*GetTransfersParams contains all the parameters to send to the API endpoint
|
|
for the get transfers operation typically these are written to a http.Request
|
|
*/
|
|
type GetTransfersParams struct {
|
|
|
|
/*Active
|
|
Get Active objects?
|
|
|
|
*/
|
|
Active *bool
|
|
/*DeliveryID
|
|
The Sales Delivery Number
|
|
|
|
*/
|
|
DeliveryID *string
|
|
/*ItemID
|
|
The Item Number
|
|
|
|
*/
|
|
ItemID *float64
|
|
/*Label
|
|
The METRC Package Label
|
|
|
|
*/
|
|
Label *string
|
|
/*LastModifiedEnd
|
|
The last modified end timestamp
|
|
|
|
*/
|
|
LastModifiedEnd *string
|
|
/*LastModifiedStart
|
|
The last modified start timestamp
|
|
|
|
*/
|
|
LastModifiedStart *string
|
|
/*License
|
|
The Licnese Number for the query
|
|
|
|
*/
|
|
License string
|
|
/*Onhold
|
|
Get On Hold objects?
|
|
|
|
*/
|
|
Onhold *bool
|
|
/*PackageID
|
|
The METRC Package Number
|
|
|
|
*/
|
|
PackageID *string
|
|
/*Production
|
|
Use Production API?
|
|
|
|
*/
|
|
Production *bool
|
|
/*Reseller
|
|
The METRC Reseller Key
|
|
|
|
*/
|
|
Reseller string
|
|
/*State
|
|
The 2-character State Code
|
|
|
|
*/
|
|
State string
|
|
/*User
|
|
The METRC User Key
|
|
|
|
*/
|
|
User string
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the get transfers params
|
|
func (o *GetTransfersParams) WithTimeout(timeout time.Duration) *GetTransfersParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the get transfers params
|
|
func (o *GetTransfersParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the get transfers params
|
|
func (o *GetTransfersParams) WithContext(ctx context.Context) *GetTransfersParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the get transfers params
|
|
func (o *GetTransfersParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the get transfers params
|
|
func (o *GetTransfersParams) WithHTTPClient(client *http.Client) *GetTransfersParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the get transfers params
|
|
func (o *GetTransfersParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithActive adds the active to the get transfers params
|
|
func (o *GetTransfersParams) WithActive(active *bool) *GetTransfersParams {
|
|
o.SetActive(active)
|
|
return o
|
|
}
|
|
|
|
// SetActive adds the active to the get transfers params
|
|
func (o *GetTransfersParams) SetActive(active *bool) {
|
|
o.Active = active
|
|
}
|
|
|
|
// WithDeliveryID adds the deliveryID to the get transfers params
|
|
func (o *GetTransfersParams) WithDeliveryID(deliveryID *string) *GetTransfersParams {
|
|
o.SetDeliveryID(deliveryID)
|
|
return o
|
|
}
|
|
|
|
// SetDeliveryID adds the deliveryId to the get transfers params
|
|
func (o *GetTransfersParams) SetDeliveryID(deliveryID *string) {
|
|
o.DeliveryID = deliveryID
|
|
}
|
|
|
|
// WithItemID adds the itemID to the get transfers params
|
|
func (o *GetTransfersParams) WithItemID(itemID *float64) *GetTransfersParams {
|
|
o.SetItemID(itemID)
|
|
return o
|
|
}
|
|
|
|
// SetItemID adds the itemId to the get transfers params
|
|
func (o *GetTransfersParams) SetItemID(itemID *float64) {
|
|
o.ItemID = itemID
|
|
}
|
|
|
|
// WithLabel adds the label to the get transfers params
|
|
func (o *GetTransfersParams) WithLabel(label *string) *GetTransfersParams {
|
|
o.SetLabel(label)
|
|
return o
|
|
}
|
|
|
|
// SetLabel adds the label to the get transfers params
|
|
func (o *GetTransfersParams) SetLabel(label *string) {
|
|
o.Label = label
|
|
}
|
|
|
|
// WithLastModifiedEnd adds the lastModifiedEnd to the get transfers params
|
|
func (o *GetTransfersParams) WithLastModifiedEnd(lastModifiedEnd *string) *GetTransfersParams {
|
|
o.SetLastModifiedEnd(lastModifiedEnd)
|
|
return o
|
|
}
|
|
|
|
// SetLastModifiedEnd adds the lastModifiedEnd to the get transfers params
|
|
func (o *GetTransfersParams) SetLastModifiedEnd(lastModifiedEnd *string) {
|
|
o.LastModifiedEnd = lastModifiedEnd
|
|
}
|
|
|
|
// WithLastModifiedStart adds the lastModifiedStart to the get transfers params
|
|
func (o *GetTransfersParams) WithLastModifiedStart(lastModifiedStart *string) *GetTransfersParams {
|
|
o.SetLastModifiedStart(lastModifiedStart)
|
|
return o
|
|
}
|
|
|
|
// SetLastModifiedStart adds the lastModifiedStart to the get transfers params
|
|
func (o *GetTransfersParams) SetLastModifiedStart(lastModifiedStart *string) {
|
|
o.LastModifiedStart = lastModifiedStart
|
|
}
|
|
|
|
// WithLicense adds the license to the get transfers params
|
|
func (o *GetTransfersParams) WithLicense(license string) *GetTransfersParams {
|
|
o.SetLicense(license)
|
|
return o
|
|
}
|
|
|
|
// SetLicense adds the license to the get transfers params
|
|
func (o *GetTransfersParams) SetLicense(license string) {
|
|
o.License = license
|
|
}
|
|
|
|
// WithOnhold adds the onhold to the get transfers params
|
|
func (o *GetTransfersParams) WithOnhold(onhold *bool) *GetTransfersParams {
|
|
o.SetOnhold(onhold)
|
|
return o
|
|
}
|
|
|
|
// SetOnhold adds the onhold to the get transfers params
|
|
func (o *GetTransfersParams) SetOnhold(onhold *bool) {
|
|
o.Onhold = onhold
|
|
}
|
|
|
|
// WithPackageID adds the packageID to the get transfers params
|
|
func (o *GetTransfersParams) WithPackageID(packageID *string) *GetTransfersParams {
|
|
o.SetPackageID(packageID)
|
|
return o
|
|
}
|
|
|
|
// SetPackageID adds the packageId to the get transfers params
|
|
func (o *GetTransfersParams) SetPackageID(packageID *string) {
|
|
o.PackageID = packageID
|
|
}
|
|
|
|
// WithProduction adds the production to the get transfers params
|
|
func (o *GetTransfersParams) WithProduction(production *bool) *GetTransfersParams {
|
|
o.SetProduction(production)
|
|
return o
|
|
}
|
|
|
|
// SetProduction adds the production to the get transfers params
|
|
func (o *GetTransfersParams) SetProduction(production *bool) {
|
|
o.Production = production
|
|
}
|
|
|
|
// WithReseller adds the reseller to the get transfers params
|
|
func (o *GetTransfersParams) WithReseller(reseller string) *GetTransfersParams {
|
|
o.SetReseller(reseller)
|
|
return o
|
|
}
|
|
|
|
// SetReseller adds the reseller to the get transfers params
|
|
func (o *GetTransfersParams) SetReseller(reseller string) {
|
|
o.Reseller = reseller
|
|
}
|
|
|
|
// WithState adds the state to the get transfers params
|
|
func (o *GetTransfersParams) WithState(state string) *GetTransfersParams {
|
|
o.SetState(state)
|
|
return o
|
|
}
|
|
|
|
// SetState adds the state to the get transfers params
|
|
func (o *GetTransfersParams) SetState(state string) {
|
|
o.State = state
|
|
}
|
|
|
|
// WithUser adds the user to the get transfers params
|
|
func (o *GetTransfersParams) WithUser(user string) *GetTransfersParams {
|
|
o.SetUser(user)
|
|
return o
|
|
}
|
|
|
|
// SetUser adds the user to the get transfers params
|
|
func (o *GetTransfersParams) SetUser(user string) {
|
|
o.User = user
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *GetTransfersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
if o.Active != nil {
|
|
|
|
// query param active
|
|
var qrActive bool
|
|
if o.Active != nil {
|
|
qrActive = *o.Active
|
|
}
|
|
qActive := swag.FormatBool(qrActive)
|
|
if qActive != "" {
|
|
if err := r.SetQueryParam("active", qActive); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if o.DeliveryID != nil {
|
|
|
|
// query param deliveryId
|
|
var qrDeliveryID string
|
|
if o.DeliveryID != nil {
|
|
qrDeliveryID = *o.DeliveryID
|
|
}
|
|
qDeliveryID := qrDeliveryID
|
|
if qDeliveryID != "" {
|
|
if err := r.SetQueryParam("deliveryId", qDeliveryID); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if o.ItemID != nil {
|
|
|
|
// query param itemId
|
|
var qrItemID float64
|
|
if o.ItemID != nil {
|
|
qrItemID = *o.ItemID
|
|
}
|
|
qItemID := swag.FormatFloat64(qrItemID)
|
|
if qItemID != "" {
|
|
if err := r.SetQueryParam("itemId", qItemID); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if o.Label != nil {
|
|
|
|
// query param label
|
|
var qrLabel string
|
|
if o.Label != nil {
|
|
qrLabel = *o.Label
|
|
}
|
|
qLabel := qrLabel
|
|
if qLabel != "" {
|
|
if err := r.SetQueryParam("label", qLabel); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if o.LastModifiedEnd != nil {
|
|
|
|
// query param lastModifiedEnd
|
|
var qrLastModifiedEnd string
|
|
if o.LastModifiedEnd != nil {
|
|
qrLastModifiedEnd = *o.LastModifiedEnd
|
|
}
|
|
qLastModifiedEnd := qrLastModifiedEnd
|
|
if qLastModifiedEnd != "" {
|
|
if err := r.SetQueryParam("lastModifiedEnd", qLastModifiedEnd); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if o.LastModifiedStart != nil {
|
|
|
|
// query param lastModifiedStart
|
|
var qrLastModifiedStart string
|
|
if o.LastModifiedStart != nil {
|
|
qrLastModifiedStart = *o.LastModifiedStart
|
|
}
|
|
qLastModifiedStart := qrLastModifiedStart
|
|
if qLastModifiedStart != "" {
|
|
if err := r.SetQueryParam("lastModifiedStart", qLastModifiedStart); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
// query param license
|
|
qrLicense := o.License
|
|
qLicense := qrLicense
|
|
if qLicense != "" {
|
|
if err := r.SetQueryParam("license", qLicense); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if o.Onhold != nil {
|
|
|
|
// query param onhold
|
|
var qrOnhold bool
|
|
if o.Onhold != nil {
|
|
qrOnhold = *o.Onhold
|
|
}
|
|
qOnhold := swag.FormatBool(qrOnhold)
|
|
if qOnhold != "" {
|
|
if err := r.SetQueryParam("onhold", qOnhold); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if o.PackageID != nil {
|
|
|
|
// query param packageId
|
|
var qrPackageID string
|
|
if o.PackageID != nil {
|
|
qrPackageID = *o.PackageID
|
|
}
|
|
qPackageID := qrPackageID
|
|
if qPackageID != "" {
|
|
if err := r.SetQueryParam("packageId", qPackageID); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if o.Production != nil {
|
|
|
|
// query param production
|
|
var qrProduction bool
|
|
if o.Production != nil {
|
|
qrProduction = *o.Production
|
|
}
|
|
qProduction := swag.FormatBool(qrProduction)
|
|
if qProduction != "" {
|
|
if err := r.SetQueryParam("production", qProduction); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
// query param reseller
|
|
qrReseller := o.Reseller
|
|
qReseller := qrReseller
|
|
if qReseller != "" {
|
|
if err := r.SetQueryParam("reseller", qReseller); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
// query param state
|
|
qrState := o.State
|
|
qState := qrState
|
|
if qState != "" {
|
|
if err := r.SetQueryParam("state", qState); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
// query param user
|
|
qrUser := o.User
|
|
qUser := qrUser
|
|
if qUser != "" {
|
|
if err := r.SetQueryParam("user", qUser); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|