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

package device_profile_template_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"
)

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

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

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

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

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

	for the device profile template service update operation.

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

	// Body.
	Body DeviceProfileTemplateServiceUpdateBody

	/* DeviceProfileTemplateID.

	   Device-profile template ID.
	*/
	DeviceProfileTemplateID string

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

// WithDefaults hydrates default values in the device profile template service update params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeviceProfileTemplateServiceUpdateParams) WithDefaults() *DeviceProfileTemplateServiceUpdateParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the device profile template service update params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeviceProfileTemplateServiceUpdateParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) WithTimeout(timeout time.Duration) *DeviceProfileTemplateServiceUpdateParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) WithContext(ctx context.Context) *DeviceProfileTemplateServiceUpdateParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) WithHTTPClient(client *http.Client) *DeviceProfileTemplateServiceUpdateParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) WithBody(body DeviceProfileTemplateServiceUpdateBody) *DeviceProfileTemplateServiceUpdateParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) SetBody(body DeviceProfileTemplateServiceUpdateBody) {
	o.Body = body
}

// WithDeviceProfileTemplateID adds the deviceProfileTemplateID to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) WithDeviceProfileTemplateID(deviceProfileTemplateID string) *DeviceProfileTemplateServiceUpdateParams {
	o.SetDeviceProfileTemplateID(deviceProfileTemplateID)
	return o
}

// SetDeviceProfileTemplateID adds the deviceProfileTemplateId to the device profile template service update params
func (o *DeviceProfileTemplateServiceUpdateParams) SetDeviceProfileTemplateID(deviceProfileTemplateID string) {
	o.DeviceProfileTemplateID = deviceProfileTemplateID
}

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

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

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

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