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

package lm

// 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"
	"github.com/go-openapi/swag"
)

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

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

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

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

/* DeleteAPITokenByIDParams contains all the parameters to send to the API endpoint
   for the delete Api token by Id operation.

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

	// UserAgent.
	//
	// Default: "Logicmonitor/SDK: Argus Dist-v1.0.0-argus1"
	UserAgent *string

	// AdminID.
	//
	// Format: int32
	AdminID int32

	// ApitokenID.
	//
	// Format: int32
	ApitokenID int32

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

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

// SetDefaults hydrates default values in the delete Api token by Id params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteAPITokenByIDParams) SetDefaults() {
	var (
		userAgentDefault = string("Logicmonitor/SDK: Argus Dist-v1.0.0-argus1")
	)

	val := DeleteAPITokenByIDParams{
		UserAgent: &userAgentDefault,
	}

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

// WithTimeout adds the timeout to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) WithTimeout(timeout time.Duration) *DeleteAPITokenByIDParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) WithContext(ctx context.Context) *DeleteAPITokenByIDParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) WithHTTPClient(client *http.Client) *DeleteAPITokenByIDParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithUserAgent adds the userAgent to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) WithUserAgent(userAgent *string) *DeleteAPITokenByIDParams {
	o.SetUserAgent(userAgent)
	return o
}

// SetUserAgent adds the userAgent to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) SetUserAgent(userAgent *string) {
	o.UserAgent = userAgent
}

// WithAdminID adds the adminID to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) WithAdminID(adminID int32) *DeleteAPITokenByIDParams {
	o.SetAdminID(adminID)
	return o
}

// SetAdminID adds the adminId to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) SetAdminID(adminID int32) {
	o.AdminID = adminID
}

// WithApitokenID adds the apitokenID to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) WithApitokenID(apitokenID int32) *DeleteAPITokenByIDParams {
	o.SetApitokenID(apitokenID)
	return o
}

// SetApitokenID adds the apitokenId to the delete Api token by Id params
func (o *DeleteAPITokenByIDParams) SetApitokenID(apitokenID int32) {
	o.ApitokenID = apitokenID
}

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

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

	if o.UserAgent != nil {

		// header param User-Agent
		if err := r.SetHeaderParam("User-Agent", *o.UserAgent); err != nil {
			return err
		}
	}

	// path param adminId
	if err := r.SetPathParam("adminId", swag.FormatInt32(o.AdminID)); err != nil {
		return err
	}

	// path param apitokenId
	if err := r.SetPathParam("apitokenId", swag.FormatInt32(o.ApitokenID)); err != nil {
		return err
	}

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