| // Code generated by go-swagger; DO NOT EDIT. |
| |
| package control |
| |
| // This file was generated by the swagger tool. |
| // Editing this file might prove futile when you re-run the swagger generate command |
| |
| import ( |
| "github.com/go-openapi/runtime" |
| |
| strfmt "github.com/go-openapi/strfmt" |
| ) |
| |
| // New creates a new control API client. |
| func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { |
| return &Client{transport: transport, formats: formats} |
| } |
| |
| /* |
| Client for control API |
| */ |
| type Client struct { |
| transport runtime.ClientTransport |
| formats strfmt.Registry |
| } |
| |
| /* |
| SubscribeControl subscribes and send c o n t r o l message to r a n to initiate or resume call processing in r a n |
| */ |
| func (a *Client) SubscribeControl(params *SubscribeControlParams) (*SubscribeControlCreated, error) { |
| // TODO: Validate the params before sending |
| if params == nil { |
| params = NewSubscribeControlParams() |
| } |
| |
| result, err := a.transport.Submit(&runtime.ClientOperation{ |
| ID: "subscribeControl", |
| Method: "POST", |
| PathPattern: "/subscriptions/control", |
| ProducesMediaTypes: []string{"application/json"}, |
| ConsumesMediaTypes: []string{"application/json"}, |
| Schemes: []string{"http"}, |
| Params: params, |
| Reader: &SubscribeControlReader{formats: a.formats}, |
| Context: params.Context, |
| Client: params.HTTPClient, |
| }) |
| if err != nil { |
| return nil, err |
| } |
| return result.(*SubscribeControlCreated), nil |
| |
| } |
| |
| // SetTransport changes the transport on the client |
| func (a *Client) SetTransport(transport runtime.ClientTransport) { |
| a.transport = transport |
| } |