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 policy 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 SubscribePolicy subscribes and send p o l i c y message to r a n to execute a specific p o l i c y during call processing in r a n after each occurrence of a defined s u b s c r IP t i o n
30 func (a *Client) SubscribePolicy(params *SubscribePolicyParams) (*SubscribePolicyCreated, error) {
31 // TODO: Validate the params before sending
33 params = NewSubscribePolicyParams()
36 result, err := a.transport.Submit(&runtime.ClientOperation{
37 ID: "subscribePolicy",
39 PathPattern: "/subscriptions/policy",
40 ProducesMediaTypes: []string{"application/json"},
41 ConsumesMediaTypes: []string{"application/json"},
42 Schemes: []string{"http"},
44 Reader: &SubscribePolicyReader{formats: a.formats},
45 Context: params.Context,
46 Client: params.HTTPClient,
51 return result.(*SubscribePolicyCreated), nil
55 // SetTransport changes the transport on the client
56 func (a *Client) SetTransport(transport runtime.ClientTransport) {
57 a.transport = transport