Get interface for subscriptions
[ric-plt/xapp-frame.git] / pkg / restapi / operations / query / get_all_subscriptions_responses.go
1 // Code generated by go-swagger; DO NOT EDIT.
2
3 package query
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         "net/http"
10
11         "github.com/go-openapi/runtime"
12
13         models "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/models"
14 )
15
16 // GetAllSubscriptionsOKCode is the HTTP code returned for type GetAllSubscriptionsOK
17 const GetAllSubscriptionsOKCode int = 200
18
19 /*GetAllSubscriptionsOK successful query of subscriptions
20
21 swagger:response getAllSubscriptionsOK
22 */
23 type GetAllSubscriptionsOK struct {
24
25         /*
26           In: Body
27         */
28         Payload models.SubscriptionList `json:"body,omitempty"`
29 }
30
31 // NewGetAllSubscriptionsOK creates GetAllSubscriptionsOK with default headers values
32 func NewGetAllSubscriptionsOK() *GetAllSubscriptionsOK {
33
34         return &GetAllSubscriptionsOK{}
35 }
36
37 // WithPayload adds the payload to the get all subscriptions o k response
38 func (o *GetAllSubscriptionsOK) WithPayload(payload models.SubscriptionList) *GetAllSubscriptionsOK {
39         o.Payload = payload
40         return o
41 }
42
43 // SetPayload sets the payload to the get all subscriptions o k response
44 func (o *GetAllSubscriptionsOK) SetPayload(payload models.SubscriptionList) {
45         o.Payload = payload
46 }
47
48 // WriteResponse to the client
49 func (o *GetAllSubscriptionsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
50
51         rw.WriteHeader(200)
52         payload := o.Payload
53         if payload == nil {
54                 // return empty array
55                 payload = models.SubscriptionList{}
56         }
57
58         if err := producer.Produce(rw, payload); err != nil {
59                 panic(err) // let the recovery middleware deal with this
60         }
61 }
62
63 // GetAllSubscriptionsInternalServerErrorCode is the HTTP code returned for type GetAllSubscriptionsInternalServerError
64 const GetAllSubscriptionsInternalServerErrorCode int = 500
65
66 /*GetAllSubscriptionsInternalServerError Internal error
67
68 swagger:response getAllSubscriptionsInternalServerError
69 */
70 type GetAllSubscriptionsInternalServerError struct {
71 }
72
73 // NewGetAllSubscriptionsInternalServerError creates GetAllSubscriptionsInternalServerError with default headers values
74 func NewGetAllSubscriptionsInternalServerError() *GetAllSubscriptionsInternalServerError {
75
76         return &GetAllSubscriptionsInternalServerError{}
77 }
78
79 // WriteResponse to the client
80 func (o *GetAllSubscriptionsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
81
82         rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
83
84         rw.WriteHeader(500)
85 }