Add interface to read metrics
[ric-plt/xapp-frame.git] / pkg / restapi / operations / report / subscribe_report_responses.go
1 // Code generated by go-swagger; DO NOT EDIT.
2
3 package report
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 // SubscribeReportCreatedCode is the HTTP code returned for type SubscribeReportCreated
17 const SubscribeReportCreatedCode int = 201
18
19 /*SubscribeReportCreated Subscription successfully created
20
21 swagger:response subscribeReportCreated
22 */
23 type SubscribeReportCreated struct {
24
25         /*
26           In: Body
27         */
28         Payload *models.SubscriptionResponse `json:"body,omitempty"`
29 }
30
31 // NewSubscribeReportCreated creates SubscribeReportCreated with default headers values
32 func NewSubscribeReportCreated() *SubscribeReportCreated {
33
34         return &SubscribeReportCreated{}
35 }
36
37 // WithPayload adds the payload to the subscribe report created response
38 func (o *SubscribeReportCreated) WithPayload(payload *models.SubscriptionResponse) *SubscribeReportCreated {
39         o.Payload = payload
40         return o
41 }
42
43 // SetPayload sets the payload to the subscribe report created response
44 func (o *SubscribeReportCreated) SetPayload(payload *models.SubscriptionResponse) {
45         o.Payload = payload
46 }
47
48 // WriteResponse to the client
49 func (o *SubscribeReportCreated) 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 // SubscribeReportBadRequestCode is the HTTP code returned for type SubscribeReportBadRequest
61 const SubscribeReportBadRequestCode int = 400
62
63 /*SubscribeReportBadRequest Invalid input
64
65 swagger:response subscribeReportBadRequest
66 */
67 type SubscribeReportBadRequest struct {
68 }
69
70 // NewSubscribeReportBadRequest creates SubscribeReportBadRequest with default headers values
71 func NewSubscribeReportBadRequest() *SubscribeReportBadRequest {
72
73         return &SubscribeReportBadRequest{}
74 }
75
76 // WriteResponse to the client
77 func (o *SubscribeReportBadRequest) 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 // SubscribeReportInternalServerErrorCode is the HTTP code returned for type SubscribeReportInternalServerError
85 const SubscribeReportInternalServerErrorCode int = 500
86
87 /*SubscribeReportInternalServerError Internal error
88
89 swagger:response subscribeReportInternalServerError
90 */
91 type SubscribeReportInternalServerError struct {
92 }
93
94 // NewSubscribeReportInternalServerError creates SubscribeReportInternalServerError with default headers values
95 func NewSubscribeReportInternalServerError() *SubscribeReportInternalServerError {
96
97         return &SubscribeReportInternalServerError{}
98 }
99
100 // WriteResponse to the client
101 func (o *SubscribeReportInternalServerError) 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 }