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
12 "github.com/go-openapi/runtime"
14 strfmt "github.com/go-openapi/strfmt"
16 clientmodel "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientmodel"
19 // SubscribeControlReader is a Reader for the SubscribeControl structure.
20 type SubscribeControlReader struct {
21 formats strfmt.Registry
24 // ReadResponse reads a server response into the received o.
25 func (o *SubscribeControlReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
26 switch response.Code() {
29 result := NewSubscribeControlCreated()
30 if err := result.readResponse(response, consumer, o.formats); err != nil {
36 result := NewSubscribeControlBadRequest()
37 if err := result.readResponse(response, consumer, o.formats); err != nil {
43 result := NewSubscribeControlInternalServerError()
44 if err := result.readResponse(response, consumer, o.formats); err != nil {
50 return nil, runtime.NewAPIError("unknown error", response, response.Code())
54 // NewSubscribeControlCreated creates a SubscribeControlCreated with default headers values
55 func NewSubscribeControlCreated() *SubscribeControlCreated {
56 return &SubscribeControlCreated{}
59 /*SubscribeControlCreated handles this case with default header values.
61 Subscription successfully created
63 type SubscribeControlCreated struct {
64 Payload clientmodel.SubscriptionResult
67 func (o *SubscribeControlCreated) Error() string {
68 return fmt.Sprintf("[POST /subscriptions/control][%d] subscribeControlCreated %+v", 201, o.Payload)
71 func (o *SubscribeControlCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
74 if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
81 // NewSubscribeControlBadRequest creates a SubscribeControlBadRequest with default headers values
82 func NewSubscribeControlBadRequest() *SubscribeControlBadRequest {
83 return &SubscribeControlBadRequest{}
86 /*SubscribeControlBadRequest handles this case with default header values.
90 type SubscribeControlBadRequest struct {
93 func (o *SubscribeControlBadRequest) Error() string {
94 return fmt.Sprintf("[POST /subscriptions/control][%d] subscribeControlBadRequest ", 400)
97 func (o *SubscribeControlBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
102 // NewSubscribeControlInternalServerError creates a SubscribeControlInternalServerError with default headers values
103 func NewSubscribeControlInternalServerError() *SubscribeControlInternalServerError {
104 return &SubscribeControlInternalServerError{}
107 /*SubscribeControlInternalServerError handles this case with default header values.
111 type SubscribeControlInternalServerError struct {
114 func (o *SubscribeControlInternalServerError) Error() string {
115 return fmt.Sprintf("[POST /subscriptions/control][%d] subscribeControlInternalServerError ", 500)
118 func (o *SubscribeControlInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {