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

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

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

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

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

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

	for the gateway service update relay gateway operation.

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

	// Body.
	Body GatewayServiceUpdateRelayGatewayBody

	/* RelayGatewayRelayID.

	   Relay ID (4 byte HEX).
	*/
	RelayGatewayRelayID string

	/* RelayGatewayTenantID.

	   Tenant ID.
	*/
	RelayGatewayTenantID string

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

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

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

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

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

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

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

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

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

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

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

// WithRelayGatewayRelayID adds the relayGatewayRelayID to the gateway service update relay gateway params
func (o *GatewayServiceUpdateRelayGatewayParams) WithRelayGatewayRelayID(relayGatewayRelayID string) *GatewayServiceUpdateRelayGatewayParams {
	o.SetRelayGatewayRelayID(relayGatewayRelayID)
	return o
}

// SetRelayGatewayRelayID adds the relayGatewayRelayId to the gateway service update relay gateway params
func (o *GatewayServiceUpdateRelayGatewayParams) SetRelayGatewayRelayID(relayGatewayRelayID string) {
	o.RelayGatewayRelayID = relayGatewayRelayID
}

// WithRelayGatewayTenantID adds the relayGatewayTenantID to the gateway service update relay gateway params
func (o *GatewayServiceUpdateRelayGatewayParams) WithRelayGatewayTenantID(relayGatewayTenantID string) *GatewayServiceUpdateRelayGatewayParams {
	o.SetRelayGatewayTenantID(relayGatewayTenantID)
	return o
}

// SetRelayGatewayTenantID adds the relayGatewayTenantId to the gateway service update relay gateway params
func (o *GatewayServiceUpdateRelayGatewayParams) SetRelayGatewayTenantID(relayGatewayTenantID string) {
	o.RelayGatewayTenantID = relayGatewayTenantID
}

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

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

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