X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frestapi%2Foperations%2Fcommon%2Fget_all_subscriptions_responses.go;fp=pkg%2Frestapi%2Foperations%2Fcommon%2Fget_all_subscriptions_responses.go;h=d1e8f0a58a8aaacb58c7bd30f9901b40204af258;hb=3602bf801fef17e317cb35a4c710118ec80908b9;hp=0000000000000000000000000000000000000000;hpb=060448c051013852d463bc13bfc5f0aa3696ac9c;p=ric-plt%2Fxapp-frame.git 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 index 0000000..d1e8f0a --- /dev/null +++ b/pkg/restapi/operations/common/get_all_subscriptions_responses.go @@ -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) +}