Add models
[ric-plt/xapp-frame.git] / pkg / restapi / operations / control / subscribe_control_responses.go
diff --git a/pkg/restapi/operations/control/subscribe_control_responses.go b/pkg/restapi/operations/control/subscribe_control_responses.go
new file mode 100644 (file)
index 0000000..7a56f7f
--- /dev/null
@@ -0,0 +1,109 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package control
+
+// 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"
+)
+
+// SubscribeControlCreatedCode is the HTTP code returned for type SubscribeControlCreated
+const SubscribeControlCreatedCode int = 201
+
+/*SubscribeControlCreated Subscription successfully created
+
+swagger:response subscribeControlCreated
+*/
+type SubscribeControlCreated struct {
+
+       /*
+         In: Body
+       */
+       Payload models.SubscriptionResult `json:"body,omitempty"`
+}
+
+// NewSubscribeControlCreated creates SubscribeControlCreated with default headers values
+func NewSubscribeControlCreated() *SubscribeControlCreated {
+
+       return &SubscribeControlCreated{}
+}
+
+// WithPayload adds the payload to the subscribe control created response
+func (o *SubscribeControlCreated) WithPayload(payload models.SubscriptionResult) *SubscribeControlCreated {
+       o.Payload = payload
+       return o
+}
+
+// SetPayload sets the payload to the subscribe control created response
+func (o *SubscribeControlCreated) SetPayload(payload models.SubscriptionResult) {
+       o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *SubscribeControlCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+       rw.WriteHeader(201)
+       payload := o.Payload
+       if payload == nil {
+               // return empty array
+               payload = models.SubscriptionResult{}
+       }
+
+       if err := producer.Produce(rw, payload); err != nil {
+               panic(err) // let the recovery middleware deal with this
+       }
+}
+
+// SubscribeControlBadRequestCode is the HTTP code returned for type SubscribeControlBadRequest
+const SubscribeControlBadRequestCode int = 400
+
+/*SubscribeControlBadRequest Invalid input
+
+swagger:response subscribeControlBadRequest
+*/
+type SubscribeControlBadRequest struct {
+}
+
+// NewSubscribeControlBadRequest creates SubscribeControlBadRequest with default headers values
+func NewSubscribeControlBadRequest() *SubscribeControlBadRequest {
+
+       return &SubscribeControlBadRequest{}
+}
+
+// WriteResponse to the client
+func (o *SubscribeControlBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+       rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
+
+       rw.WriteHeader(400)
+}
+
+// SubscribeControlInternalServerErrorCode is the HTTP code returned for type SubscribeControlInternalServerError
+const SubscribeControlInternalServerErrorCode int = 500
+
+/*SubscribeControlInternalServerError Internal error
+
+swagger:response subscribeControlInternalServerError
+*/
+type SubscribeControlInternalServerError struct {
+}
+
+// NewSubscribeControlInternalServerError creates SubscribeControlInternalServerError with default headers values
+func NewSubscribeControlInternalServerError() *SubscribeControlInternalServerError {
+
+       return &SubscribeControlInternalServerError{}
+}
+
+// WriteResponse to the client
+func (o *SubscribeControlInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+       rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
+
+       rw.WriteHeader(500)
+}