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

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

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

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

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

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

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

	for the gateway service update operation.

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

	// Body.
	Body GatewayServiceUpdateBody

	/* GatewayGatewayID.

	   Gateway ID (EUI64).
	*/
	GatewayGatewayID string

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

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

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

// WithTimeout adds the timeout to the gateway service update params
func (o *GatewayServiceUpdateParams) WithTimeout(timeout time.Duration) *GatewayServiceUpdateParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the gateway service update params
func (o *GatewayServiceUpdateParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the gateway service update params
func (o *GatewayServiceUpdateParams) WithContext(ctx context.Context) *GatewayServiceUpdateParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the gateway service update params
func (o *GatewayServiceUpdateParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the gateway service update params
func (o *GatewayServiceUpdateParams) WithHTTPClient(client *http.Client) *GatewayServiceUpdateParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the gateway service update params
func (o *GatewayServiceUpdateParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the gateway service update params
func (o *GatewayServiceUpdateParams) WithBody(body GatewayServiceUpdateBody) *GatewayServiceUpdateParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the gateway service update params
func (o *GatewayServiceUpdateParams) SetBody(body GatewayServiceUpdateBody) {
	o.Body = body
}

// WithGatewayGatewayID adds the gatewayGatewayID to the gateway service update params
func (o *GatewayServiceUpdateParams) WithGatewayGatewayID(gatewayGatewayID string) *GatewayServiceUpdateParams {
	o.SetGatewayGatewayID(gatewayGatewayID)
	return o
}

// SetGatewayGatewayID adds the gatewayGatewayId to the gateway service update params
func (o *GatewayServiceUpdateParams) SetGatewayGatewayID(gatewayGatewayID string) {
	o.GatewayGatewayID = gatewayGatewayID
}

// WriteToRequest writes these params to a swagger request
func (o *GatewayServiceUpdateParams) 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 gateway.gatewayId
	if err := r.SetPathParam("gateway.gatewayId", o.GatewayGatewayID); err != nil {
		return err
	}

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