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

package bootstrap

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

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

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

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

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

/* BootstrapRegisterBootstrapAgentParams contains all the parameters to send to the API endpoint
   for the bootstrap register bootstrap agent operation.

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

	// Body.
	Body BootstrapRegisterBootstrapAgentBody

	// TemplateToken.
	TemplateToken string

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

// WithDefaults hydrates default values in the bootstrap register bootstrap agent params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *BootstrapRegisterBootstrapAgentParams) WithDefaults() *BootstrapRegisterBootstrapAgentParams {
	o.SetDefaults()
	return o
}

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

// WithTimeout adds the timeout to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) WithTimeout(timeout time.Duration) *BootstrapRegisterBootstrapAgentParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) WithContext(ctx context.Context) *BootstrapRegisterBootstrapAgentParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) WithHTTPClient(client *http.Client) *BootstrapRegisterBootstrapAgentParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) WithBody(body BootstrapRegisterBootstrapAgentBody) *BootstrapRegisterBootstrapAgentParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) SetBody(body BootstrapRegisterBootstrapAgentBody) {
	o.Body = body
}

// WithTemplateToken adds the templateToken to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) WithTemplateToken(templateToken string) *BootstrapRegisterBootstrapAgentParams {
	o.SetTemplateToken(templateToken)
	return o
}

// SetTemplateToken adds the templateToken to the bootstrap register bootstrap agent params
func (o *BootstrapRegisterBootstrapAgentParams) SetTemplateToken(templateToken string) {
	o.TemplateToken = templateToken
}

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

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

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

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