client/aws_accounts/get_aws_accounts_parameters.go
// Code generated by go-swagger; DO NOT EDIT.
package aws_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"
)
// NewGetAwsAccountsParams creates a new GetAwsAccountsParams object
// with the default values initialized.
func NewGetAwsAccountsParams() *GetAwsAccountsParams {
var ()
return &GetAwsAccountsParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetAwsAccountsParamsWithTimeout creates a new GetAwsAccountsParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewGetAwsAccountsParamsWithTimeout(timeout time.Duration) *GetAwsAccountsParams {
var ()
return &GetAwsAccountsParams{
timeout: timeout,
}
}
// NewGetAwsAccountsParamsWithContext creates a new GetAwsAccountsParams object
// with the default values initialized, and the ability to set a context for a request
func NewGetAwsAccountsParamsWithContext(ctx context.Context) *GetAwsAccountsParams {
var ()
return &GetAwsAccountsParams{
Context: ctx,
}
}
// NewGetAwsAccountsParamsWithHTTPClient creates a new GetAwsAccountsParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetAwsAccountsParamsWithHTTPClient(client *http.Client) *GetAwsAccountsParams {
var ()
return &GetAwsAccountsParams{
HTTPClient: client,
}
}
/*GetAwsAccountsParams contains all the parameters to send to the API endpoint
for the get aws accounts operation typically these are written to a http.Request
*/
type GetAwsAccountsParams struct {
/*ConsumerID*/
ConsumerID *int32
/*CustomerTenantType*/
CustomerTenantType *string
/*OrganizationID*/
OrganizationID *int32
/*Page*/
Page *int32
/*PageSize*/
PageSize *int32
/*PublisherID*/
PublisherID *int32
/*Search*/
Search *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the get aws accounts params
func (o *GetAwsAccountsParams) WithTimeout(timeout time.Duration) *GetAwsAccountsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get aws accounts params
func (o *GetAwsAccountsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get aws accounts params
func (o *GetAwsAccountsParams) WithContext(ctx context.Context) *GetAwsAccountsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get aws accounts params
func (o *GetAwsAccountsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get aws accounts params
func (o *GetAwsAccountsParams) WithHTTPClient(client *http.Client) *GetAwsAccountsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get aws accounts params
func (o *GetAwsAccountsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithConsumerID adds the consumerID to the get aws accounts params
func (o *GetAwsAccountsParams) WithConsumerID(consumerID *int32) *GetAwsAccountsParams {
o.SetConsumerID(consumerID)
return o
}
// SetConsumerID adds the consumerId to the get aws accounts params
func (o *GetAwsAccountsParams) SetConsumerID(consumerID *int32) {
o.ConsumerID = consumerID
}
// WithCustomerTenantType adds the customerTenantType to the get aws accounts params
func (o *GetAwsAccountsParams) WithCustomerTenantType(customerTenantType *string) *GetAwsAccountsParams {
o.SetCustomerTenantType(customerTenantType)
return o
}
// SetCustomerTenantType adds the customerTenantType to the get aws accounts params
func (o *GetAwsAccountsParams) SetCustomerTenantType(customerTenantType *string) {
o.CustomerTenantType = customerTenantType
}
// WithOrganizationID adds the organizationID to the get aws accounts params
func (o *GetAwsAccountsParams) WithOrganizationID(organizationID *int32) *GetAwsAccountsParams {
o.SetOrganizationID(organizationID)
return o
}
// SetOrganizationID adds the organizationId to the get aws accounts params
func (o *GetAwsAccountsParams) SetOrganizationID(organizationID *int32) {
o.OrganizationID = organizationID
}
// WithPage adds the page to the get aws accounts params
func (o *GetAwsAccountsParams) WithPage(page *int32) *GetAwsAccountsParams {
o.SetPage(page)
return o
}
// SetPage adds the page to the get aws accounts params
func (o *GetAwsAccountsParams) SetPage(page *int32) {
o.Page = page
}
// WithPageSize adds the pageSize to the get aws accounts params
func (o *GetAwsAccountsParams) WithPageSize(pageSize *int32) *GetAwsAccountsParams {
o.SetPageSize(pageSize)
return o
}
// SetPageSize adds the pageSize to the get aws accounts params
func (o *GetAwsAccountsParams) SetPageSize(pageSize *int32) {
o.PageSize = pageSize
}
// WithPublisherID adds the publisherID to the get aws accounts params
func (o *GetAwsAccountsParams) WithPublisherID(publisherID *int32) *GetAwsAccountsParams {
o.SetPublisherID(publisherID)
return o
}
// SetPublisherID adds the publisherId to the get aws accounts params
func (o *GetAwsAccountsParams) SetPublisherID(publisherID *int32) {
o.PublisherID = publisherID
}
// WithSearch adds the search to the get aws accounts params
func (o *GetAwsAccountsParams) WithSearch(search *string) *GetAwsAccountsParams {
o.SetSearch(search)
return o
}
// SetSearch adds the search to the get aws accounts params
func (o *GetAwsAccountsParams) SetSearch(search *string) {
o.Search = search
}
// WriteToRequest writes these params to a swagger request
func (o *GetAwsAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.ConsumerID != nil {
// query param ConsumerId
var qrConsumerID int32
if o.ConsumerID != nil {
qrConsumerID = *o.ConsumerID
}
qConsumerID := swag.FormatInt32(qrConsumerID)
if qConsumerID != "" {
if err := r.SetQueryParam("ConsumerId", qConsumerID); err != nil {
return err
}
}
}
if o.CustomerTenantType != nil {
// query param CustomerTenantType
var qrCustomerTenantType string
if o.CustomerTenantType != nil {
qrCustomerTenantType = *o.CustomerTenantType
}
qCustomerTenantType := qrCustomerTenantType
if qCustomerTenantType != "" {
if err := r.SetQueryParam("CustomerTenantType", qCustomerTenantType); err != nil {
return err
}
}
}
if o.OrganizationID != nil {
// query param OrganizationId
var qrOrganizationID int32
if o.OrganizationID != nil {
qrOrganizationID = *o.OrganizationID
}
qOrganizationID := swag.FormatInt32(qrOrganizationID)
if qOrganizationID != "" {
if err := r.SetQueryParam("OrganizationId", qOrganizationID); err != nil {
return err
}
}
}
if o.Page != nil {
// query param Page
var qrPage int32
if o.Page != nil {
qrPage = *o.Page
}
qPage := swag.FormatInt32(qrPage)
if qPage != "" {
if err := r.SetQueryParam("Page", qPage); err != nil {
return err
}
}
}
if o.PageSize != nil {
// query param PageSize
var qrPageSize int32
if o.PageSize != nil {
qrPageSize = *o.PageSize
}
qPageSize := swag.FormatInt32(qrPageSize)
if qPageSize != "" {
if err := r.SetQueryParam("PageSize", qPageSize); err != nil {
return err
}
}
}
if o.PublisherID != nil {
// query param PublisherId
var qrPublisherID int32
if o.PublisherID != nil {
qrPublisherID = *o.PublisherID
}
qPublisherID := swag.FormatInt32(qrPublisherID)
if qPublisherID != "" {
if err := r.SetQueryParam("PublisherId", qPublisherID); err != nil {
return err
}
}
}
if o.Search != nil {
// query param Search
var qrSearch string
if o.Search != nil {
qrSearch = *o.Search
}
qSearch := qrSearch
if qSearch != "" {
if err := r.SetQueryParam("Search", qSearch); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}