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

package device_service

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

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

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

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

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

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

	for the device service get next f cnt down operation.

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

	// Body.
	Body interface{}

	/* DevEui.

	   Device EUI (EUI64).
	*/
	DevEui string

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

// WithDefaults hydrates default values in the device service get next f cnt down params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeviceServiceGetNextFCntDownParams) WithDefaults() *DeviceServiceGetNextFCntDownParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the device service get next f cnt down params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeviceServiceGetNextFCntDownParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) WithTimeout(timeout time.Duration) *DeviceServiceGetNextFCntDownParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) WithContext(ctx context.Context) *DeviceServiceGetNextFCntDownParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) WithHTTPClient(client *http.Client) *DeviceServiceGetNextFCntDownParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) WithBody(body interface{}) *DeviceServiceGetNextFCntDownParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) SetBody(body interface{}) {
	o.Body = body
}

// WithDevEui adds the devEui to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) WithDevEui(devEui string) *DeviceServiceGetNextFCntDownParams {
	o.SetDevEui(devEui)
	return o
}

// SetDevEui adds the devEui to the device service get next f cnt down params
func (o *DeviceServiceGetNextFCntDownParams) SetDevEui(devEui string) {
	o.DevEui = devEui
}

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

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

	// path param devEui
	if err := r.SetPathParam("devEui", o.DevEui); err != nil {
		return err
	}

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