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

package statuses

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

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

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

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

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

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

	for the status history get operation.

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

	/* ID.

	   Target status ID.
	*/
	ID string

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

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

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

// WithTimeout adds the timeout to the status history get params
func (o *StatusHistoryGetParams) WithTimeout(timeout time.Duration) *StatusHistoryGetParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the status history get params
func (o *StatusHistoryGetParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the status history get params
func (o *StatusHistoryGetParams) WithContext(ctx context.Context) *StatusHistoryGetParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the status history get params
func (o *StatusHistoryGetParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the status history get params
func (o *StatusHistoryGetParams) WithHTTPClient(client *http.Client) *StatusHistoryGetParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the status history get params
func (o *StatusHistoryGetParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithID adds the id to the status history get params
func (o *StatusHistoryGetParams) WithID(id string) *StatusHistoryGetParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the status history get params
func (o *StatusHistoryGetParams) SetID(id string) {
	o.ID = id
}

// WriteToRequest writes these params to a swagger request
func (o *StatusHistoryGetParams) 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
}
