You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
198 lines
5.6 KiB
198 lines
5.6 KiB
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package bundle_management
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
|
|
strfmt "github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
//go:generate mockery -name API -inpkg
|
|
|
|
// API is the interface of the bundle management client
|
|
type API interface {
|
|
/*
|
|
CreateSkuBundle creates s k u bundle
|
|
|
|
Creates a new sku bundle*/
|
|
CreateSkuBundle(ctx context.Context, params *CreateSkuBundleParams) (*CreateSkuBundleCreated, error)
|
|
/*
|
|
GetSkuBundle gets specific sku bundle
|
|
|
|
get sku bundle with given id*/
|
|
GetSkuBundle(ctx context.Context, params *GetSkuBundleParams) (*GetSkuBundleOK, error)
|
|
/*
|
|
GetSkuBundleByName gets specific sku bundle
|
|
|
|
get sku bundle with given name*/
|
|
GetSkuBundleByName(ctx context.Context, params *GetSkuBundleByNameParams) (*GetSkuBundleByNameOK, error)
|
|
/*
|
|
ListSkuBundles lists s k u bundles
|
|
|
|
lists all sku bundles*/
|
|
ListSkuBundles(ctx context.Context, params *ListSkuBundlesParams) (*ListSkuBundlesOK, error)
|
|
/*
|
|
UpdateSkuBundle updates specific sku bundle
|
|
|
|
Update sku bundle with given id*/
|
|
UpdateSkuBundle(ctx context.Context, params *UpdateSkuBundleParams) (*UpdateSkuBundleOK, error)
|
|
}
|
|
|
|
// New creates a new bundle management API client.
|
|
func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client {
|
|
return &Client{
|
|
transport: transport,
|
|
formats: formats,
|
|
authInfo: authInfo,
|
|
}
|
|
}
|
|
|
|
/*
|
|
Client for bundle management API
|
|
*/
|
|
type Client struct {
|
|
transport runtime.ClientTransport
|
|
formats strfmt.Registry
|
|
authInfo runtime.ClientAuthInfoWriter
|
|
}
|
|
|
|
/*
|
|
CreateSkuBundle creates s k u bundle
|
|
|
|
Creates a new sku bundle
|
|
*/
|
|
func (a *Client) CreateSkuBundle(ctx context.Context, params *CreateSkuBundleParams) (*CreateSkuBundleCreated, error) {
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "createSkuBundle",
|
|
Method: "POST",
|
|
PathPattern: "/sku/bundle",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http", "https"},
|
|
Params: params,
|
|
Reader: &CreateSkuBundleReader{formats: a.formats},
|
|
AuthInfo: a.authInfo,
|
|
Context: ctx,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*CreateSkuBundleCreated), nil
|
|
|
|
}
|
|
|
|
/*
|
|
GetSkuBundle gets specific sku bundle
|
|
|
|
get sku bundle with given id
|
|
*/
|
|
func (a *Client) GetSkuBundle(ctx context.Context, params *GetSkuBundleParams) (*GetSkuBundleOK, error) {
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "getSkuBundle",
|
|
Method: "GET",
|
|
PathPattern: "/sku/bundle/{id}",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http", "https"},
|
|
Params: params,
|
|
Reader: &GetSkuBundleReader{formats: a.formats},
|
|
AuthInfo: a.authInfo,
|
|
Context: ctx,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*GetSkuBundleOK), nil
|
|
|
|
}
|
|
|
|
/*
|
|
GetSkuBundleByName gets specific sku bundle
|
|
|
|
get sku bundle with given name
|
|
*/
|
|
func (a *Client) GetSkuBundleByName(ctx context.Context, params *GetSkuBundleByNameParams) (*GetSkuBundleByNameOK, error) {
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "getSkuBundleByName",
|
|
Method: "GET",
|
|
PathPattern: "/sku/bundle/name/{name}",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http", "https"},
|
|
Params: params,
|
|
Reader: &GetSkuBundleByNameReader{formats: a.formats},
|
|
AuthInfo: a.authInfo,
|
|
Context: ctx,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*GetSkuBundleByNameOK), nil
|
|
|
|
}
|
|
|
|
/*
|
|
ListSkuBundles lists s k u bundles
|
|
|
|
lists all sku bundles
|
|
*/
|
|
func (a *Client) ListSkuBundles(ctx context.Context, params *ListSkuBundlesParams) (*ListSkuBundlesOK, error) {
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "listSkuBundles",
|
|
Method: "GET",
|
|
PathPattern: "/sku/bundle",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http", "https"},
|
|
Params: params,
|
|
Reader: &ListSkuBundlesReader{formats: a.formats},
|
|
AuthInfo: a.authInfo,
|
|
Context: ctx,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*ListSkuBundlesOK), nil
|
|
|
|
}
|
|
|
|
/*
|
|
UpdateSkuBundle updates specific sku bundle
|
|
|
|
Update sku bundle with given id
|
|
*/
|
|
func (a *Client) UpdateSkuBundle(ctx context.Context, params *UpdateSkuBundleParams) (*UpdateSkuBundleOK, error) {
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "updateSkuBundle",
|
|
Method: "PUT",
|
|
PathPattern: "/sku/bundle/{id}",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http", "https"},
|
|
Params: params,
|
|
Reader: &UpdateSkuBundleReader{formats: a.formats},
|
|
AuthInfo: a.authInfo,
|
|
Context: ctx,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*UpdateSkuBundleOK), nil
|
|
|
|
}
|
|
|