blob: b88df189a5213e144c8e489c26649905d587ea7e [file] [log] [blame]
Mohamed Abukar3895a8c2020-02-10 09:48:59 +02001// Code generated by go-swagger; DO NOT EDIT.
2
3package common
4
5// This file was generated by the swagger tool.
6// Editing this file might prove futile when you re-run the swagger generate command
7
8import (
9 "github.com/go-openapi/runtime"
10
11 strfmt "github.com/go-openapi/strfmt"
12)
13
14// New creates a new common API client.
15func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
16 return &Client{transport: transport, formats: formats}
17}
18
19/*
20Client for common API
21*/
22type Client struct {
23 transport runtime.ClientTransport
24 formats strfmt.Registry
25}
26
27/*
28Unsubscribe unsubscribes x2 a p events from subscription manager
29*/
30func (a *Client) Unsubscribe(params *UnsubscribeParams) (*UnsubscribeNoContent, error) {
31 // TODO: Validate the params before sending
32 if params == nil {
33 params = NewUnsubscribeParams()
34 }
35
36 result, err := a.transport.Submit(&runtime.ClientOperation{
37 ID: "Unsubscribe",
38 Method: "DELETE",
39 PathPattern: "/subscriptions/{subscriptionId}",
40 ProducesMediaTypes: []string{""},
41 ConsumesMediaTypes: []string{""},
42 Schemes: []string{"http"},
43 Params: params,
44 Reader: &UnsubscribeReader{formats: a.formats},
45 Context: params.Context,
46 Client: params.HTTPClient,
47 })
48 if err != nil {
49 return nil, err
50 }
51 return result.(*UnsubscribeNoContent), nil
52
53}
54
55// SetTransport changes the transport on the client
56func (a *Client) SetTransport(transport runtime.ClientTransport) {
57 a.transport = transport
58}