RIC:1060: Change in PTL
[ric-plt/xapp-frame.git] / pkg / clientapi / common / unsubscribe_responses.go
1 // Code generated by go-swagger; DO NOT EDIT.
2
3 package 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
8 import (
9         "fmt"
10
11         "github.com/go-openapi/runtime"
12         "github.com/go-openapi/strfmt"
13 )
14
15 // UnsubscribeReader is a Reader for the Unsubscribe structure.
16 type UnsubscribeReader struct {
17         formats strfmt.Registry
18 }
19
20 // ReadResponse reads a server response into the received o.
21 func (o *UnsubscribeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
22         switch response.Code() {
23         case 204:
24                 result := NewUnsubscribeNoContent()
25                 if err := result.readResponse(response, consumer, o.formats); err != nil {
26                         return nil, err
27                 }
28                 return result, nil
29         case 400:
30                 result := NewUnsubscribeBadRequest()
31                 if err := result.readResponse(response, consumer, o.formats); err != nil {
32                         return nil, err
33                 }
34                 return nil, result
35         case 500:
36                 result := NewUnsubscribeInternalServerError()
37                 if err := result.readResponse(response, consumer, o.formats); err != nil {
38                         return nil, err
39                 }
40                 return nil, result
41
42         default:
43                 return nil, runtime.NewAPIError("unknown error", response, response.Code())
44         }
45 }
46
47 // NewUnsubscribeNoContent creates a UnsubscribeNoContent with default headers values
48 func NewUnsubscribeNoContent() *UnsubscribeNoContent {
49         return &UnsubscribeNoContent{}
50 }
51
52 /*UnsubscribeNoContent handles this case with default header values.
53
54 Operation done successfully
55 */
56 type UnsubscribeNoContent struct {
57 }
58
59 func (o *UnsubscribeNoContent) Error() string {
60         return fmt.Sprintf("[DELETE /subscriptions/{subscriptionId}][%d] unsubscribeNoContent ", 204)
61 }
62
63 func (o *UnsubscribeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
64
65         return nil
66 }
67
68 // NewUnsubscribeBadRequest creates a UnsubscribeBadRequest with default headers values
69 func NewUnsubscribeBadRequest() *UnsubscribeBadRequest {
70         return &UnsubscribeBadRequest{}
71 }
72
73 /*UnsubscribeBadRequest handles this case with default header values.
74
75 Invalid subscriptionId supplied
76 */
77 type UnsubscribeBadRequest struct {
78 }
79
80 func (o *UnsubscribeBadRequest) Error() string {
81         return fmt.Sprintf("[DELETE /subscriptions/{subscriptionId}][%d] unsubscribeBadRequest ", 400)
82 }
83
84 func (o *UnsubscribeBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
85
86         return nil
87 }
88
89 // NewUnsubscribeInternalServerError creates a UnsubscribeInternalServerError with default headers values
90 func NewUnsubscribeInternalServerError() *UnsubscribeInternalServerError {
91         return &UnsubscribeInternalServerError{}
92 }
93
94 /*UnsubscribeInternalServerError handles this case with default header values.
95
96 Internal error
97 */
98 type UnsubscribeInternalServerError struct {
99 }
100
101 func (o *UnsubscribeInternalServerError) Error() string {
102         return fmt.Sprintf("[DELETE /subscriptions/{subscriptionId}][%d] unsubscribeInternalServerError ", 500)
103 }
104
105 func (o *UnsubscribeInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
106
107         return nil
108 }