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

package kubectl_cluster_settings

// 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/RafayLabs/rcloud-base/api/def/clients/sentry/models"
)

// NewKubectlClusterSettingsUpdateKubectlClusterSettingsParams creates a new KubectlClusterSettingsUpdateKubectlClusterSettingsParams 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.
func NewKubectlClusterSettingsUpdateKubectlClusterSettingsParams() *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	return &KubectlClusterSettingsUpdateKubectlClusterSettingsParams{
		timeout: cr.DefaultTimeout,
	}
}

// NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithTimeout creates a new KubectlClusterSettingsUpdateKubectlClusterSettingsParams object
// with the ability to set a timeout on a request.
func NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithTimeout(timeout time.Duration) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	return &KubectlClusterSettingsUpdateKubectlClusterSettingsParams{
		timeout: timeout,
	}
}

// NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithContext creates a new KubectlClusterSettingsUpdateKubectlClusterSettingsParams object
// with the ability to set a context for a request.
func NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithContext(ctx context.Context) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	return &KubectlClusterSettingsUpdateKubectlClusterSettingsParams{
		Context: ctx,
	}
}

// NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithHTTPClient creates a new KubectlClusterSettingsUpdateKubectlClusterSettingsParams object
// with the ability to set a custom HTTPClient for a request.
func NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithHTTPClient(client *http.Client) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	return &KubectlClusterSettingsUpdateKubectlClusterSettingsParams{
		HTTPClient: client,
	}
}

/* KubectlClusterSettingsUpdateKubectlClusterSettingsParams contains all the parameters to send to the API endpoint
   for the kubectl cluster settings update kubectl cluster settings operation.

   Typically these are written to a http.Request.
*/
type KubectlClusterSettingsUpdateKubectlClusterSettingsParams struct {

	// Body.
	Body *models.RPCUpdateKubectlClusterSettingsRequest

	/* OptsURLScope.

	   urlScope is supposed to be passed in the URL as kind/HashID(value)
	*/
	OptsURLScope string

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

// WithDefaults hydrates default values in the kubectl cluster settings update kubectl cluster settings params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithDefaults() *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the kubectl cluster settings update kubectl cluster settings params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithTimeout(timeout time.Duration) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithContext(ctx context.Context) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithHTTPClient(client *http.Client) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithBody(body *models.RPCUpdateKubectlClusterSettingsRequest) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetBody(body *models.RPCUpdateKubectlClusterSettingsRequest) {
	o.Body = body
}

// WithOptsURLScope adds the optsURLScope to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithOptsURLScope(optsURLScope string) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams {
	o.SetOptsURLScope(optsURLScope)
	return o
}

// SetOptsURLScope adds the optsUrlScope to the kubectl cluster settings update kubectl cluster settings params
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetOptsURLScope(optsURLScope string) {
	o.OptsURLScope = optsURLScope
}

// WriteToRequest writes these params to a swagger request
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	if err := r.SetTimeout(o.timeout); err != nil {
		return err
	}
	var res []error
	if o.Body != nil {
		if err := r.SetBodyParam(o.Body); err != nil {
			return err
		}
	}

	// path param opts.urlScope
	if err := r.SetPathParam("opts.urlScope", o.OptsURLScope); err != nil {
		return err
	}

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