plans

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: BSD-3-Clause, MIT Imports: 14 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 plans API

func (*Client) GetBandwidthPlans

func (a *Client) GetBandwidthPlans(params *GetBandwidthPlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBandwidthPlansOK, error)

GetBandwidthPlans lists all bandwidth plans

Lists all bandwidth plans.

func (*Client) GetPlan

func (a *Client) GetPlan(params *GetPlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPlanOK, error)

GetPlan retrieves a plan

func (*Client) GetPlans

func (a *Client) GetPlans(params *GetPlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPlansOK, error)

GetPlans lists all plans

Lists all plans. Availability by region is included in `attributes.regions.locations.available[*]` node for a given plan.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	GetBandwidthPlans(params *GetBandwidthPlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBandwidthPlansOK, error)

	GetPlan(params *GetPlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPlanOK, error)

	GetPlans(params *GetPlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPlansOK, 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 plans API client.

type GetBandwidthPlansOK

type GetBandwidthPlansOK struct {
	Payload *models.BandwidthPlans
}

GetBandwidthPlansOK describes a response with status code 200, with default header values.

Success

func NewGetBandwidthPlansOK

func NewGetBandwidthPlansOK() *GetBandwidthPlansOK

NewGetBandwidthPlansOK creates a GetBandwidthPlansOK with default headers values

func (*GetBandwidthPlansOK) Code

func (o *GetBandwidthPlansOK) Code() int

Code gets the status code for the get bandwidth plans o k response

func (*GetBandwidthPlansOK) Error

func (o *GetBandwidthPlansOK) Error() string

func (*GetBandwidthPlansOK) GetData

func (o *GetBandwidthPlansOK) GetData() []renderer.ResponseData

func (*GetBandwidthPlansOK) GetPayload

func (o *GetBandwidthPlansOK) GetPayload() *models.BandwidthPlans

func (*GetBandwidthPlansOK) IsClientError

func (o *GetBandwidthPlansOK) IsClientError() bool

IsClientError returns true when this get bandwidth plans o k response has a 4xx status code

func (*GetBandwidthPlansOK) IsCode

func (o *GetBandwidthPlansOK) IsCode(code int) bool

IsCode returns true when this get bandwidth plans o k response a status code equal to that given

func (*GetBandwidthPlansOK) IsRedirect

func (o *GetBandwidthPlansOK) IsRedirect() bool

IsRedirect returns true when this get bandwidth plans o k response has a 3xx status code

func (*GetBandwidthPlansOK) IsServerError

func (o *GetBandwidthPlansOK) IsServerError() bool

IsServerError returns true when this get bandwidth plans o k response has a 5xx status code

func (*GetBandwidthPlansOK) IsSuccess

func (o *GetBandwidthPlansOK) IsSuccess() bool

IsSuccess returns true when this get bandwidth plans o k response has a 2xx status code

func (*GetBandwidthPlansOK) String

func (o *GetBandwidthPlansOK) String() string

type GetBandwidthPlansParams

type GetBandwidthPlansParams struct {

	/* FilterID.

	   The plan ID to filter by
	*/
	FilterID *string

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

GetBandwidthPlansParams contains all the parameters to send to the API endpoint

for the get bandwidth plans operation.

Typically these are written to a http.Request.

func NewGetBandwidthPlansParams

func NewGetBandwidthPlansParams() *GetBandwidthPlansParams

NewGetBandwidthPlansParams creates a new GetBandwidthPlansParams 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 NewGetBandwidthPlansParamsWithContext

func NewGetBandwidthPlansParamsWithContext(ctx context.Context) *GetBandwidthPlansParams

NewGetBandwidthPlansParamsWithContext creates a new GetBandwidthPlansParams object with the ability to set a context for a request.

func NewGetBandwidthPlansParamsWithHTTPClient

func NewGetBandwidthPlansParamsWithHTTPClient(client *http.Client) *GetBandwidthPlansParams

NewGetBandwidthPlansParamsWithHTTPClient creates a new GetBandwidthPlansParams object with the ability to set a custom HTTPClient for a request.

func NewGetBandwidthPlansParamsWithTimeout

func NewGetBandwidthPlansParamsWithTimeout(timeout time.Duration) *GetBandwidthPlansParams

NewGetBandwidthPlansParamsWithTimeout creates a new GetBandwidthPlansParams object with the ability to set a timeout on a request.

func (*GetBandwidthPlansParams) SetContext

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

SetContext adds the context to the get bandwidth plans params

func (*GetBandwidthPlansParams) SetDefaults

func (o *GetBandwidthPlansParams) SetDefaults()

SetDefaults hydrates default values in the get bandwidth plans params (not the query body).

All values with no default are reset to their zero value.

func (*GetBandwidthPlansParams) SetFilterID

func (o *GetBandwidthPlansParams) SetFilterID(filterID *string)

SetFilterID adds the filterId to the get bandwidth plans params

func (*GetBandwidthPlansParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get bandwidth plans params

func (*GetBandwidthPlansParams) SetTimeout

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

SetTimeout adds the timeout to the get bandwidth plans params

func (*GetBandwidthPlansParams) WithContext

WithContext adds the context to the get bandwidth plans params

func (*GetBandwidthPlansParams) WithDefaults

WithDefaults hydrates default values in the get bandwidth plans params (not the query body).

All values with no default are reset to their zero value.

func (*GetBandwidthPlansParams) WithFilterID

func (o *GetBandwidthPlansParams) WithFilterID(filterID *string) *GetBandwidthPlansParams

WithFilterID adds the filterID to the get bandwidth plans params

func (*GetBandwidthPlansParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get bandwidth plans params

func (*GetBandwidthPlansParams) WithTimeout

WithTimeout adds the timeout to the get bandwidth plans params

func (*GetBandwidthPlansParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetBandwidthPlansReader

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

GetBandwidthPlansReader is a Reader for the GetBandwidthPlans structure.

func (*GetBandwidthPlansReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetPlanOK

type GetPlanOK struct {
	Payload *models.Plan
}

GetPlanOK describes a response with status code 200, with default header values.

Success

func NewGetPlanOK

func NewGetPlanOK() *GetPlanOK

NewGetPlanOK creates a GetPlanOK with default headers values

func (*GetPlanOK) Code

func (o *GetPlanOK) Code() int

Code gets the status code for the get plan o k response

func (*GetPlanOK) Error

func (o *GetPlanOK) Error() string

func (*GetPlanOK) GetData

func (o *GetPlanOK) GetData() []renderer.ResponseData

func (*GetPlanOK) GetPayload

func (o *GetPlanOK) GetPayload() *models.Plan

func (*GetPlanOK) IsClientError

func (o *GetPlanOK) IsClientError() bool

IsClientError returns true when this get plan o k response has a 4xx status code

func (*GetPlanOK) IsCode

func (o *GetPlanOK) IsCode(code int) bool

IsCode returns true when this get plan o k response a status code equal to that given

func (*GetPlanOK) IsRedirect

func (o *GetPlanOK) IsRedirect() bool

IsRedirect returns true when this get plan o k response has a 3xx status code

func (*GetPlanOK) IsServerError

func (o *GetPlanOK) IsServerError() bool

IsServerError returns true when this get plan o k response has a 5xx status code

func (*GetPlanOK) IsSuccess

func (o *GetPlanOK) IsSuccess() bool

IsSuccess returns true when this get plan o k response has a 2xx status code

func (*GetPlanOK) String

func (o *GetPlanOK) String() string

type GetPlanParams

type GetPlanParams struct {

	// PlanID.
	PlanID string

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

GetPlanParams contains all the parameters to send to the API endpoint

for the get plan operation.

Typically these are written to a http.Request.

func NewGetPlanParams

func NewGetPlanParams() *GetPlanParams

NewGetPlanParams creates a new GetPlanParams 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 NewGetPlanParamsWithContext

func NewGetPlanParamsWithContext(ctx context.Context) *GetPlanParams

NewGetPlanParamsWithContext creates a new GetPlanParams object with the ability to set a context for a request.

func NewGetPlanParamsWithHTTPClient

func NewGetPlanParamsWithHTTPClient(client *http.Client) *GetPlanParams

NewGetPlanParamsWithHTTPClient creates a new GetPlanParams object with the ability to set a custom HTTPClient for a request.

func NewGetPlanParamsWithTimeout

func NewGetPlanParamsWithTimeout(timeout time.Duration) *GetPlanParams

NewGetPlanParamsWithTimeout creates a new GetPlanParams object with the ability to set a timeout on a request.

func (*GetPlanParams) SetContext

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

SetContext adds the context to the get plan params

func (*GetPlanParams) SetDefaults

func (o *GetPlanParams) SetDefaults()

SetDefaults hydrates default values in the get plan params (not the query body).

All values with no default are reset to their zero value.

func (*GetPlanParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get plan params

func (*GetPlanParams) SetPlanID

func (o *GetPlanParams) SetPlanID(planID string)

SetPlanID adds the planId to the get plan params

func (*GetPlanParams) SetTimeout

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

SetTimeout adds the timeout to the get plan params

func (*GetPlanParams) WithContext

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

WithContext adds the context to the get plan params

func (*GetPlanParams) WithDefaults

func (o *GetPlanParams) WithDefaults() *GetPlanParams

WithDefaults hydrates default values in the get plan params (not the query body).

All values with no default are reset to their zero value.

func (*GetPlanParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get plan params

func (*GetPlanParams) WithPlanID

func (o *GetPlanParams) WithPlanID(planID string) *GetPlanParams

WithPlanID adds the planID to the get plan params

func (*GetPlanParams) WithTimeout

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

WithTimeout adds the timeout to the get plan params

func (*GetPlanParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetPlanReader

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

GetPlanReader is a Reader for the GetPlan structure.

func (*GetPlanReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetPlansOK

type GetPlansOK struct {
	Payload *GetPlansOKBody
}

GetPlansOK describes a response with status code 200, with default header values.

Success

func NewGetPlansOK

func NewGetPlansOK() *GetPlansOK

NewGetPlansOK creates a GetPlansOK with default headers values

func (*GetPlansOK) Code

func (o *GetPlansOK) Code() int

Code gets the status code for the get plans o k response

func (*GetPlansOK) Error

func (o *GetPlansOK) Error() string

func (*GetPlansOK) GetData

func (o *GetPlansOK) GetData() []renderer.ResponseData

func (*GetPlansOK) GetPayload

func (o *GetPlansOK) GetPayload() *GetPlansOKBody

func (*GetPlansOK) IsClientError

func (o *GetPlansOK) IsClientError() bool

IsClientError returns true when this get plans o k response has a 4xx status code

func (*GetPlansOK) IsCode

func (o *GetPlansOK) IsCode(code int) bool

IsCode returns true when this get plans o k response a status code equal to that given

func (*GetPlansOK) IsRedirect

func (o *GetPlansOK) IsRedirect() bool

IsRedirect returns true when this get plans o k response has a 3xx status code

func (*GetPlansOK) IsServerError

func (o *GetPlansOK) IsServerError() bool

IsServerError returns true when this get plans o k response has a 5xx status code

func (*GetPlansOK) IsSuccess

func (o *GetPlansOK) IsSuccess() bool

IsSuccess returns true when this get plans o k response has a 2xx status code

func (*GetPlansOK) String

func (o *GetPlansOK) String() string

type GetPlansOKBody

type GetPlansOKBody struct {

	// data
	Data []*models.PlanData `json:"data"`
}

GetPlansOKBody get plans o k body swagger:model GetPlansOKBody

func (*GetPlansOKBody) ContextValidate

func (o *GetPlansOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get plans o k body based on the context it is used

func (*GetPlansOKBody) MarshalBinary

func (o *GetPlansOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetPlansOKBody) UnmarshalBinary

func (o *GetPlansOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetPlansOKBody) Validate

func (o *GetPlansOKBody) Validate(formats strfmt.Registry) error

Validate validates this get plans o k body

type GetPlansParams

type GetPlansParams struct {

	/* FilterDisk.

	   The disk size in Gigabytes to filter by, should be used with the following options:
	                            [eql] to filter for values equal to the provided value.
	                            [gte] to filter for values greater or equal to the provided value.
	                            [lte] to filter by values lower or equal to the provided value.
	*/
	FilterDiskEql *int64
	FilterDiskLte *int64
	FilterDiskGte *int64

	/* FilterGpu.

	   Filter by the existence of an associated GPU
	*/
	FilterGpu *bool

	/* FilterInStock.

	   The stock available at the site to filter by
	*/
	FilterInStock *bool

	/* FilterLocation.

	   The location of the site to filter by
	*/
	FilterLocation *string

	/* FilterName.

	   The plan name to filter by
	*/
	FilterName *string

	/* FilterRAM.

	   The ram size in Gigabytes to filter by, should be used with the following options:
	                            [eql] to filter for values equal to the provided value.
	                            [gte] to filter for values greater or equal to the provided value.
	                            [lte] to filter by values lower or equal to the provided value.
	*/
	FilterRAMEql *int64
	FilterRAMLte *int64
	FilterRAMGte *int64

	/* FilterSlug.

	   The plan slug to filter by
	*/
	FilterSlug *string

	/* FilterStockLevel.

	   The stock level at the site to filter by
	*/
	FilterStockLevel *string

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

GetPlansParams contains all the parameters to send to the API endpoint

for the get plans operation.

Typically these are written to a http.Request.

func NewGetPlansParams

func NewGetPlansParams() *GetPlansParams

NewGetPlansParams creates a new GetPlansParams 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 NewGetPlansParamsWithContext

func NewGetPlansParamsWithContext(ctx context.Context) *GetPlansParams

NewGetPlansParamsWithContext creates a new GetPlansParams object with the ability to set a context for a request.

func NewGetPlansParamsWithHTTPClient

func NewGetPlansParamsWithHTTPClient(client *http.Client) *GetPlansParams

NewGetPlansParamsWithHTTPClient creates a new GetPlansParams object with the ability to set a custom HTTPClient for a request.

func NewGetPlansParamsWithTimeout

func NewGetPlansParamsWithTimeout(timeout time.Duration) *GetPlansParams

NewGetPlansParamsWithTimeout creates a new GetPlansParams object with the ability to set a timeout on a request.

func (*GetPlansParams) SetContext

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

SetContext adds the context to the get plans params

func (*GetPlansParams) SetDefaults

func (o *GetPlansParams) SetDefaults()

SetDefaults hydrates default values in the get plans params (not the query body).

All values with no default are reset to their zero value.

func (*GetPlansParams) SetFilterDiskEql

func (o *GetPlansParams) SetFilterDiskEql(filterDiskEql *int64)

SetFilterDiskEql adds the filterDiskEql to the get plans params

func (*GetPlansParams) SetFilterGpu

func (o *GetPlansParams) SetFilterGpu(filterGpu *bool)

SetFilterGpu adds the filterGpu to the get plans params

func (*GetPlansParams) SetFilterInStock

func (o *GetPlansParams) SetFilterInStock(filterInStock *bool)

SetFilterInStock adds the filterInStock to the get plans params

func (*GetPlansParams) SetFilterLocation

func (o *GetPlansParams) SetFilterLocation(filterLocation *string)

SetFilterLocation adds the filterLocation to the get plans params

func (*GetPlansParams) SetFilterName

func (o *GetPlansParams) SetFilterName(filterName *string)

SetFilterName adds the filterName to the get plans params

func (*GetPlansParams) SetFilterRAMEql

func (o *GetPlansParams) SetFilterRAMEql(filterRAMEql *int64)

SetFilterRAMEql adds the filterRamEql to the get plans params

func (*GetPlansParams) SetFilterRAMGte

func (o *GetPlansParams) SetFilterRAMGte(filterRAMGte *int64)

SetFilterRAMGte adds the filterRamGte to the get plans params

func (*GetPlansParams) SetFilterRAMLte

func (o *GetPlansParams) SetFilterRAMLte(filterRAMLte *int64)

SetFilterRAMLte adds the filterRamLte to the get plans params

func (*GetPlansParams) SetFilterSlug

func (o *GetPlansParams) SetFilterSlug(filterSlug *string)

SetFilterSlug adds the filterSlug to the get plans params

func (*GetPlansParams) SetFilterStockLevel

func (o *GetPlansParams) SetFilterStockLevel(filterStockLevel *string)

SetFilterStockLevel adds the filterStockLevel to the get plans params

func (*GetPlansParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get plans params

func (*GetPlansParams) SetTimeout

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

SetTimeout adds the timeout to the get plans params

func (*GetPlansParams) WithContext

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

WithContext adds the context to the get plans params

func (*GetPlansParams) WithDefaults

func (o *GetPlansParams) WithDefaults() *GetPlansParams

WithDefaults hydrates default values in the get plans params (not the query body).

All values with no default are reset to their zero value.

func (*GetPlansParams) WithFilterDiskEql

func (o *GetPlansParams) WithFilterDiskEql(filterDiskEql *int64) *GetPlansParams

WithFilterDiskEql adds the filterDiskEql to the get plans params

func (*GetPlansParams) WithFilterGpu

func (o *GetPlansParams) WithFilterGpu(filterGpu *bool) *GetPlansParams

WithFilterGpu adds the filterGpu to the get plans params

func (*GetPlansParams) WithFilterInStock

func (o *GetPlansParams) WithFilterInStock(filterInStock *bool) *GetPlansParams

WithFilterInStock adds the filterInStock to the get plans params

func (*GetPlansParams) WithFilterLocation

func (o *GetPlansParams) WithFilterLocation(filterLocation *string) *GetPlansParams

WithFilterLocation adds the filterLocation to the get plans params

func (*GetPlansParams) WithFilterName

func (o *GetPlansParams) WithFilterName(filterName *string) *GetPlansParams

WithFilterName adds the filterName to the get plans params

func (*GetPlansParams) WithFilterRAMEql

func (o *GetPlansParams) WithFilterRAMEql(filterRAMEql *int64) *GetPlansParams

WithFilterRAMEql adds the filterRAMEql to the get plans params

func (*GetPlansParams) WithFilterRAMGte

func (o *GetPlansParams) WithFilterRAMGte(filterRAMGte *int64) *GetPlansParams

WithFilterRAMGte adds the filterRAMGte to the get plans params

func (*GetPlansParams) WithFilterRAMLte

func (o *GetPlansParams) WithFilterRAMLte(filterRAMLte *int64) *GetPlansParams

WithFilterRAMLte adds the filterRAMLte to the get plans params

func (*GetPlansParams) WithFilterSlug

func (o *GetPlansParams) WithFilterSlug(filterSlug *string) *GetPlansParams

WithFilterSlug adds the filterSlug to the get plans params

func (*GetPlansParams) WithFilterStockLevel

func (o *GetPlansParams) WithFilterStockLevel(filterStockLevel *string) *GetPlansParams

WithFilterStockLevel adds the filterStockLevel to the get plans params

func (*GetPlansParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get plans params

func (*GetPlansParams) WithTimeout

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

WithTimeout adds the timeout to the get plans params

func (*GetPlansParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetPlansReader

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

GetPlansReader is a Reader for the GetPlans structure.

func (*GetPlansReader) ReadResponse

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

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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