You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
159 lines
4.1 KiB
159 lines
4.1 KiB
// 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"
|
|
)
|
|
|
|
// NewUpdateSkuPriceParams creates a new UpdateSkuPriceParams object
|
|
// with the default values initialized.
|
|
func NewUpdateSkuPriceParams() *UpdateSkuPriceParams {
|
|
var ()
|
|
return &UpdateSkuPriceParams{
|
|
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewUpdateSkuPriceParamsWithTimeout creates a new UpdateSkuPriceParams object
|
|
// with the default values initialized, and the ability to set a timeout on a request
|
|
func NewUpdateSkuPriceParamsWithTimeout(timeout time.Duration) *UpdateSkuPriceParams {
|
|
var ()
|
|
return &UpdateSkuPriceParams{
|
|
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewUpdateSkuPriceParamsWithContext creates a new UpdateSkuPriceParams object
|
|
// with the default values initialized, and the ability to set a context for a request
|
|
func NewUpdateSkuPriceParamsWithContext(ctx context.Context) *UpdateSkuPriceParams {
|
|
var ()
|
|
return &UpdateSkuPriceParams{
|
|
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewUpdateSkuPriceParamsWithHTTPClient creates a new UpdateSkuPriceParams object
|
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
func NewUpdateSkuPriceParamsWithHTTPClient(client *http.Client) *UpdateSkuPriceParams {
|
|
var ()
|
|
return &UpdateSkuPriceParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*UpdateSkuPriceParams contains all the parameters to send to the API endpoint
|
|
for the update sku price operation typically these are written to a http.Request
|
|
*/
|
|
type UpdateSkuPriceParams struct {
|
|
|
|
/*ID
|
|
Id of sku price to be obtained
|
|
|
|
*/
|
|
ID string
|
|
/*Price
|
|
updated sku containing all parameters except id
|
|
|
|
*/
|
|
Price *models.SkuPrice
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the update sku price params
|
|
func (o *UpdateSkuPriceParams) WithTimeout(timeout time.Duration) *UpdateSkuPriceParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the update sku price params
|
|
func (o *UpdateSkuPriceParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the update sku price params
|
|
func (o *UpdateSkuPriceParams) WithContext(ctx context.Context) *UpdateSkuPriceParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the update sku price params
|
|
func (o *UpdateSkuPriceParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the update sku price params
|
|
func (o *UpdateSkuPriceParams) WithHTTPClient(client *http.Client) *UpdateSkuPriceParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the update sku price params
|
|
func (o *UpdateSkuPriceParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithID adds the id to the update sku price params
|
|
func (o *UpdateSkuPriceParams) WithID(id string) *UpdateSkuPriceParams {
|
|
o.SetID(id)
|
|
return o
|
|
}
|
|
|
|
// SetID adds the id to the update sku price params
|
|
func (o *UpdateSkuPriceParams) SetID(id string) {
|
|
o.ID = id
|
|
}
|
|
|
|
// WithPrice adds the price to the update sku price params
|
|
func (o *UpdateSkuPriceParams) WithPrice(price *models.SkuPrice) *UpdateSkuPriceParams {
|
|
o.SetPrice(price)
|
|
return o
|
|
}
|
|
|
|
// SetPrice adds the price to the update sku price params
|
|
func (o *UpdateSkuPriceParams) SetPrice(price *models.SkuPrice) {
|
|
o.Price = price
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *UpdateSkuPriceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
// path param id
|
|
if err := r.SetPathParam("id", o.ID); err != nil {
|
|
return err
|
|
}
|
|
|
|
if o.Price != nil {
|
|
if err := r.SetBodyParam(o.Price); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|