// 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"
)

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

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

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

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

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

	for the put vehicle vin filter ID operation.

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

	/* Config.

	   Vehicle filter data
	*/
	Config *models.HandlersVehicleFilterRequest

	/* ID.

	   CAN ID
	*/
	ID string

	/* Vin.

	   VIN
	*/
	Vin string

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

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

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

// WithTimeout adds the timeout to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) WithTimeout(timeout time.Duration) *PutVehicleVinFilterIDParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) WithContext(ctx context.Context) *PutVehicleVinFilterIDParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) WithHTTPClient(client *http.Client) *PutVehicleVinFilterIDParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithConfig adds the config to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) WithConfig(config *models.HandlersVehicleFilterRequest) *PutVehicleVinFilterIDParams {
	o.SetConfig(config)
	return o
}

// SetConfig adds the config to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) SetConfig(config *models.HandlersVehicleFilterRequest) {
	o.Config = config
}

// WithID adds the id to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) WithID(id string) *PutVehicleVinFilterIDParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) SetID(id string) {
	o.ID = id
}

// WithVin adds the vin to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) WithVin(vin string) *PutVehicleVinFilterIDParams {
	o.SetVin(vin)
	return o
}

// SetVin adds the vin to the put vehicle vin filter ID params
func (o *PutVehicleVinFilterIDParams) SetVin(vin string) {
	o.Vin = vin
}

// WriteToRequest writes these params to a swagger request
func (o *PutVehicleVinFilterIDParams) 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 vin
	if err := r.SetPathParam("vin", o.Vin); err != nil {
		return err
	}

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