lib/api/metrc-gw/metrc_gw_client/rooms/delete_room_parameters.go

267 lines
6.3 KiB
Go
Raw 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 rooms
// 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"
)
2021-02-09 16:56:57 +00:00
// NewDeleteRoomParams creates a new DeleteRoomParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
2021-01-08 17:40:28 +00:00
func NewDeleteRoomParams() *DeleteRoomParams {
return &DeleteRoomParams{
timeout: cr.DefaultTimeout,
}
}
// NewDeleteRoomParamsWithTimeout creates a new DeleteRoomParams object
2021-02-09 16:56:57 +00:00
// with the ability to set a timeout on a request.
2021-01-08 17:40:28 +00:00
func NewDeleteRoomParamsWithTimeout(timeout time.Duration) *DeleteRoomParams {
return &DeleteRoomParams{
timeout: timeout,
}
}
// NewDeleteRoomParamsWithContext creates a new DeleteRoomParams object
2021-02-09 16:56:57 +00:00
// with the ability to set a context for a request.
2021-01-08 17:40:28 +00:00
func NewDeleteRoomParamsWithContext(ctx context.Context) *DeleteRoomParams {
return &DeleteRoomParams{
Context: ctx,
}
}
// NewDeleteRoomParamsWithHTTPClient creates a new DeleteRoomParams object
2021-02-09 16:56:57 +00:00
// with the ability to set a custom HTTPClient for a request.
2021-01-08 17:40:28 +00:00
func NewDeleteRoomParamsWithHTTPClient(client *http.Client) *DeleteRoomParams {
return &DeleteRoomParams{
HTTPClient: client,
}
}
2021-02-09 16:56:57 +00:00
/* DeleteRoomParams contains all the parameters to send to the API endpoint
for the delete room operation.
Typically these are written to a http.Request.
2021-01-08 17:40:28 +00:00
*/
type DeleteRoomParams struct {
2021-02-09 16:56:57 +00:00
/* License.
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
The Licnese Number for the query
2021-01-08 17:40:28 +00:00
*/
License string
2021-02-09 16:56:57 +00:00
/* Reseller.
The METRC Reseller Key
2021-01-08 17:40:28 +00:00
*/
Reseller string
2021-02-09 16:56:57 +00:00
/* RoomNumber.
The Room ID number
2021-01-08 17:40:28 +00:00
*/
RoomNumber string
2021-02-09 16:56:57 +00:00
/* State.
The 2-character State Code
2021-01-08 17:40:28 +00:00
*/
State string
2021-02-09 16:56:57 +00:00
/* User.
The METRC User Key
2021-01-08 17:40:28 +00:00
*/
User string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
2021-02-09 16:56:57 +00:00
// WithDefaults hydrates default values in the delete room params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteRoomParams) WithDefaults() *DeleteRoomParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the delete room params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteRoomParams) SetDefaults() {
// no default values defined for this parameter
}
2021-01-08 17:40:28 +00:00
// WithTimeout adds the timeout to the delete room params
func (o *DeleteRoomParams) WithTimeout(timeout time.Duration) *DeleteRoomParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the delete room params
func (o *DeleteRoomParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the delete room params
func (o *DeleteRoomParams) WithContext(ctx context.Context) *DeleteRoomParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the delete room params
func (o *DeleteRoomParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the delete room params
func (o *DeleteRoomParams) WithHTTPClient(client *http.Client) *DeleteRoomParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the delete room params
func (o *DeleteRoomParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithLicense adds the license to the delete room params
func (o *DeleteRoomParams) WithLicense(license string) *DeleteRoomParams {
o.SetLicense(license)
return o
}
// SetLicense adds the license to the delete room params
func (o *DeleteRoomParams) SetLicense(license string) {
o.License = license
}
// WithReseller adds the reseller to the delete room params
func (o *DeleteRoomParams) WithReseller(reseller string) *DeleteRoomParams {
o.SetReseller(reseller)
return o
}
// SetReseller adds the reseller to the delete room params
func (o *DeleteRoomParams) SetReseller(reseller string) {
o.Reseller = reseller
}
// WithRoomNumber adds the roomNumber to the delete room params
func (o *DeleteRoomParams) WithRoomNumber(roomNumber string) *DeleteRoomParams {
o.SetRoomNumber(roomNumber)
return o
}
// SetRoomNumber adds the roomNumber to the delete room params
func (o *DeleteRoomParams) SetRoomNumber(roomNumber string) {
o.RoomNumber = roomNumber
}
// WithState adds the state to the delete room params
func (o *DeleteRoomParams) WithState(state string) *DeleteRoomParams {
o.SetState(state)
return o
}
// SetState adds the state to the delete room params
func (o *DeleteRoomParams) SetState(state string) {
o.State = state
}
// WithUser adds the user to the delete room params
func (o *DeleteRoomParams) WithUser(user string) *DeleteRoomParams {
o.SetUser(user)
return o
}
// SetUser adds the user to the delete room params
func (o *DeleteRoomParams) SetUser(user string) {
o.User = user
}
// WriteToRequest writes these params to a swagger request
func (o *DeleteRoomParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// query param license
qrLicense := o.License
qLicense := qrLicense
if qLicense != "" {
2021-02-09 16:56:57 +00:00
2021-01-08 17:40:28 +00:00
if err := r.SetQueryParam("license", qLicense); err != nil {
return err
}
}
// query param reseller
qrReseller := o.Reseller
qReseller := qrReseller
if qReseller != "" {
2021-02-09 16:56:57 +00:00
2021-01-08 17:40:28 +00:00
if err := r.SetQueryParam("reseller", qReseller); err != nil {
return err
}
}
// query param roomNumber
qrRoomNumber := o.RoomNumber
qRoomNumber := qrRoomNumber
if qRoomNumber != "" {
2021-02-09 16:56:57 +00:00
2021-01-08 17:40:28 +00:00
if err := r.SetQueryParam("roomNumber", qRoomNumber); err != nil {
return err
}
}
// query param state
qrState := o.State
qState := qrState
if qState != "" {
2021-02-09 16:56:57 +00:00
2021-01-08 17:40:28 +00:00
if err := r.SetQueryParam("state", qState); err != nil {
return err
}
}
// query param user
qrUser := o.User
qUser := qrUser
if qUser != "" {
2021-02-09 16:56:57 +00:00
2021-01-08 17:40:28 +00:00
if err := r.SetQueryParam("user", qUser); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}