Enhancements of REST-based E2 subscription interface
[ric-plt/xapp-frame.git] / pkg / restapi / operations / common / get_all_subscriptions_responses.go
diff --git a/pkg/restapi/operations/common/get_all_subscriptions_responses.go b/pkg/restapi/operations/common/get_all_subscriptions_responses.go
new file mode 100644 (file)
index 0000000..d1e8f0a
--- /dev/null
@@ -0,0 +1,85 @@
+// 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"
+)
+
+// GetAllSubscriptionsOKCode is the HTTP code returned for type GetAllSubscriptionsOK
+const GetAllSubscriptionsOKCode int = 200
+
+/*GetAllSubscriptionsOK successful query of subscriptions
+
+swagger:response getAllSubscriptionsOK
+*/
+type GetAllSubscriptionsOK struct {
+
+       /*
+         In: Body
+       */
+       Payload models.SubscriptionList `json:"body,omitempty"`
+}
+
+// NewGetAllSubscriptionsOK creates GetAllSubscriptionsOK with default headers values
+func NewGetAllSubscriptionsOK() *GetAllSubscriptionsOK {
+
+       return &GetAllSubscriptionsOK{}
+}
+
+// WithPayload adds the payload to the get all subscriptions o k response
+func (o *GetAllSubscriptionsOK) WithPayload(payload models.SubscriptionList) *GetAllSubscriptionsOK {
+       o.Payload = payload
+       return o
+}
+
+// SetPayload sets the payload to the get all subscriptions o k response
+func (o *GetAllSubscriptionsOK) SetPayload(payload models.SubscriptionList) {
+       o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *GetAllSubscriptionsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+       rw.WriteHeader(200)
+       payload := o.Payload
+       if payload == nil {
+               // return empty array
+               payload = models.SubscriptionList{}
+       }
+
+       if err := producer.Produce(rw, payload); err != nil {
+               panic(err) // let the recovery middleware deal with this
+       }
+}
+
+// GetAllSubscriptionsInternalServerErrorCode is the HTTP code returned for type GetAllSubscriptionsInternalServerError
+const GetAllSubscriptionsInternalServerErrorCode int = 500
+
+/*GetAllSubscriptionsInternalServerError Internal error
+
+swagger:response getAllSubscriptionsInternalServerError
+*/
+type GetAllSubscriptionsInternalServerError struct {
+}
+
+// NewGetAllSubscriptionsInternalServerError creates GetAllSubscriptionsInternalServerError with default headers values
+func NewGetAllSubscriptionsInternalServerError() *GetAllSubscriptionsInternalServerError {
+
+       return &GetAllSubscriptionsInternalServerError{}
+}
+
+// WriteResponse to the client
+func (o *GetAllSubscriptionsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+       rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
+
+       rw.WriteHeader(500)
+}