// 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 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" "code.tnxs.net/taxnexus/lib/api/metrc-gw/metrc_gw_models" ) // NewPostRoomsParams creates a new PostRoomsParams object // with the default values initialized. func NewPostRoomsParams() *PostRoomsParams { var () return &PostRoomsParams{ timeout: cr.DefaultTimeout, } } // NewPostRoomsParamsWithTimeout creates a new PostRoomsParams object // with the default values initialized, and the ability to set a timeout on a request func NewPostRoomsParamsWithTimeout(timeout time.Duration) *PostRoomsParams { var () return &PostRoomsParams{ timeout: timeout, } } // NewPostRoomsParamsWithContext creates a new PostRoomsParams object // with the default values initialized, and the ability to set a context for a request func NewPostRoomsParamsWithContext(ctx context.Context) *PostRoomsParams { var () return &PostRoomsParams{ Context: ctx, } } // NewPostRoomsParamsWithHTTPClient creates a new PostRoomsParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request func NewPostRoomsParamsWithHTTPClient(client *http.Client) *PostRoomsParams { var () return &PostRoomsParams{ HTTPClient: client, } } /*PostRoomsParams contains all the parameters to send to the API endpoint for the post rooms operation typically these are written to a http.Request */ type PostRoomsParams struct { /*RoomRequest The New Rooms */ RoomRequest *metrc_gw_models.RoomRequest timeout time.Duration Context context.Context HTTPClient *http.Client } // WithTimeout adds the timeout to the post rooms params func (o *PostRoomsParams) WithTimeout(timeout time.Duration) *PostRoomsParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the post rooms params func (o *PostRoomsParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the post rooms params func (o *PostRoomsParams) WithContext(ctx context.Context) *PostRoomsParams { o.SetContext(ctx) return o } // SetContext adds the context to the post rooms params func (o *PostRoomsParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the post rooms params func (o *PostRoomsParams) WithHTTPClient(client *http.Client) *PostRoomsParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the post rooms params func (o *PostRoomsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithRoomRequest adds the roomRequest to the post rooms params func (o *PostRoomsParams) WithRoomRequest(roomRequest *metrc_gw_models.RoomRequest) *PostRoomsParams { o.SetRoomRequest(roomRequest) return o } // SetRoomRequest adds the roomRequest to the post rooms params func (o *PostRoomsParams) SetRoomRequest(roomRequest *metrc_gw_models.RoomRequest) { o.RoomRequest = roomRequest } // WriteToRequest writes these params to a swagger request func (o *PostRoomsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.RoomRequest != nil { if err := r.SetBodyParam(o.RoomRequest); err != nil { return err } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }