Add interface to read metrics
[ric-plt/xapp-frame.git] / pkg / restapi / operations / policy / subscribe_policy_responses.go
1 // Code generated by go-swagger; DO NOT EDIT.
2
3 package policy
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 // SubscribePolicyCreatedCode is the HTTP code returned for type SubscribePolicyCreated
17 const SubscribePolicyCreatedCode int = 201
18
19 /*SubscribePolicyCreated Subscription successfully created
20
21 swagger:response subscribePolicyCreated
22 */
23 type SubscribePolicyCreated struct {
24
25         /*
26           In: Body
27         */
28         Payload *models.SubscriptionResponse `json:"body,omitempty"`
29 }
30
31 // NewSubscribePolicyCreated creates SubscribePolicyCreated with default headers values
32 func NewSubscribePolicyCreated() *SubscribePolicyCreated {
33
34         return &SubscribePolicyCreated{}
35 }
36
37 // WithPayload adds the payload to the subscribe policy created response
38 func (o *SubscribePolicyCreated) WithPayload(payload *models.SubscriptionResponse) *SubscribePolicyCreated {
39         o.Payload = payload
40         return o
41 }
42
43 // SetPayload sets the payload to the subscribe policy created response
44 func (o *SubscribePolicyCreated) SetPayload(payload *models.SubscriptionResponse) {
45         o.Payload = payload
46 }
47
48 // WriteResponse to the client
49 func (o *SubscribePolicyCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
50
51         rw.WriteHeader(201)
52         if o.Payload != nil {
53                 payload := o.Payload
54                 if err := producer.Produce(rw, payload); err != nil {
55                         panic(err) // let the recovery middleware deal with this
56                 }
57         }
58 }
59
60 // SubscribePolicyBadRequestCode is the HTTP code returned for type SubscribePolicyBadRequest
61 const SubscribePolicyBadRequestCode int = 400
62
63 /*SubscribePolicyBadRequest Invalid input
64
65 swagger:response subscribePolicyBadRequest
66 */
67 type SubscribePolicyBadRequest struct {
68 }
69
70 // NewSubscribePolicyBadRequest creates SubscribePolicyBadRequest with default headers values
71 func NewSubscribePolicyBadRequest() *SubscribePolicyBadRequest {
72
73         return &SubscribePolicyBadRequest{}
74 }
75
76 // WriteResponse to the client
77 func (o *SubscribePolicyBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
78
79         rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
80
81         rw.WriteHeader(400)
82 }
83
84 // SubscribePolicyInternalServerErrorCode is the HTTP code returned for type SubscribePolicyInternalServerError
85 const SubscribePolicyInternalServerErrorCode int = 500
86
87 /*SubscribePolicyInternalServerError Internal error
88
89 swagger:response subscribePolicyInternalServerError
90 */
91 type SubscribePolicyInternalServerError struct {
92 }
93
94 // NewSubscribePolicyInternalServerError creates SubscribePolicyInternalServerError with default headers values
95 func NewSubscribePolicyInternalServerError() *SubscribePolicyInternalServerError {
96
97         return &SubscribePolicyInternalServerError{}
98 }
99
100 // WriteResponse to the client
101 func (o *SubscribePolicyInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
102
103         rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
104
105         rw.WriteHeader(500)
106 }