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

package firewalled_services

// 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/cisco-sso/meraki-cli/models"
)

// NewUpdateNetworkFirewalledServiceParams creates a new UpdateNetworkFirewalledServiceParams object
// with the default values initialized.
func NewUpdateNetworkFirewalledServiceParams() *UpdateNetworkFirewalledServiceParams {
	var ()
	return &UpdateNetworkFirewalledServiceParams{

		timeout: cr.DefaultTimeout,
	}
}

// NewUpdateNetworkFirewalledServiceParamsWithTimeout creates a new UpdateNetworkFirewalledServiceParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewUpdateNetworkFirewalledServiceParamsWithTimeout(timeout time.Duration) *UpdateNetworkFirewalledServiceParams {
	var ()
	return &UpdateNetworkFirewalledServiceParams{

		timeout: timeout,
	}
}

// NewUpdateNetworkFirewalledServiceParamsWithContext creates a new UpdateNetworkFirewalledServiceParams object
// with the default values initialized, and the ability to set a context for a request
func NewUpdateNetworkFirewalledServiceParamsWithContext(ctx context.Context) *UpdateNetworkFirewalledServiceParams {
	var ()
	return &UpdateNetworkFirewalledServiceParams{

		Context: ctx,
	}
}

// NewUpdateNetworkFirewalledServiceParamsWithHTTPClient creates a new UpdateNetworkFirewalledServiceParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewUpdateNetworkFirewalledServiceParamsWithHTTPClient(client *http.Client) *UpdateNetworkFirewalledServiceParams {
	var ()
	return &UpdateNetworkFirewalledServiceParams{
		HTTPClient: client,
	}
}

/*UpdateNetworkFirewalledServiceParams contains all the parameters to send to the API endpoint
for the update network firewalled service operation typically these are written to a http.Request
*/
type UpdateNetworkFirewalledServiceParams struct {

	/*NetworkID*/
	NetworkID string
	/*Service*/
	Service string
	/*UpdateNetworkFirewalledService*/
	UpdateNetworkFirewalledService *models.UpdateNetworkFirewalledService

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

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

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

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

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

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

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

// WithNetworkID adds the networkID to the update network firewalled service params
func (o *UpdateNetworkFirewalledServiceParams) WithNetworkID(networkID string) *UpdateNetworkFirewalledServiceParams {
	o.SetNetworkID(networkID)
	return o
}

// SetNetworkID adds the networkId to the update network firewalled service params
func (o *UpdateNetworkFirewalledServiceParams) SetNetworkID(networkID string) {
	o.NetworkID = networkID
}

// WithService adds the service to the update network firewalled service params
func (o *UpdateNetworkFirewalledServiceParams) WithService(service string) *UpdateNetworkFirewalledServiceParams {
	o.SetService(service)
	return o
}

// SetService adds the service to the update network firewalled service params
func (o *UpdateNetworkFirewalledServiceParams) SetService(service string) {
	o.Service = service
}

// WithUpdateNetworkFirewalledService adds the updateNetworkFirewalledService to the update network firewalled service params
func (o *UpdateNetworkFirewalledServiceParams) WithUpdateNetworkFirewalledService(updateNetworkFirewalledService *models.UpdateNetworkFirewalledService) *UpdateNetworkFirewalledServiceParams {
	o.SetUpdateNetworkFirewalledService(updateNetworkFirewalledService)
	return o
}

// SetUpdateNetworkFirewalledService adds the updateNetworkFirewalledService to the update network firewalled service params
func (o *UpdateNetworkFirewalledServiceParams) SetUpdateNetworkFirewalledService(updateNetworkFirewalledService *models.UpdateNetworkFirewalledService) {
	o.UpdateNetworkFirewalledService = updateNetworkFirewalledService
}

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

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

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

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

	if o.UpdateNetworkFirewalledService != nil {
		if err := r.SetBodyParam(o.UpdateNetworkFirewalledService); err != nil {
			return err
		}
	}

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