Add interface to read metrics
[ric-plt/xapp-frame.git] / pkg / clientapi / common / get_all_subscriptions_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         "io"
11
12         "github.com/go-openapi/runtime"
13
14         strfmt "github.com/go-openapi/strfmt"
15
16         clientmodel "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientmodel"
17 )
18
19 // GetAllSubscriptionsReader is a Reader for the GetAllSubscriptions structure.
20 type GetAllSubscriptionsReader struct {
21         formats strfmt.Registry
22 }
23
24 // ReadResponse reads a server response into the received o.
25 func (o *GetAllSubscriptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
26         switch response.Code() {
27
28         case 200:
29                 result := NewGetAllSubscriptionsOK()
30                 if err := result.readResponse(response, consumer, o.formats); err != nil {
31                         return nil, err
32                 }
33                 return result, nil
34
35         case 500:
36                 result := NewGetAllSubscriptionsInternalServerError()
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 // NewGetAllSubscriptionsOK creates a GetAllSubscriptionsOK with default headers values
48 func NewGetAllSubscriptionsOK() *GetAllSubscriptionsOK {
49         return &GetAllSubscriptionsOK{}
50 }
51
52 /*GetAllSubscriptionsOK handles this case with default header values.
53
54 successful query of subscriptions
55 */
56 type GetAllSubscriptionsOK struct {
57         Payload clientmodel.SubscriptionList
58 }
59
60 func (o *GetAllSubscriptionsOK) Error() string {
61         return fmt.Sprintf("[GET /subscriptions][%d] getAllSubscriptionsOK  %+v", 200, o.Payload)
62 }
63
64 func (o *GetAllSubscriptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
65
66         // response payload
67         if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
68                 return err
69         }
70
71         return nil
72 }
73
74 // NewGetAllSubscriptionsInternalServerError creates a GetAllSubscriptionsInternalServerError with default headers values
75 func NewGetAllSubscriptionsInternalServerError() *GetAllSubscriptionsInternalServerError {
76         return &GetAllSubscriptionsInternalServerError{}
77 }
78
79 /*GetAllSubscriptionsInternalServerError handles this case with default header values.
80
81 Internal error
82 */
83 type GetAllSubscriptionsInternalServerError struct {
84 }
85
86 func (o *GetAllSubscriptionsInternalServerError) Error() string {
87         return fmt.Sprintf("[GET /subscriptions][%d] getAllSubscriptionsInternalServerError ", 500)
88 }
89
90 func (o *GetAllSubscriptionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
91
92         return nil
93 }