Add optional subscription ID
[ric-plt/xapp-frame.git] / pkg / restapi / operations / common / subscribe_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         "net/http"
10
11         "github.com/go-openapi/runtime"
12
13         "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/models"
14 )
15
16 // SubscribeCreatedCode is the HTTP code returned for type SubscribeCreated
17 const SubscribeCreatedCode int = 201
18
19 /*SubscribeCreated Subscription successfully created
20
21 swagger:response subscribeCreated
22 */
23 type SubscribeCreated struct {
24
25         /*
26           In: Body
27         */
28         Payload *models.SubscriptionResponse `json:"body,omitempty"`
29 }
30
31 // NewSubscribeCreated creates SubscribeCreated with default headers values
32 func NewSubscribeCreated() *SubscribeCreated {
33
34         return &SubscribeCreated{}
35 }
36
37 // WithPayload adds the payload to the subscribe created response
38 func (o *SubscribeCreated) WithPayload(payload *models.SubscriptionResponse) *SubscribeCreated {
39         o.Payload = payload
40         return o
41 }
42
43 // SetPayload sets the payload to the subscribe created response
44 func (o *SubscribeCreated) SetPayload(payload *models.SubscriptionResponse) {
45         o.Payload = payload
46 }
47
48 // WriteResponse to the client
49 func (o *SubscribeCreated) 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 // SubscribeBadRequestCode is the HTTP code returned for type SubscribeBadRequest
61 const SubscribeBadRequestCode int = 400
62
63 /*SubscribeBadRequest Invalid input
64
65 swagger:response subscribeBadRequest
66 */
67 type SubscribeBadRequest struct {
68 }
69
70 // NewSubscribeBadRequest creates SubscribeBadRequest with default headers values
71 func NewSubscribeBadRequest() *SubscribeBadRequest {
72
73         return &SubscribeBadRequest{}
74 }
75
76 // WriteResponse to the client
77 func (o *SubscribeBadRequest) 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 // SubscribeInternalServerErrorCode is the HTTP code returned for type SubscribeInternalServerError
85 const SubscribeInternalServerErrorCode int = 500
86
87 /*SubscribeInternalServerError Internal error
88
89 swagger:response subscribeInternalServerError
90 */
91 type SubscribeInternalServerError struct {
92 }
93
94 // NewSubscribeInternalServerError creates SubscribeInternalServerError with default headers values
95 func NewSubscribeInternalServerError() *SubscribeInternalServerError {
96
97         return &SubscribeInternalServerError{}
98 }
99
100 // WriteResponse to the client
101 func (o *SubscribeInternalServerError) 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 }