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

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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*PostCoordinatesParams contains all the parameters to send to the API endpoint
for the post coordinates operation typically these are written to a http.Request
*/
type PostCoordinatesParams struct {

	/*CoordinateRequest
	  An array of new Coordinate records

	*/
	CoordinateRequest *geo_models.CoordinateRequest

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

// WithTimeout adds the timeout to the post coordinates params
func (o *PostCoordinatesParams) WithTimeout(timeout time.Duration) *PostCoordinatesParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the post coordinates params
func (o *PostCoordinatesParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the post coordinates params
func (o *PostCoordinatesParams) WithContext(ctx context.Context) *PostCoordinatesParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the post coordinates params
func (o *PostCoordinatesParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the post coordinates params
func (o *PostCoordinatesParams) WithHTTPClient(client *http.Client) *PostCoordinatesParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the post coordinates params
func (o *PostCoordinatesParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithCoordinateRequest adds the coordinateRequest to the post coordinates params
func (o *PostCoordinatesParams) WithCoordinateRequest(coordinateRequest *geo_models.CoordinateRequest) *PostCoordinatesParams {
	o.SetCoordinateRequest(coordinateRequest)
	return o
}

// SetCoordinateRequest adds the coordinateRequest to the post coordinates params
func (o *PostCoordinatesParams) SetCoordinateRequest(coordinateRequest *geo_models.CoordinateRequest) {
	o.CoordinateRequest = coordinateRequest
}

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

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

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

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