quota

package
v5.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for quota API

func (*Client) GetQuota

func (a *Client) GetQuota(params *GetQuotaParams, authInfo runtime.ClientAuthInfoWriter) (*GetQuotaOK, error)

GetQuota gets the specified quota

Get the specified quota

func (*Client) ListQuotas

func (a *Client) ListQuotas(params *ListQuotasParams, authInfo runtime.ClientAuthInfoWriter) (*ListQuotasOK, error)

ListQuotas lists quotas

List quotas

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

func (*Client) UpdateQuota

func (a *Client) UpdateQuota(params *UpdateQuotaParams, authInfo runtime.ClientAuthInfoWriter) (*UpdateQuotaOK, error)

UpdateQuota updates the specified quota

Update hard limits of the specified quota

type ClientService

type ClientService interface {
	GetQuota(params *GetQuotaParams, authInfo runtime.ClientAuthInfoWriter) (*GetQuotaOK, error)

	ListQuotas(params *ListQuotasParams, authInfo runtime.ClientAuthInfoWriter) (*ListQuotasOK, error)

	UpdateQuota(params *UpdateQuotaParams, authInfo runtime.ClientAuthInfoWriter) (*UpdateQuotaOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new quota API client.

type GetQuotaForbidden

type GetQuotaForbidden struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

GetQuotaForbidden handles this case with default header values.

Forbidden

func NewGetQuotaForbidden

func NewGetQuotaForbidden() *GetQuotaForbidden

NewGetQuotaForbidden creates a GetQuotaForbidden with default headers values

func (*GetQuotaForbidden) Error

func (o *GetQuotaForbidden) Error() string

func (*GetQuotaForbidden) GetPayload

func (o *GetQuotaForbidden) GetPayload() *model.Errors

type GetQuotaInternalServerError

type GetQuotaInternalServerError struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

GetQuotaInternalServerError handles this case with default header values.

Internal server error

func NewGetQuotaInternalServerError

func NewGetQuotaInternalServerError() *GetQuotaInternalServerError

NewGetQuotaInternalServerError creates a GetQuotaInternalServerError with default headers values

func (*GetQuotaInternalServerError) Error

func (*GetQuotaInternalServerError) GetPayload

func (o *GetQuotaInternalServerError) GetPayload() *model.Errors

type GetQuotaNotFound

type GetQuotaNotFound struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

GetQuotaNotFound handles this case with default header values.

Not found

func NewGetQuotaNotFound

func NewGetQuotaNotFound() *GetQuotaNotFound

NewGetQuotaNotFound creates a GetQuotaNotFound with default headers values

func (*GetQuotaNotFound) Error

func (o *GetQuotaNotFound) Error() string

func (*GetQuotaNotFound) GetPayload

func (o *GetQuotaNotFound) GetPayload() *model.Errors

type GetQuotaOK

type GetQuotaOK struct {
	Payload *model.Quota
}

GetQuotaOK handles this case with default header values.

Successfully retrieved the quota.

func NewGetQuotaOK

func NewGetQuotaOK() *GetQuotaOK

NewGetQuotaOK creates a GetQuotaOK with default headers values

func (*GetQuotaOK) Error

func (o *GetQuotaOK) Error() string

func (*GetQuotaOK) GetPayload

func (o *GetQuotaOK) GetPayload() *model.Quota

type GetQuotaParams

type GetQuotaParams struct {

	/*XRequestID
	  An unique ID for the request

	*/
	XRequestID *string
	/*ID
	  Quota ID

	*/
	ID int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetQuotaParams contains all the parameters to send to the API endpoint for the get quota operation typically these are written to a http.Request

func NewGetQuotaParams

func NewGetQuotaParams() *GetQuotaParams

NewGetQuotaParams creates a new GetQuotaParams object with the default values initialized.

func NewGetQuotaParamsWithContext

func NewGetQuotaParamsWithContext(ctx context.Context) *GetQuotaParams

NewGetQuotaParamsWithContext creates a new GetQuotaParams object with the default values initialized, and the ability to set a context for a request

func NewGetQuotaParamsWithHTTPClient

func NewGetQuotaParamsWithHTTPClient(client *http.Client) *GetQuotaParams

NewGetQuotaParamsWithHTTPClient creates a new GetQuotaParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetQuotaParamsWithTimeout

func NewGetQuotaParamsWithTimeout(timeout time.Duration) *GetQuotaParams

NewGetQuotaParamsWithTimeout creates a new GetQuotaParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetQuotaParams) SetContext

func (o *GetQuotaParams) SetContext(ctx context.Context)

SetContext adds the context to the get quota params

func (*GetQuotaParams) SetHTTPClient

func (o *GetQuotaParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get quota params

func (*GetQuotaParams) SetID

func (o *GetQuotaParams) SetID(id int64)

SetID adds the id to the get quota params

func (*GetQuotaParams) SetTimeout

func (o *GetQuotaParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get quota params

func (*GetQuotaParams) SetXRequestID

func (o *GetQuotaParams) SetXRequestID(xRequestID *string)

SetXRequestID adds the xRequestId to the get quota params

func (*GetQuotaParams) WithContext

func (o *GetQuotaParams) WithContext(ctx context.Context) *GetQuotaParams

WithContext adds the context to the get quota params

func (*GetQuotaParams) WithHTTPClient

func (o *GetQuotaParams) WithHTTPClient(client *http.Client) *GetQuotaParams

WithHTTPClient adds the HTTPClient to the get quota params

func (*GetQuotaParams) WithID

func (o *GetQuotaParams) WithID(id int64) *GetQuotaParams

WithID adds the id to the get quota params

func (*GetQuotaParams) WithTimeout

func (o *GetQuotaParams) WithTimeout(timeout time.Duration) *GetQuotaParams

WithTimeout adds the timeout to the get quota params

func (*GetQuotaParams) WithXRequestID

func (o *GetQuotaParams) WithXRequestID(xRequestID *string) *GetQuotaParams

WithXRequestID adds the xRequestID to the get quota params

func (*GetQuotaParams) WriteToRequest

func (o *GetQuotaParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetQuotaReader

type GetQuotaReader struct {
	// contains filtered or unexported fields
}

GetQuotaReader is a Reader for the GetQuota structure.

func (*GetQuotaReader) ReadResponse

func (o *GetQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetQuotaUnauthorized

type GetQuotaUnauthorized struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

GetQuotaUnauthorized handles this case with default header values.

Unauthorized

func NewGetQuotaUnauthorized

func NewGetQuotaUnauthorized() *GetQuotaUnauthorized

NewGetQuotaUnauthorized creates a GetQuotaUnauthorized with default headers values

func (*GetQuotaUnauthorized) Error

func (o *GetQuotaUnauthorized) Error() string

func (*GetQuotaUnauthorized) GetPayload

func (o *GetQuotaUnauthorized) GetPayload() *model.Errors

type ListQuotasForbidden

type ListQuotasForbidden struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

ListQuotasForbidden handles this case with default header values.

Forbidden

func NewListQuotasForbidden

func NewListQuotasForbidden() *ListQuotasForbidden

NewListQuotasForbidden creates a ListQuotasForbidden with default headers values

func (*ListQuotasForbidden) Error

func (o *ListQuotasForbidden) Error() string

func (*ListQuotasForbidden) GetPayload

func (o *ListQuotasForbidden) GetPayload() *model.Errors

type ListQuotasInternalServerError

type ListQuotasInternalServerError struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

ListQuotasInternalServerError handles this case with default header values.

Internal server error

func NewListQuotasInternalServerError

func NewListQuotasInternalServerError() *ListQuotasInternalServerError

NewListQuotasInternalServerError creates a ListQuotasInternalServerError with default headers values

func (*ListQuotasInternalServerError) Error

func (*ListQuotasInternalServerError) GetPayload

func (o *ListQuotasInternalServerError) GetPayload() *model.Errors

type ListQuotasOK

type ListQuotasOK struct {
	/*Link refers to the previous page and next page
	 */
	Link string
	/*The total count of access logs
	 */
	XTotalCount int64

	Payload []*model.Quota
}

ListQuotasOK handles this case with default header values.

Successfully retrieved the quotas.

func NewListQuotasOK

func NewListQuotasOK() *ListQuotasOK

NewListQuotasOK creates a ListQuotasOK with default headers values

func (*ListQuotasOK) Error

func (o *ListQuotasOK) Error() string

func (*ListQuotasOK) GetPayload

func (o *ListQuotasOK) GetPayload() []*model.Quota

type ListQuotasParams

type ListQuotasParams struct {

	/*XRequestID
	  An unique ID for the request

	*/
	XRequestID *string
	/*Page
	  The page number

	*/
	Page *int64
	/*PageSize
	  The size of per page

	*/
	PageSize *int64
	/*Reference
	  The reference type of quota.

	*/
	Reference *string
	/*ReferenceID
	  The reference id of quota.

	*/
	ReferenceID *string
	/*Sort
	  Sort method, valid values include:
	'hard.resource_name', '-hard.resource_name', 'used.resource_name', '-used.resource_name'.
	Here '-' stands for descending order, resource_name should be the real resource name of the quota.


	*/
	Sort *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ListQuotasParams contains all the parameters to send to the API endpoint for the list quotas operation typically these are written to a http.Request

func NewListQuotasParams

func NewListQuotasParams() *ListQuotasParams

NewListQuotasParams creates a new ListQuotasParams object with the default values initialized.

func NewListQuotasParamsWithContext

func NewListQuotasParamsWithContext(ctx context.Context) *ListQuotasParams

NewListQuotasParamsWithContext creates a new ListQuotasParams object with the default values initialized, and the ability to set a context for a request

func NewListQuotasParamsWithHTTPClient

func NewListQuotasParamsWithHTTPClient(client *http.Client) *ListQuotasParams

NewListQuotasParamsWithHTTPClient creates a new ListQuotasParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewListQuotasParamsWithTimeout

func NewListQuotasParamsWithTimeout(timeout time.Duration) *ListQuotasParams

NewListQuotasParamsWithTimeout creates a new ListQuotasParams object with the default values initialized, and the ability to set a timeout on a request

func (*ListQuotasParams) SetContext

func (o *ListQuotasParams) SetContext(ctx context.Context)

SetContext adds the context to the list quotas params

func (*ListQuotasParams) SetHTTPClient

func (o *ListQuotasParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the list quotas params

func (*ListQuotasParams) SetPage

func (o *ListQuotasParams) SetPage(page *int64)

SetPage adds the page to the list quotas params

func (*ListQuotasParams) SetPageSize

func (o *ListQuotasParams) SetPageSize(pageSize *int64)

SetPageSize adds the pageSize to the list quotas params

func (*ListQuotasParams) SetReference

func (o *ListQuotasParams) SetReference(reference *string)

SetReference adds the reference to the list quotas params

func (*ListQuotasParams) SetReferenceID

func (o *ListQuotasParams) SetReferenceID(referenceID *string)

SetReferenceID adds the referenceId to the list quotas params

func (*ListQuotasParams) SetSort

func (o *ListQuotasParams) SetSort(sort *string)

SetSort adds the sort to the list quotas params

func (*ListQuotasParams) SetTimeout

func (o *ListQuotasParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the list quotas params

func (*ListQuotasParams) SetXRequestID

func (o *ListQuotasParams) SetXRequestID(xRequestID *string)

SetXRequestID adds the xRequestId to the list quotas params

func (*ListQuotasParams) WithContext

func (o *ListQuotasParams) WithContext(ctx context.Context) *ListQuotasParams

WithContext adds the context to the list quotas params

func (*ListQuotasParams) WithHTTPClient

func (o *ListQuotasParams) WithHTTPClient(client *http.Client) *ListQuotasParams

WithHTTPClient adds the HTTPClient to the list quotas params

func (*ListQuotasParams) WithPage

func (o *ListQuotasParams) WithPage(page *int64) *ListQuotasParams

WithPage adds the page to the list quotas params

func (*ListQuotasParams) WithPageSize

func (o *ListQuotasParams) WithPageSize(pageSize *int64) *ListQuotasParams

WithPageSize adds the pageSize to the list quotas params

func (*ListQuotasParams) WithReference

func (o *ListQuotasParams) WithReference(reference *string) *ListQuotasParams

WithReference adds the reference to the list quotas params

func (*ListQuotasParams) WithReferenceID

func (o *ListQuotasParams) WithReferenceID(referenceID *string) *ListQuotasParams

WithReferenceID adds the referenceID to the list quotas params

func (*ListQuotasParams) WithSort

func (o *ListQuotasParams) WithSort(sort *string) *ListQuotasParams

WithSort adds the sort to the list quotas params

func (*ListQuotasParams) WithTimeout

func (o *ListQuotasParams) WithTimeout(timeout time.Duration) *ListQuotasParams

WithTimeout adds the timeout to the list quotas params

func (*ListQuotasParams) WithXRequestID

func (o *ListQuotasParams) WithXRequestID(xRequestID *string) *ListQuotasParams

WithXRequestID adds the xRequestID to the list quotas params

func (*ListQuotasParams) WriteToRequest

func (o *ListQuotasParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type ListQuotasReader

type ListQuotasReader struct {
	// contains filtered or unexported fields
}

ListQuotasReader is a Reader for the ListQuotas structure.

func (*ListQuotasReader) ReadResponse

func (o *ListQuotasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type ListQuotasUnauthorized

type ListQuotasUnauthorized struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

ListQuotasUnauthorized handles this case with default header values.

Unauthorized

func NewListQuotasUnauthorized

func NewListQuotasUnauthorized() *ListQuotasUnauthorized

NewListQuotasUnauthorized creates a ListQuotasUnauthorized with default headers values

func (*ListQuotasUnauthorized) Error

func (o *ListQuotasUnauthorized) Error() string

func (*ListQuotasUnauthorized) GetPayload

func (o *ListQuotasUnauthorized) GetPayload() *model.Errors

type UpdateQuotaBadRequest

type UpdateQuotaBadRequest struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

UpdateQuotaBadRequest handles this case with default header values.

Bad request

func NewUpdateQuotaBadRequest

func NewUpdateQuotaBadRequest() *UpdateQuotaBadRequest

NewUpdateQuotaBadRequest creates a UpdateQuotaBadRequest with default headers values

func (*UpdateQuotaBadRequest) Error

func (o *UpdateQuotaBadRequest) Error() string

func (*UpdateQuotaBadRequest) GetPayload

func (o *UpdateQuotaBadRequest) GetPayload() *model.Errors

type UpdateQuotaForbidden

type UpdateQuotaForbidden struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

UpdateQuotaForbidden handles this case with default header values.

Forbidden

func NewUpdateQuotaForbidden

func NewUpdateQuotaForbidden() *UpdateQuotaForbidden

NewUpdateQuotaForbidden creates a UpdateQuotaForbidden with default headers values

func (*UpdateQuotaForbidden) Error

func (o *UpdateQuotaForbidden) Error() string

func (*UpdateQuotaForbidden) GetPayload

func (o *UpdateQuotaForbidden) GetPayload() *model.Errors

type UpdateQuotaInternalServerError

type UpdateQuotaInternalServerError struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

UpdateQuotaInternalServerError handles this case with default header values.

Internal server error

func NewUpdateQuotaInternalServerError

func NewUpdateQuotaInternalServerError() *UpdateQuotaInternalServerError

NewUpdateQuotaInternalServerError creates a UpdateQuotaInternalServerError with default headers values

func (*UpdateQuotaInternalServerError) Error

func (*UpdateQuotaInternalServerError) GetPayload

func (o *UpdateQuotaInternalServerError) GetPayload() *model.Errors

type UpdateQuotaNotFound

type UpdateQuotaNotFound struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

UpdateQuotaNotFound handles this case with default header values.

Not found

func NewUpdateQuotaNotFound

func NewUpdateQuotaNotFound() *UpdateQuotaNotFound

NewUpdateQuotaNotFound creates a UpdateQuotaNotFound with default headers values

func (*UpdateQuotaNotFound) Error

func (o *UpdateQuotaNotFound) Error() string

func (*UpdateQuotaNotFound) GetPayload

func (o *UpdateQuotaNotFound) GetPayload() *model.Errors

type UpdateQuotaOK

type UpdateQuotaOK struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string
}

UpdateQuotaOK handles this case with default header values.

Success

func NewUpdateQuotaOK

func NewUpdateQuotaOK() *UpdateQuotaOK

NewUpdateQuotaOK creates a UpdateQuotaOK with default headers values

func (*UpdateQuotaOK) Error

func (o *UpdateQuotaOK) Error() string

type UpdateQuotaParams

type UpdateQuotaParams struct {

	/*XRequestID
	  An unique ID for the request

	*/
	XRequestID *string
	/*Hard
	  The new hard limits for the quota

	*/
	Hard *model.QuotaUpdateReq
	/*ID
	  Quota ID

	*/
	ID int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

UpdateQuotaParams contains all the parameters to send to the API endpoint for the update quota operation typically these are written to a http.Request

func NewUpdateQuotaParams

func NewUpdateQuotaParams() *UpdateQuotaParams

NewUpdateQuotaParams creates a new UpdateQuotaParams object with the default values initialized.

func NewUpdateQuotaParamsWithContext

func NewUpdateQuotaParamsWithContext(ctx context.Context) *UpdateQuotaParams

NewUpdateQuotaParamsWithContext creates a new UpdateQuotaParams object with the default values initialized, and the ability to set a context for a request

func NewUpdateQuotaParamsWithHTTPClient

func NewUpdateQuotaParamsWithHTTPClient(client *http.Client) *UpdateQuotaParams

NewUpdateQuotaParamsWithHTTPClient creates a new UpdateQuotaParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewUpdateQuotaParamsWithTimeout

func NewUpdateQuotaParamsWithTimeout(timeout time.Duration) *UpdateQuotaParams

NewUpdateQuotaParamsWithTimeout creates a new UpdateQuotaParams object with the default values initialized, and the ability to set a timeout on a request

func (*UpdateQuotaParams) SetContext

func (o *UpdateQuotaParams) SetContext(ctx context.Context)

SetContext adds the context to the update quota params

func (*UpdateQuotaParams) SetHTTPClient

func (o *UpdateQuotaParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the update quota params

func (*UpdateQuotaParams) SetHard

func (o *UpdateQuotaParams) SetHard(hard *model.QuotaUpdateReq)

SetHard adds the hard to the update quota params

func (*UpdateQuotaParams) SetID

func (o *UpdateQuotaParams) SetID(id int64)

SetID adds the id to the update quota params

func (*UpdateQuotaParams) SetTimeout

func (o *UpdateQuotaParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the update quota params

func (*UpdateQuotaParams) SetXRequestID

func (o *UpdateQuotaParams) SetXRequestID(xRequestID *string)

SetXRequestID adds the xRequestId to the update quota params

func (*UpdateQuotaParams) WithContext

func (o *UpdateQuotaParams) WithContext(ctx context.Context) *UpdateQuotaParams

WithContext adds the context to the update quota params

func (*UpdateQuotaParams) WithHTTPClient

func (o *UpdateQuotaParams) WithHTTPClient(client *http.Client) *UpdateQuotaParams

WithHTTPClient adds the HTTPClient to the update quota params

func (*UpdateQuotaParams) WithHard

WithHard adds the hard to the update quota params

func (*UpdateQuotaParams) WithID

func (o *UpdateQuotaParams) WithID(id int64) *UpdateQuotaParams

WithID adds the id to the update quota params

func (*UpdateQuotaParams) WithTimeout

func (o *UpdateQuotaParams) WithTimeout(timeout time.Duration) *UpdateQuotaParams

WithTimeout adds the timeout to the update quota params

func (*UpdateQuotaParams) WithXRequestID

func (o *UpdateQuotaParams) WithXRequestID(xRequestID *string) *UpdateQuotaParams

WithXRequestID adds the xRequestID to the update quota params

func (*UpdateQuotaParams) WriteToRequest

func (o *UpdateQuotaParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type UpdateQuotaReader

type UpdateQuotaReader struct {
	// contains filtered or unexported fields
}

UpdateQuotaReader is a Reader for the UpdateQuota structure.

func (*UpdateQuotaReader) ReadResponse

func (o *UpdateQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type UpdateQuotaUnauthorized

type UpdateQuotaUnauthorized struct {
	/*The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}

UpdateQuotaUnauthorized handles this case with default header values.

Unauthorized

func NewUpdateQuotaUnauthorized

func NewUpdateQuotaUnauthorized() *UpdateQuotaUnauthorized

NewUpdateQuotaUnauthorized creates a UpdateQuotaUnauthorized with default headers values

func (*UpdateQuotaUnauthorized) Error

func (o *UpdateQuotaUnauthorized) Error() string

func (*UpdateQuotaUnauthorized) GetPayload

func (o *UpdateQuotaUnauthorized) GetPayload() *model.Errors

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL