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

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

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

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

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

/* BootstrapDeleteBootstrapAgentParams contains all the parameters to send to the API endpoint
   for the bootstrap delete bootstrap agent operation.

   Typically these are written to a http.Request.
*/
type BootstrapDeleteBootstrapAgentParams 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 delete bootstrap agent params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *BootstrapDeleteBootstrapAgentParams) WithDefaults() *BootstrapDeleteBootstrapAgentParams {
	o.SetDefaults()
	return o
}

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

		kindDefault = string("BootstrapAgent")

		specAgentModeDefault = string("InCluster")

		statusTokenStateDefault = string("NotSet")
	)

	val := BootstrapDeleteBootstrapAgentParams{
		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 delete bootstrap agent params
func (o *BootstrapDeleteBootstrapAgentParams) WithTimeout(timeout time.Duration) *BootstrapDeleteBootstrapAgentParams {
	o.SetTimeout(timeout)
	return o
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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