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

// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package accounts

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

// NewDeleteAccountParams creates a new DeleteAccountParams object
// with the default values initialized.
func NewDeleteAccountParams() *DeleteAccountParams {
	var ()
	return &DeleteAccountParams{

		timeout: cr.DefaultTimeout,
	}
}

// NewDeleteAccountParamsWithTimeout creates a new DeleteAccountParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewDeleteAccountParamsWithTimeout(timeout time.Duration) *DeleteAccountParams {
	var ()
	return &DeleteAccountParams{

		timeout: timeout,
	}
}

// NewDeleteAccountParamsWithContext creates a new DeleteAccountParams object
// with the default values initialized, and the ability to set a context for a request
func NewDeleteAccountParamsWithContext(ctx context.Context) *DeleteAccountParams {
	var ()
	return &DeleteAccountParams{

		Context: ctx,
	}
}

// NewDeleteAccountParamsWithHTTPClient creates a new DeleteAccountParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewDeleteAccountParamsWithHTTPClient(client *http.Client) *DeleteAccountParams {
	var ()
	return &DeleteAccountParams{
		HTTPClient: client,
	}
}

/*DeleteAccountParams contains all the parameters to send to the API endpoint
for the delete account operation typically these are written to a http.Request
*/
type DeleteAccountParams struct {

	/*AccountID
	  Taxnexus Record Id of an Account

	*/
	AccountID *string

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

// WithTimeout adds the timeout to the delete account params
func (o *DeleteAccountParams) WithTimeout(timeout time.Duration) *DeleteAccountParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the delete account params
func (o *DeleteAccountParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

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

// SetContext adds the context to the delete account params
func (o *DeleteAccountParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

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

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

// WithAccountID adds the accountID to the delete account params
func (o *DeleteAccountParams) WithAccountID(accountID *string) *DeleteAccountParams {
	o.SetAccountID(accountID)
	return o
}

// SetAccountID adds the accountId to the delete account params
func (o *DeleteAccountParams) SetAccountID(accountID *string) {
	o.AccountID = accountID
}

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

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

	if o.AccountID != nil {

		// query param accountId
		var qrAccountID string
		if o.AccountID != nil {
			qrAccountID = *o.AccountID
		}
		qAccountID := qrAccountID
		if qAccountID != "" {
			if err := r.SetQueryParam("accountId", qAccountID); err != nil {
				return err
			}
		}

	}

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