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

package operations

// 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/fiskerinc/cloud-services/pkg/ota_api/models"
)

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

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

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

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

/*
PostSmsParams contains all the parameters to send to the API endpoint

	for the post sms operation.

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

	/* Config.

	   SMS data
	*/
	Config *models.SmsSendSMSRequest

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

// WithDefaults hydrates default values in the post sms params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostSmsParams) WithDefaults() *PostSmsParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the post sms params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostSmsParams) SetDefaults() {
	// no default values defined for this parameter
}

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

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

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

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

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

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

// WithConfig adds the config to the post sms params
func (o *PostSmsParams) WithConfig(config *models.SmsSendSMSRequest) *PostSmsParams {
	o.SetConfig(config)
	return o
}

// SetConfig adds the config to the post sms params
func (o *PostSmsParams) SetConfig(config *models.SmsSendSMSRequest) {
	o.Config = config
}

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

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

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