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

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

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

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

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

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

	for the get vehicle vin trex logs link operation.

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

	/* Day.

	   Day of file
	*/
	Day string

	/* Month.

	   Month of file
	*/
	Month string

	/* Vin.

	   Car vin
	*/
	Vin string

	/* Year.

	   Year of file
	*/
	Year string

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

// WithDefaults hydrates default values in the get vehicle vin trex logs link params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetVehicleVinTrexLogsLinkParams) WithDefaults() *GetVehicleVinTrexLogsLinkParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the get vehicle vin trex logs link params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetVehicleVinTrexLogsLinkParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) WithTimeout(timeout time.Duration) *GetVehicleVinTrexLogsLinkParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) WithContext(ctx context.Context) *GetVehicleVinTrexLogsLinkParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) WithHTTPClient(client *http.Client) *GetVehicleVinTrexLogsLinkParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithDay adds the day to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) WithDay(day string) *GetVehicleVinTrexLogsLinkParams {
	o.SetDay(day)
	return o
}

// SetDay adds the day to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) SetDay(day string) {
	o.Day = day
}

// WithMonth adds the month to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) WithMonth(month string) *GetVehicleVinTrexLogsLinkParams {
	o.SetMonth(month)
	return o
}

// SetMonth adds the month to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) SetMonth(month string) {
	o.Month = month
}

// WithVin adds the vin to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) WithVin(vin string) *GetVehicleVinTrexLogsLinkParams {
	o.SetVin(vin)
	return o
}

// SetVin adds the vin to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) SetVin(vin string) {
	o.Vin = vin
}

// WithYear adds the year to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) WithYear(year string) *GetVehicleVinTrexLogsLinkParams {
	o.SetYear(year)
	return o
}

// SetYear adds the year to the get vehicle vin trex logs link params
func (o *GetVehicleVinTrexLogsLinkParams) SetYear(year string) {
	o.Year = year
}

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

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

	// query param day
	qrDay := o.Day
	qDay := qrDay
	if qDay != "" {

		if err := r.SetQueryParam("day", qDay); err != nil {
			return err
		}
	}

	// query param month
	qrMonth := o.Month
	qMonth := qrMonth
	if qMonth != "" {

		if err := r.SetQueryParam("month", qMonth); err != nil {
			return err
		}
	}

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

	// query param year
	qrYear := o.Year
	qYear := qrYear
	if qYear != "" {

		if err := r.SetQueryParam("year", qYear); err != nil {
			return err
		}
	}

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