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

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

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

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

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

/* BootstrapGetBootstrapAgentConfigParams contains all the parameters to send to the API endpoint
   for the bootstrap get bootstrap agent config operation.

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

	/* APIVersion.

	   API Version. API Version of the resource

	   Default: "infra.k8smgmt.io/v3"
	*/
	APIVersion *string

	/* Kind.

	   Kind. Kind of the resource

	   Default: "BootstrapAgent"
	*/
	Kind *string

	/* MetadataDescription.

	   Description. description of the resource
	*/
	MetadataDescription *string

	/* MetadataDisplayName.

	   Display Name. display name of the resource
	*/
	MetadataDisplayName *string

	// MetadataID.
	MetadataID *string

	// MetadataModifiedAt.
	//
	// Format: date-time
	MetadataModifiedAt *strfmt.DateTime

	/* MetadataName.

	   name of the resource
	*/
	MetadataName string

	/* MetadataOrganization.

	   Organization. Organization to which the resource belongs
	*/
	MetadataOrganization *string

	/* MetadataPartner.

	   Partner. Partner to which the resource belongs
	*/
	MetadataPartner *string

	/* MetadataProject.

	   Project. Project of the resource
	*/
	MetadataProject *string

	// SpecAgentMode.
	//
	// Default: "InCluster"
	SpecAgentMode *string

	// SpecTemplateRef.
	SpecTemplateRef string

	// SpecToken.
	SpecToken *string

	// StatusFingerprint.
	StatusFingerprint *string

	// StatusIPAddress.
	StatusIPAddress *string

	// StatusLastCheckedIn.
	//
	// Format: date-time
	StatusLastCheckedIn *strfmt.DateTime

	// StatusTokenState.
	//
	// Default: "NotSet"
	StatusTokenState *string

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

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

// SetDefaults hydrates default values in the bootstrap get bootstrap agent config params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *BootstrapGetBootstrapAgentConfigParams) SetDefaults() {
	var (
		aPIVersionDefault = string("infra.k8smgmt.io/v3")

		kindDefault = string("BootstrapAgent")

		specAgentModeDefault = string("InCluster")

		statusTokenStateDefault = string("NotSet")
	)

	val := BootstrapGetBootstrapAgentConfigParams{
		APIVersion:       &aPIVersionDefault,
		Kind:             &kindDefault,
		SpecAgentMode:    &specAgentModeDefault,
		StatusTokenState: &statusTokenStateDefault,
	}

	val.timeout = o.timeout
	val.Context = o.Context
	val.HTTPClient = o.HTTPClient
	*o = val
}

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

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

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

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

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

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

// WithAPIVersion adds the aPIVersion to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithAPIVersion(aPIVersion *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetAPIVersion(aPIVersion)
	return o
}

// SetAPIVersion adds the apiVersion to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetAPIVersion(aPIVersion *string) {
	o.APIVersion = aPIVersion
}

// WithKind adds the kind to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithKind(kind *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetKind(kind)
	return o
}

// SetKind adds the kind to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetKind(kind *string) {
	o.Kind = kind
}

// WithMetadataDescription adds the metadataDescription to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataDescription(metadataDescription *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetMetadataDescription(metadataDescription)
	return o
}

// SetMetadataDescription adds the metadataDescription to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataDescription(metadataDescription *string) {
	o.MetadataDescription = metadataDescription
}

// WithMetadataDisplayName adds the metadataDisplayName to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataDisplayName(metadataDisplayName *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetMetadataDisplayName(metadataDisplayName)
	return o
}

// SetMetadataDisplayName adds the metadataDisplayName to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataDisplayName(metadataDisplayName *string) {
	o.MetadataDisplayName = metadataDisplayName
}

// WithMetadataID adds the metadataID to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataID(metadataID *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetMetadataID(metadataID)
	return o
}

// SetMetadataID adds the metadataId to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataID(metadataID *string) {
	o.MetadataID = metadataID
}

// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapGetBootstrapAgentConfigParams {
	o.SetMetadataModifiedAt(metadataModifiedAt)
	return o
}

// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) {
	o.MetadataModifiedAt = metadataModifiedAt
}

// WithMetadataName adds the metadataName to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataName(metadataName string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetMetadataName(metadataName)
	return o
}

// SetMetadataName adds the metadataName to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataName(metadataName string) {
	o.MetadataName = metadataName
}

// WithMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetMetadataOrganization(metadataOrganization)
	return o
}

// SetMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataOrganization(metadataOrganization *string) {
	o.MetadataOrganization = metadataOrganization
}

// WithMetadataPartner adds the metadataPartner to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataPartner(metadataPartner *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetMetadataPartner(metadataPartner)
	return o
}

// SetMetadataPartner adds the metadataPartner to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataPartner(metadataPartner *string) {
	o.MetadataPartner = metadataPartner
}

// WithMetadataProject adds the metadataProject to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataProject(metadataProject *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetMetadataProject(metadataProject)
	return o
}

// SetMetadataProject adds the metadataProject to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataProject(metadataProject *string) {
	o.MetadataProject = metadataProject
}

// WithSpecAgentMode adds the specAgentMode to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithSpecAgentMode(specAgentMode *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetSpecAgentMode(specAgentMode)
	return o
}

// SetSpecAgentMode adds the specAgentMode to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetSpecAgentMode(specAgentMode *string) {
	o.SpecAgentMode = specAgentMode
}

// WithSpecTemplateRef adds the specTemplateRef to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithSpecTemplateRef(specTemplateRef string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetSpecTemplateRef(specTemplateRef)
	return o
}

// SetSpecTemplateRef adds the specTemplateRef to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetSpecTemplateRef(specTemplateRef string) {
	o.SpecTemplateRef = specTemplateRef
}

// WithSpecToken adds the specToken to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithSpecToken(specToken *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetSpecToken(specToken)
	return o
}

// SetSpecToken adds the specToken to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetSpecToken(specToken *string) {
	o.SpecToken = specToken
}

// WithStatusFingerprint adds the statusFingerprint to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithStatusFingerprint(statusFingerprint *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetStatusFingerprint(statusFingerprint)
	return o
}

// SetStatusFingerprint adds the statusFingerprint to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetStatusFingerprint(statusFingerprint *string) {
	o.StatusFingerprint = statusFingerprint
}

// WithStatusIPAddress adds the statusIPAddress to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithStatusIPAddress(statusIPAddress *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetStatusIPAddress(statusIPAddress)
	return o
}

// SetStatusIPAddress adds the statusIpAddress to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetStatusIPAddress(statusIPAddress *string) {
	o.StatusIPAddress = statusIPAddress
}

// WithStatusLastCheckedIn adds the statusLastCheckedIn to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithStatusLastCheckedIn(statusLastCheckedIn *strfmt.DateTime) *BootstrapGetBootstrapAgentConfigParams {
	o.SetStatusLastCheckedIn(statusLastCheckedIn)
	return o
}

// SetStatusLastCheckedIn adds the statusLastCheckedIn to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetStatusLastCheckedIn(statusLastCheckedIn *strfmt.DateTime) {
	o.StatusLastCheckedIn = statusLastCheckedIn
}

// WithStatusTokenState adds the statusTokenState to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) WithStatusTokenState(statusTokenState *string) *BootstrapGetBootstrapAgentConfigParams {
	o.SetStatusTokenState(statusTokenState)
	return o
}

