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

package follow_requests

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

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

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

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

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

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

	for the get follow requests operation.

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

	/* Limit.

	   Number of follow requesting accounts to return.

	   Default: 40
	*/
	Limit *int64

	/* MaxID.

	   Return only follow requesting accounts *OLDER* than the given max ID. The follow requester with the specified ID will not be included in the response. NOTE: the ID is of the internal follow request, NOT any of the returned accounts.
	*/
	MaxID *string

	/* MinID.

	   Return only follow requesting accounts *IMMEDIATELY NEWER* than the given min ID. The follow requester with the specified ID will not be included in the response. NOTE: the ID is of the internal follow request, NOT any of the returned accounts.
	*/
	MinID *string

	/* SinceID.

	   Return only follow requesting accounts *NEWER* than the given since ID. The follow requester with the specified ID will not be included in the response. NOTE: the ID is of the internal follow request, NOT any of the returned accounts.
	*/
	SinceID *string

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

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

// SetDefaults hydrates default values in the get follow requests params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetFollowRequestsParams) SetDefaults() {
	var (
		limitDefault = int64(40)
	)

	val := GetFollowRequestsParams{
		Limit: &limitDefault,
	}

	val.timeout = o.timeout
	val.Context = o.Context
	val.HTTPClient = o.HTTPClient
	*o = val
}

// WithTimeout adds the timeout to the get follow requests params
func (o *GetFollowRequestsParams) WithTimeout(timeout time.Duration) *GetFollowRequestsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get follow requests params
func (o *GetFollowRequestsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get follow requests params
func (o *GetFollowRequestsParams) WithContext(ctx context.Context) *GetFollowRequestsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get follow requests params
func (o *GetFollowRequestsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get follow requests params
func (o *GetFollowRequestsParams) WithHTTPClient(client *http.Client) *GetFollowRequestsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get follow requests params
func (o *GetFollowRequestsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithLimit adds the limit to the get follow requests params
func (o *GetFollowRequestsParams) WithLimit(limit *int64) *GetFollowRequestsParams {
	o.SetLimit(limit)
	return o
}

// SetLimit adds the limit to the get follow requests params
func (o *GetFollowRequestsParams) SetLimit(limit *int64) {
	o.Limit = limit
}

// WithMaxID adds the maxID to the get follow requests params
func (o *GetFollowRequestsParams) WithMaxID(maxID *string) *GetFollowRequestsParams {
	o.SetMaxID(maxID)
	return o
}

// SetMaxID adds the maxId to the get follow requests params
func (o *GetFollowRequestsParams) SetMaxID(maxID *string) {
	o.MaxID = maxID
}

// WithMinID adds the minID to the get follow requests params
func (o *GetFollowRequestsParams) WithMinID(minID *string) *GetFollowRequestsParams {
	o.SetMinID(minID)
	return o
}

// SetMinID adds the minId to the get follow requests params
func (o *GetFollowRequestsParams) SetMinID(minID *string) {
	o.MinID = minID
}

// WithSinceID adds the sinceID to the get follow requests params
func (o *GetFollowRequestsParams) WithSinceID(sinceID *string) *GetFollowRequestsParams {
	o.SetSinceID(sinceID)
	return o
}

// SetSinceID adds the sinceId to the get follow requests params
func (o *GetFollowRequestsParams) SetSinceID(sinceID *string) {
	o.SinceID = sinceID
}

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

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

	if o.Limit != nil {

		// query param limit
		var qrLimit int64

		if o.Limit != nil {
			qrLimit = *o.Limit
		}
		qLimit := swag.FormatInt64(qrLimit)
		if qLimit != "" {

			if err := r.SetQueryParam("limit", qLimit); err != nil {
				return err
			}
		}
	}

	if o.MaxID != nil {

		// query param max_id
		var qrMaxID string

		if o.MaxID != nil {
			qrMaxID = *o.MaxID
		}
		qMaxID := qrMaxID
		if qMaxID != "" {

			if err := r.SetQueryParam("max_id", qMaxID); err != nil {
				return err
			}
		}
	}

	if o.MinID != nil {

		// query param min_id
		var qrMinID string

		if o.MinID != nil {
			qrMinID = *o.MinID
		}
		qMinID := qrMinID
		if qMinID != "" {

			if err := r.SetQueryParam("min_id", qMinID); err != nil {
				return err
			}
		}
	}

	if o.SinceID != nil {

		// query param since_id
		var qrSinceID string

		if o.SinceID != nil {
			qrSinceID = *o.SinceID
		}
		qSinceID := qrSinceID
		if qSinceID != "" {

			if err := r.SetQueryParam("since_id", qSinceID); err != nil {
				return err
			}
		}
	}

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