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
9 "github.com/go-openapi/runtime"
11 strfmt "github.com/go-openapi/strfmt"
14 // New creates a new common API client.
15 func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
16 return &Client{transport: transport, formats: formats}
23 transport runtime.ClientTransport
24 formats strfmt.Registry
28 Subscribe subscribes a list of x2 a p event triggers to receive messages sent by r a n
30 func (a *Client) Subscribe(params *SubscribeParams) (*SubscribeCreated, error) {
31 // TODO: Validate the params before sending
33 params = NewSubscribeParams()
36 result, err := a.transport.Submit(&runtime.ClientOperation{
39 PathPattern: "/subscriptions",
40 ProducesMediaTypes: []string{"application/json"},
41 ConsumesMediaTypes: []string{"application/json"},
42 Schemes: []string{"http"},
44 Reader: &SubscribeReader{formats: a.formats},
45 Context: params.Context,
46 Client: params.HTTPClient,
51 return result.(*SubscribeCreated), nil
56 Unsubscribe unsubscribes x2 a p events from subscription manager
58 func (a *Client) Unsubscribe(params *UnsubscribeParams) (*UnsubscribeNoContent, error) {
59 // TODO: Validate the params before sending
61 params = NewUnsubscribeParams()
64 result, err := a.transport.Submit(&runtime.ClientOperation{
67 PathPattern: "/subscriptions/{subscriptionId}",
68 ProducesMediaTypes: []string{"application/json"},
69 ConsumesMediaTypes: []string{"application/json"},
70 Schemes: []string{"http"},
72 Reader: &UnsubscribeReader{formats: a.formats},
73 Context: params.Context,
74 Client: params.HTTPClient,
79 return result.(*UnsubscribeNoContent), nil
84 GetAllSubscriptions returns list of subscriptions
86 func (a *Client) GetAllSubscriptions(params *GetAllSubscriptionsParams) (*GetAllSubscriptionsOK, error) {
87 // TODO: Validate the params before sending
89 params = NewGetAllSubscriptionsParams()
92 result, err := a.transport.Submit(&runtime.ClientOperation{
93 ID: "getAllSubscriptions",
95 PathPattern: "/subscriptions",
96 ProducesMediaTypes: []string{"application/json"},
97 ConsumesMediaTypes: []string{""},
98 Schemes: []string{"http"},
100 Reader: &GetAllSubscriptionsReader{formats: a.formats},
101 Context: params.Context,
102 Client: params.HTTPClient,
107 return result.(*GetAllSubscriptionsOK), nil
111 // SetTransport changes the transport on the client
112 func (a *Client) SetTransport(transport runtime.ClientTransport) {
113 a.transport = transport