// Code generated by go-swagger; DO NOT EDIT. package price_management // 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/Cyclops-Labs/cyclops-4-hpc.git/services/plan-manager/models" ) // NewCreateSkuPriceParams creates a new CreateSkuPriceParams object // with the default values initialized. func NewCreateSkuPriceParams() *CreateSkuPriceParams { var () return &CreateSkuPriceParams{ timeout: cr.DefaultTimeout, } } // NewCreateSkuPriceParamsWithTimeout creates a new CreateSkuPriceParams object // with the default values initialized, and the ability to set a timeout on a request func NewCreateSkuPriceParamsWithTimeout(timeout time.Duration) *CreateSkuPriceParams { var () return &CreateSkuPriceParams{ timeout: timeout, } } // NewCreateSkuPriceParamsWithContext creates a new CreateSkuPriceParams object // with the default values initialized, and the ability to set a context for a request func NewCreateSkuPriceParamsWithContext(ctx context.Context) *CreateSkuPriceParams { var () return &CreateSkuPriceParams{ Context: ctx, } } // NewCreateSkuPriceParamsWithHTTPClient creates a new CreateSkuPriceParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request func NewCreateSkuPriceParamsWithHTTPClient(client *http.Client) *CreateSkuPriceParams { var () return &CreateSkuPriceParams{ HTTPClient: client, } } /*CreateSkuPriceParams contains all the parameters to send to the API endpoint for the create sku price operation typically these are written to a http.Request */ type CreateSkuPriceParams struct { /*Price SKU price to be added */ Price *models.SkuPrice timeout time.Duration Context context.Context HTTPClient *http.Client } // WithTimeout adds the timeout to the create sku price params func (o *CreateSkuPriceParams) WithTimeout(timeout time.Duration) *CreateSkuPriceParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the create sku price params func (o *CreateSkuPriceParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the create sku price params func (o *CreateSkuPriceParams) WithContext(ctx context.Context) *CreateSkuPriceParams { o.SetContext(ctx) return o } // SetContext adds the context to the create sku price params func (o *CreateSkuPriceParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the create sku price params func (o *CreateSkuPriceParams) WithHTTPClient(client *http.Client) *CreateSkuPriceParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the create sku price params func (o *CreateSkuPriceParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithPrice adds the price to the create sku price params func (o *CreateSkuPriceParams) WithPrice(price *models.SkuPrice) *CreateSkuPriceParams { o.SetPrice(price) return o } // SetPrice adds the price to the create sku price params func (o *CreateSkuPriceParams) SetPrice(price *models.SkuPrice) { o.Price = price } // WriteToRequest writes these params to a swagger request func (o *CreateSkuPriceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Price != nil { if err := r.SetBodyParam(o.Price); err != nil { return err } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }