// Code generated by go-swagger; DO NOT EDIT.

package sku_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"
)

// NewUpdateSkuParams creates a new UpdateSkuParams object
// with the default values initialized.
func NewUpdateSkuParams() *UpdateSkuParams {
	var ()
	return &UpdateSkuParams{

		timeout: cr.DefaultTimeout,
	}
}

// NewUpdateSkuParamsWithTimeout creates a new UpdateSkuParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewUpdateSkuParamsWithTimeout(timeout time.Duration) *UpdateSkuParams {
	var ()
	return &UpdateSkuParams{

		timeout: timeout,
	}
}

// NewUpdateSkuParamsWithContext creates a new UpdateSkuParams object
// with the default values initialized, and the ability to set a context for a request
func NewUpdateSkuParamsWithContext(ctx context.Context) *UpdateSkuParams {
	var ()
	return &UpdateSkuParams{

		Context: ctx,
	}
}

// NewUpdateSkuParamsWithHTTPClient creates a new UpdateSkuParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewUpdateSkuParamsWithHTTPClient(client *http.Client) *UpdateSkuParams {
	var ()
	return &UpdateSkuParams{
		HTTPClient: client,
	}
}

/*UpdateSkuParams contains all the parameters to send to the API endpoint
for the update sku operation typically these are written to a http.Request
*/
type UpdateSkuParams struct {

	/*ID
	  Id of sku to be obtained

	*/
	ID string
	/*Sku
	  updated sku containing all parameters except id

	*/
	Sku *models.Sku

	timeout    time.Duration
	Context    context.Context
	HTTPClient *http.Client
}

// WithTimeout adds the timeout to the update sku params
func (o *UpdateSkuParams) WithTimeout(timeout time.Duration) *UpdateSkuParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the update sku params
func (o *UpdateSkuParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the update sku params
func (o *UpdateSkuParams) WithContext(ctx context.Context) *UpdateSkuParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the update sku params
func (o *UpdateSkuParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the update sku params
func (o *UpdateSkuParams) WithHTTPClient(client *http.Client) *UpdateSkuParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the update sku params
func (o *UpdateSkuParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithID adds the id to the update sku params
func (o *UpdateSkuParams) WithID(id string) *UpdateSkuParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the update sku params
func (o *UpdateSkuParams) SetID(id string) {
	o.ID = id
}

// WithSku adds the sku to the update sku params
func (o *UpdateSkuParams) WithSku(sku *models.Sku) *UpdateSkuParams {
	o.SetSku(sku)
	return o
}

// SetSku adds the sku to the update sku params
func (o *UpdateSkuParams) SetSku(sku *models.Sku) {
	o.Sku = sku
}

// WriteToRequest writes these params to a swagger request
func (o *UpdateSkuParams) 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.Sku != nil {
		if err := r.SetBodyParam(o.Sku); err != nil {
			return err
		}
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
