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

package assets

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

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

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

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

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

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

	for the get asset by Id operation.

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

	/* ID.

	   Id of the asset to get
	*/
	ID string

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

// WithDefaults hydrates default values in the get asset by Id params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetAssetByIDParams) WithDefaults() *GetAssetByIDParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the get asset by Id params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetAssetByIDParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the get asset by Id params
func (o *GetAssetByIDParams) WithTimeout(timeout time.Duration) *GetAssetByIDParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get asset by Id params
func (o *GetAssetByIDParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get asset by Id params
func (o *GetAssetByIDParams) WithContext(ctx context.Context) *GetAssetByIDParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get asset by Id params
func (o *GetAssetByIDParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get asset by Id params
func (o *GetAssetByIDParams) WithHTTPClient(client *http.Client) *GetAssetByIDParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get asset by Id params
func (o *GetAssetByIDParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithID adds the id to the get asset by Id params
func (o *GetAssetByIDParams) WithID(id string) *GetAssetByIDParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the get asset by Id params
func (o *GetAssetByIDParams) SetID(id string) {
	o.ID = id
}

// WriteToRequest writes these params to a swagger request
func (o *GetAssetByIDParams) 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 len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
