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