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

package operations

// 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/fiskerinc/cloud-services/pkg/ota_api/models"
)

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

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

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

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

/*
PutFleetNameFilterIDParams contains all the parameters to send to the API endpoint

	for the put fleet name filter ID operation.

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

	/* Config.

	   Fleet filter data
	*/
	Config *models.CommonCANFilter

	/* ID.

	   CAN ID
	*/
	ID string

	/* Name.

	   Name
	*/
	Name string

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

// WithDefaults hydrates default values in the put fleet name filter ID params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutFleetNameFilterIDParams) WithDefaults() *PutFleetNameFilterIDParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the put fleet name filter ID params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutFleetNameFilterIDParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) WithTimeout(timeout time.Duration) *PutFleetNameFilterIDParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) WithContext(ctx context.Context) *PutFleetNameFilterIDParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) WithHTTPClient(client *http.Client) *PutFleetNameFilterIDParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithConfig adds the config to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) WithConfig(config *models.CommonCANFilter) *PutFleetNameFilterIDParams {
	o.SetConfig(config)
	return o
}

// SetConfig adds the config to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) SetConfig(config *models.CommonCANFilter) {
	o.Config = config
}

// WithID adds the id to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) WithID(id string) *PutFleetNameFilterIDParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) SetID(id string) {
	o.ID = id
}

// WithName adds the name to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) WithName(name string) *PutFleetNameFilterIDParams {
	o.SetName(name)
	return o
}

// SetName adds the name to the put fleet name filter ID params
func (o *PutFleetNameFilterIDParams) SetName(name string) {
	o.Name = name
}

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

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

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

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

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