1 // Code generated by go-swagger; DO NOT EDIT.
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the swagger generate command
11 "github.com/go-openapi/runtime"
12 "github.com/go-openapi/strfmt"
15 // New creates a new xapp API client.
16 func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
17 return &Client{transport: transport, formats: formats}
24 transport runtime.ClientTransport
25 formats strfmt.Registry
28 // ClientService is the interface for Client methods
29 type ClientService interface {
30 GetXappConfigList(params *GetXappConfigListParams) (*GetXappConfigListOK, error)
32 SetTransport(transport runtime.ClientTransport)
36 GetXappConfigList returns the configuration of all xapps
38 func (a *Client) GetXappConfigList(params *GetXappConfigListParams) (*GetXappConfigListOK, error) {
39 // TODO: Validate the params before sending
41 params = NewGetXappConfigListParams()
44 result, err := a.transport.Submit(&runtime.ClientOperation{
45 ID: "getXappConfigList",
47 PathPattern: "/config",
48 ProducesMediaTypes: []string{"application/json", "application/xml"},
49 ConsumesMediaTypes: []string{"application/json"},
50 Schemes: []string{"http"},
52 Reader: &GetXappConfigListReader{formats: a.formats},
53 Context: params.Context,
54 Client: params.HTTPClient,
59 success, ok := result.(*GetXappConfigListOK)
63 // unexpected success response
64 // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
65 msg := fmt.Sprintf("unexpected success response for getXappConfigList: API contract not enforced by server. Client expected to get an error, but got: %T", result)
69 // SetTransport changes the transport on the client
70 func (a *Client) SetTransport(transport runtime.ClientTransport) {
71 a.transport = transport