// SetStatusTokenState adds the statusTokenState to the bootstrap get bootstrap agent config params
func (o *BootstrapGetBootstrapAgentConfigParams) SetStatusTokenState(statusTokenState *string) {
	o.StatusTokenState = statusTokenState
}

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

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

	if o.APIVersion != nil {

		// query param apiVersion
		var qrAPIVersion string

		if o.APIVersion != nil {
			qrAPIVersion = *o.APIVersion
		}
		qAPIVersion := qrAPIVersion
		if qAPIVersion != "" {

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

	if o.Kind != nil {

		// query param kind
		var qrKind string

		if o.Kind != nil {
			qrKind = *o.Kind
		}
		qKind := qrKind
		if qKind != "" {

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

	if o.MetadataDescription != nil {

		// query param metadata.description
		var qrMetadataDescription string

		if o.MetadataDescription != nil {
			qrMetadataDescription = *o.MetadataDescription
		}
		qMetadataDescription := qrMetadataDescription
		if qMetadataDescription != "" {

			if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil {
				return err
			}
		}
	}

	if o.MetadataDisplayName != nil {

		// query param metadata.displayName
		var qrMetadataDisplayName string

		if o.MetadataDisplayName != nil {
			qrMetadataDisplayName = *o.MetadataDisplayName
		}
		qMetadataDisplayName := qrMetadataDisplayName
		if qMetadataDisplayName != "" {

			if err := r.SetQueryParam("metadata.displayName", qMetadataDisplayName); err != nil {
				return err
			}
		}
	}

	if o.MetadataID != nil {

		// query param metadata.id
		var qrMetadataID string

		if o.MetadataID != nil {
			qrMetadataID = *o.MetadataID
		}
		qMetadataID := qrMetadataID
		if qMetadataID != "" {

			if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil {
				return err
			}
		}
	}

	if o.MetadataModifiedAt != nil {

		// query param metadata.modifiedAt
		var qrMetadataModifiedAt strfmt.DateTime

		if o.MetadataModifiedAt != nil {
			qrMetadataModifiedAt = *o.MetadataModifiedAt
		}
		qMetadataModifiedAt := qrMetadataModifiedAt.String()
		if qMetadataModifiedAt != "" {

			if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil {
				return err
			}
		}
	}

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

	if o.MetadataOrganization != nil {

		// query param metadata.organization
		var qrMetadataOrganization string

		if o.MetadataOrganization != nil {
			qrMetadataOrganization = *o.MetadataOrganization
		}
		qMetadataOrganization := qrMetadataOrganization
		if qMetadataOrganization != "" {

			if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil {
				return err
			}
		}
	}

	if o.MetadataPartner != nil {

		// query param metadata.partner
		var qrMetadataPartner string

		if o.MetadataPartner != nil {
			qrMetadataPartner = *o.MetadataPartner
		}
		qMetadataPartner := qrMetadataPartner
		if qMetadataPartner != "" {

			if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil {
				return err
			}
		}
	}

	if o.MetadataProject != nil {

		// query param metadata.project
		var qrMetadataProject string

		if o.MetadataProject != nil {
			qrMetadataProject = *o.MetadataProject
		}
		qMetadataProject := qrMetadataProject
		if qMetadataProject != "" {

			if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil {
				return err
			}
		}
	}

	if o.SpecAgentMode != nil {

		// query param spec.agentMode
		var qrSpecAgentMode string

		if o.SpecAgentMode != nil {
			qrSpecAgentMode = *o.SpecAgentMode
		}
		qSpecAgentMode := qrSpecAgentMode
		if qSpecAgentMode != "" {

			if err := r.SetQueryParam("spec.agentMode", qSpecAgentMode); err != nil {
				return err
			}
		}
	}

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

	if o.SpecToken != nil {

		// query param spec.token
		var qrSpecToken string

		if o.SpecToken != nil {
			qrSpecToken = *o.SpecToken
		}
		qSpecToken := qrSpecToken
		if qSpecToken != "" {

			if err := r.SetQueryParam("spec.token", qSpecToken); err != nil {
				return err
			}
		}
	}

	if o.StatusFingerprint != nil {

		// query param status.fingerprint
		var qrStatusFingerprint string

		if o.StatusFingerprint != nil {
			qrStatusFingerprint = *o.StatusFingerprint
		}
		qStatusFingerprint := qrStatusFingerprint
		if qStatusFingerprint != "" {

			if err := r.SetQueryParam("status.fingerprint", qStatusFingerprint); err != nil {
				return err
			}
		}
	}

	if o.StatusIPAddress != nil {

		// query param status.ipAddress
		var qrStatusIPAddress string

		if o.StatusIPAddress != nil {
			qrStatusIPAddress = *o.StatusIPAddress
		}
		qStatusIPAddress := qrStatusIPAddress
		if qStatusIPAddress != "" {

			if err := r.SetQueryParam("status.ipAddress", qStatusIPAddress); err != nil {
				return err
			}
		}
	}

	if o.StatusLastCheckedIn != nil {

		// query param status.lastCheckedIn
		var qrStatusLastCheckedIn strfmt.DateTime

		if o.StatusLastCheckedIn != nil {
			qrStatusLastCheckedIn = *o.StatusLastCheckedIn
		}
		qStatusLastCheckedIn := qrStatusLastCheckedIn.String()
		if qStatusLastCheckedIn != "" {

			if err := r.SetQueryParam("status.lastCheckedIn", qStatusLastCheckedIn); err != nil {
				return err
			}
		}
	}

	if o.StatusTokenState != nil {

		// query param status.tokenState
		var qrStatusTokenState string

		if o.StatusTokenState != nil {
			qrStatusTokenState = *o.StatusTokenState
		}
		qStatusTokenState := qrStatusTokenState
		if qStatusTokenState != "" {

			if err := r.SetQueryParam("status.tokenState", qStatusTokenState); err != nil {
				return err
			}
		}
	}

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