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

package folders

// 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/go-openapi/swag"
)

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

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

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

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

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

	for the get folder by ID operation.

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

	// FolderID.
	//
	// Format: int64
	FolderID int64

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

// WithDefaults hydrates default values in the get folder by ID params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetFolderByIDParams) WithDefaults() *GetFolderByIDParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the get folder by ID params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetFolderByIDParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the get folder by ID params
func (o *GetFolderByIDParams) WithTimeout(timeout time.Duration) *GetFolderByIDParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get folder by ID params
func (o *GetFolderByIDParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get folder by ID params
func (o *GetFolderByIDParams) WithContext(ctx context.Context) *GetFolderByIDParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get folder by ID params
func (o *GetFolderByIDParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get folder by ID params
func (o *GetFolderByIDParams) WithHTTPClient(client *http.Client) *GetFolderByIDParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get folder by ID params
func (o *GetFolderByIDParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithFolderID adds the folderID to the get folder by ID params
func (o *GetFolderByIDParams) WithFolderID(folderID int64) *GetFolderByIDParams {
	o.SetFolderID(folderID)
	return o
}

// SetFolderID adds the folderId to the get folder by ID params
func (o *GetFolderByIDParams) SetFolderID(folderID int64) {
	o.FolderID = folderID
}

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

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

	// path param folder_id
	if err := r.SetPathParam("folder_id", swag.FormatInt64(o.FolderID)); err != nil {
		return err
	}

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