// 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 payment_method

// 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/taxnexus/go/lib/api/ops/ops_models"
)

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*PutPaymentMethodsParams contains all the parameters to send to the API endpoint
for the put payment methods operation typically these are written to a http.Request
*/
type PutPaymentMethodsParams struct {

	/*PaymentMethodRequest
	  A request with an array of Purchase Order Objects

	*/
	PaymentMethodRequest *ops_models.PaymentMethodRequest

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

// WithTimeout adds the timeout to the put payment methods params
func (o *PutPaymentMethodsParams) WithTimeout(timeout time.Duration) *PutPaymentMethodsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the put payment methods params
func (o *PutPaymentMethodsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the put payment methods params
func (o *PutPaymentMethodsParams) WithContext(ctx context.Context) *PutPaymentMethodsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the put payment methods params
func (o *PutPaymentMethodsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the put payment methods params
func (o *PutPaymentMethodsParams) WithHTTPClient(client *http.Client) *PutPaymentMethodsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the put payment methods params
func (o *PutPaymentMethodsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithPaymentMethodRequest adds the paymentMethodRequest to the put payment methods params
func (o *PutPaymentMethodsParams) WithPaymentMethodRequest(paymentMethodRequest *ops_models.PaymentMethodRequest) *PutPaymentMethodsParams {
	o.SetPaymentMethodRequest(paymentMethodRequest)
	return o
}

// SetPaymentMethodRequest adds the paymentMethodRequest to the put payment methods params
func (o *PutPaymentMethodsParams) SetPaymentMethodRequest(paymentMethodRequest *ops_models.PaymentMethodRequest) {
	o.PaymentMethodRequest = paymentMethodRequest
}

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

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

	if o.PaymentMethodRequest != nil {
		if err := r.SetBodyParam(o.PaymentMethodRequest); err != nil {
			return err
		}
	}

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