Enhancements of REST-based E2 subscription interface
[ric-plt/xapp-frame.git] / pkg / restapi / operations / common / subscribe_responses.go
diff --git a/pkg/restapi/operations/common/subscribe_responses.go b/pkg/restapi/operations/common/subscribe_responses.go
new file mode 100644 (file)
index 0000000..fc5515c
--- /dev/null
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package common
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+       "net/http"
+
+       "github.com/go-openapi/runtime"
+
+       models "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/models"
+)
+
+// SubscribeCreatedCode is the HTTP code returned for type SubscribeCreated
+const SubscribeCreatedCode int = 201
+
+/*SubscribeCreated Subscription successfully created
+
+swagger:response subscribeCreated
+*/
+type SubscribeCreated struct {
+
+       /*
+         In: Body
+       */
+       Payload *models.SubscriptionResponse `json:"body,omitempty"`
+}
+
+// NewSubscribeCreated creates SubscribeCreated with default headers values
+func NewSubscribeCreated() *SubscribeCreated {
+
+       return &SubscribeCreated{}
+}
+
+// WithPayload adds the payload to the subscribe created response
+func (o *SubscribeCreated) WithPayload(payload *models.SubscriptionResponse) *SubscribeCreated {
+       o.Payload = payload
+       return o
+}
+
+// SetPayload sets the payload to the subscribe created response
+func (o *SubscribeCreated) SetPayload(payload *models.SubscriptionResponse) {
+       o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *SubscribeCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+       rw.WriteHeader(201)
+       if o.Payload != nil {
+               payload := o.Payload
+               if err := producer.Produce(rw, payload); err != nil {
+                       panic(err) // let the recovery middleware deal with this
+               }
+       }
+}
+
+// SubscribeBadRequestCode is the HTTP code returned for type SubscribeBadRequest
+const SubscribeBadRequestCode int = 400
+
+/*SubscribeBadRequest Invalid input
+
+swagger:response subscribeBadRequest
+*/
+type SubscribeBadRequest struct {
+}
+
+// NewSubscribeBadRequest creates SubscribeBadRequest with default headers values
+func NewSubscribeBadRequest() *SubscribeBadRequest {
+
+       return &SubscribeBadRequest{}
+}
+
+// WriteResponse to the client
+func (o *SubscribeBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+       rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
+
+       rw.WriteHeader(400)
+}
+
+// SubscribeInternalServerErrorCode is the HTTP code returned for type SubscribeInternalServerError
+const SubscribeInternalServerErrorCode int = 500
+
+/*SubscribeInternalServerError Internal error
+
+swagger:response subscribeInternalServerError
+*/
+type SubscribeInternalServerError struct {
+}
+
+// NewSubscribeInternalServerError creates SubscribeInternalServerError with default headers values
+func NewSubscribeInternalServerError() *SubscribeInternalServerError {
+
+       return &SubscribeInternalServerError{}
+}
+
+// WriteResponse to the client
+func (o *SubscribeInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+       rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
+
+       rw.WriteHeader(500)
+}