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

package signed_in_user

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

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

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

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

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

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

	for the set help flag operation.

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

	// FlagID.
	FlagID string

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

// WithDefaults hydrates default values in the set help flag params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SetHelpFlagParams) WithDefaults() *SetHelpFlagParams {
	o.SetDefaults()
	return o
}

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

// WithTimeout adds the timeout to the set help flag params
func (o *SetHelpFlagParams) WithTimeout(timeout time.Duration) *SetHelpFlagParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the set help flag params
func (o *SetHelpFlagParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the set help flag params
func (o *SetHelpFlagParams) WithContext(ctx context.Context) *SetHelpFlagParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the set help flag params
func (o *SetHelpFlagParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the set help flag params
func (o *SetHelpFlagParams) WithHTTPClient(client *http.Client) *SetHelpFlagParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the set help flag params
func (o *SetHelpFlagParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithFlagID adds the flagID to the set help flag params
func (o *SetHelpFlagParams) WithFlagID(flagID string) *SetHelpFlagParams {
	o.SetFlagID(flagID)
	return o
}

// SetFlagID adds the flagId to the set help flag params
func (o *SetHelpFlagParams) SetFlagID(flagID string) {
	o.FlagID = flagID
}

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

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

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

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