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

package accounts

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

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

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

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

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

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

	for the account followers operation.

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

	/* ID.

	   Account ID.
	*/
	ID string

	/* Limit.

	   Number of follower accounts to return.

	   Default: 40
	*/
	Limit *int64

	/* MaxID.

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

	/* MinID.

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

	/* SinceID.

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

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

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

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

	val := AccountFollowersParams{
		Limit: &limitDefault,
	}

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

// WithTimeout adds the timeout to the account followers params
func (o *AccountFollowersParams) WithTimeout(timeout time.Duration) *AccountFollowersParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the account followers params
func (o *AccountFollowersParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the account followers params
func (o *AccountFollowersParams) WithContext(ctx context.Context) *AccountFollowersParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the account followers params
func (o *AccountFollowersParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the account followers params
func (o *AccountFollowersParams) WithHTTPClient(client *http.Client) *AccountFollowersParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the account followers params
func (o *AccountFollowersParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithID adds the id to the account followers params
func (o *AccountFollowersParams) WithID(id string) *AccountFollowersParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the account followers params
func (o *AccountFollowersParams) SetID(id string) {
	o.ID = id
}

// WithLimit adds the limit to the account followers params
func (o *AccountFollowersParams) WithLimit(limit *int64) *AccountFollowersParams {
	o.SetLimit(limit)
	return o
}

// SetLimit adds the limit to the account followers params
func (o *AccountFollowersParams) SetLimit(limit *int64) {
	o.Limit = limit
}

// WithMaxID adds the maxID to the account followers params
func (o *AccountFollowersParams) WithMaxID(maxID *string) *AccountFollowersParams {
	o.SetMaxID(maxID)
	return o
}

// SetMaxID adds the maxId to the account followers params
func (o *AccountFollowersParams) SetMaxID(maxID *string) {
	o.MaxID = maxID
}

// WithMinID adds the minID to the account followers params
func (o *AccountFollowersParams) WithMinID(minID *string) *AccountFollowersParams {
	o.SetMinID(minID)
	return o
}

// SetMinID adds the minId to the account followers params
func (o *AccountFollowersParams) SetMinID(minID *string) {
	o.MinID = minID
}

// WithSinceID adds the sinceID to the account followers params
func (o *AccountFollowersParams) WithSinceID(sinceID *string) *AccountFollowersParams {
	o.SetSinceID(sinceID)
	return o
}

// SetSinceID adds the sinceId to the account followers params
func (o *AccountFollowersParams) SetSinceID(sinceID *string) {
	o.SinceID = sinceID
}

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

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

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

	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
}
