1 // Code generated by go-swagger; DO NOT EDIT.
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the swagger generate command
11 "github.com/go-openapi/runtime"
13 models "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/models"
16 // SubscribePolicyCreatedCode is the HTTP code returned for type SubscribePolicyCreated
17 const SubscribePolicyCreatedCode int = 201
19 /*SubscribePolicyCreated Subscription successfully created
21 swagger:response subscribePolicyCreated
23 type SubscribePolicyCreated struct {
28 Payload models.SubscriptionResult `json:"body,omitempty"`
31 // NewSubscribePolicyCreated creates SubscribePolicyCreated with default headers values
32 func NewSubscribePolicyCreated() *SubscribePolicyCreated {
34 return &SubscribePolicyCreated{}
37 // WithPayload adds the payload to the subscribe policy created response
38 func (o *SubscribePolicyCreated) WithPayload(payload models.SubscriptionResult) *SubscribePolicyCreated {
43 // SetPayload sets the payload to the subscribe policy created response
44 func (o *SubscribePolicyCreated) SetPayload(payload models.SubscriptionResult) {
48 // WriteResponse to the client
49 func (o *SubscribePolicyCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
55 payload = models.SubscriptionResult{}
58 if err := producer.Produce(rw, payload); err != nil {
59 panic(err) // let the recovery middleware deal with this
63 // SubscribePolicyBadRequestCode is the HTTP code returned for type SubscribePolicyBadRequest
64 const SubscribePolicyBadRequestCode int = 400
66 /*SubscribePolicyBadRequest Invalid input
68 swagger:response subscribePolicyBadRequest
70 type SubscribePolicyBadRequest struct {
73 // NewSubscribePolicyBadRequest creates SubscribePolicyBadRequest with default headers values
74 func NewSubscribePolicyBadRequest() *SubscribePolicyBadRequest {
76 return &SubscribePolicyBadRequest{}
79 // WriteResponse to the client
80 func (o *SubscribePolicyBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
82 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
87 // SubscribePolicyInternalServerErrorCode is the HTTP code returned for type SubscribePolicyInternalServerError
88 const SubscribePolicyInternalServerErrorCode int = 500
90 /*SubscribePolicyInternalServerError Internal error
92 swagger:response subscribePolicyInternalServerError
94 type SubscribePolicyInternalServerError struct {
97 // NewSubscribePolicyInternalServerError creates SubscribePolicyInternalServerError with default headers values
98 func NewSubscribePolicyInternalServerError() *SubscribePolicyInternalServerError {
100 return &SubscribePolicyInternalServerError{}
103 // WriteResponse to the client
104 func (o *SubscribePolicyInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
106 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses