335 lines
11 KiB
Go
335 lines
11 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
|
|
"github.com/fiskerinc/cloud-services/pkg/ota_api/models"
|
|
)
|
|
|
|
// GetSubscriptionconfigsReader is a Reader for the GetSubscriptionconfigs structure.
|
|
type GetSubscriptionconfigsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetSubscriptionconfigsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetSubscriptionconfigsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewGetSubscriptionconfigsBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewGetSubscriptionconfigsUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 503:
|
|
result := NewGetSubscriptionconfigsServiceUnavailable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /subscriptionconfigs] GetSubscriptionconfigs", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetSubscriptionconfigsOK creates a GetSubscriptionconfigsOK with default headers values
|
|
func NewGetSubscriptionconfigsOK() *GetSubscriptionconfigsOK {
|
|
return &GetSubscriptionconfigsOK{}
|
|
}
|
|
|
|
/*
|
|
GetSubscriptionconfigsOK describes a response with status code 200, with default header values.
|
|
|
|
OK
|
|
*/
|
|
type GetSubscriptionconfigsOK struct {
|
|
Payload *models.CommonJSONDBQueryResult
|
|
}
|
|
|
|
// IsSuccess returns true when this get subscriptionconfigs o k response has a 2xx status code
|
|
func (o *GetSubscriptionconfigsOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get subscriptionconfigs o k response has a 3xx status code
|
|
func (o *GetSubscriptionconfigsOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get subscriptionconfigs o k response has a 4xx status code
|
|
func (o *GetSubscriptionconfigsOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get subscriptionconfigs o k response has a 5xx status code
|
|
func (o *GetSubscriptionconfigsOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get subscriptionconfigs o k response a status code equal to that given
|
|
func (o *GetSubscriptionconfigsOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get subscriptionconfigs o k response
|
|
func (o *GetSubscriptionconfigsOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /subscriptionconfigs][%d] getSubscriptionconfigsOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /subscriptionconfigs][%d] getSubscriptionconfigsOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsOK) GetPayload() *models.CommonJSONDBQueryResult {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.CommonJSONDBQueryResult)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetSubscriptionconfigsBadRequest creates a GetSubscriptionconfigsBadRequest with default headers values
|
|
func NewGetSubscriptionconfigsBadRequest() *GetSubscriptionconfigsBadRequest {
|
|
return &GetSubscriptionconfigsBadRequest{}
|
|
}
|
|
|
|
/*
|
|
GetSubscriptionconfigsBadRequest describes a response with status code 400, with default header values.
|
|
|
|
Bad request
|
|
*/
|
|
type GetSubscriptionconfigsBadRequest struct {
|
|
Payload *models.CommonJSONError
|
|
}
|
|
|
|
// IsSuccess returns true when this get subscriptionconfigs bad request response has a 2xx status code
|
|
func (o *GetSubscriptionconfigsBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get subscriptionconfigs bad request response has a 3xx status code
|
|
func (o *GetSubscriptionconfigsBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get subscriptionconfigs bad request response has a 4xx status code
|
|
func (o *GetSubscriptionconfigsBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get subscriptionconfigs bad request response has a 5xx status code
|
|
func (o *GetSubscriptionconfigsBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get subscriptionconfigs bad request response a status code equal to that given
|
|
func (o *GetSubscriptionconfigsBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the get subscriptionconfigs bad request response
|
|
func (o *GetSubscriptionconfigsBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsBadRequest) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /subscriptionconfigs][%d] getSubscriptionconfigsBadRequest %s", 400, payload)
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsBadRequest) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /subscriptionconfigs][%d] getSubscriptionconfigsBadRequest %s", 400, payload)
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsBadRequest) GetPayload() *models.CommonJSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.CommonJSONError)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetSubscriptionconfigsUnauthorized creates a GetSubscriptionconfigsUnauthorized with default headers values
|
|
func NewGetSubscriptionconfigsUnauthorized() *GetSubscriptionconfigsUnauthorized {
|
|
return &GetSubscriptionconfigsUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetSubscriptionconfigsUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Unauthorized
|
|
*/
|
|
type GetSubscriptionconfigsUnauthorized struct {
|
|
Payload *models.CommonJSONError
|
|
}
|
|
|
|
// IsSuccess returns true when this get subscriptionconfigs unauthorized response has a 2xx status code
|
|
func (o *GetSubscriptionconfigsUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get subscriptionconfigs unauthorized response has a 3xx status code
|
|
func (o *GetSubscriptionconfigsUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get subscriptionconfigs unauthorized response has a 4xx status code
|
|
func (o *GetSubscriptionconfigsUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get subscriptionconfigs unauthorized response has a 5xx status code
|
|
func (o *GetSubscriptionconfigsUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get subscriptionconfigs unauthorized response a status code equal to that given
|
|
func (o *GetSubscriptionconfigsUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get subscriptionconfigs unauthorized response
|
|
func (o *GetSubscriptionconfigsUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsUnauthorized) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /subscriptionconfigs][%d] getSubscriptionconfigsUnauthorized %s", 401, payload)
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsUnauthorized) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /subscriptionconfigs][%d] getSubscriptionconfigsUnauthorized %s", 401, payload)
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsUnauthorized) GetPayload() *models.CommonJSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.CommonJSONError)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetSubscriptionconfigsServiceUnavailable creates a GetSubscriptionconfigsServiceUnavailable with default headers values
|
|
func NewGetSubscriptionconfigsServiceUnavailable() *GetSubscriptionconfigsServiceUnavailable {
|
|
return &GetSubscriptionconfigsServiceUnavailable{}
|
|
}
|
|
|
|
/*
|
|
GetSubscriptionconfigsServiceUnavailable describes a response with status code 503, with default header values.
|
|
|
|
Service unavailable
|
|
*/
|
|
type GetSubscriptionconfigsServiceUnavailable struct {
|
|
Payload *models.CommonJSONError
|
|
}
|
|
|
|
// IsSuccess returns true when this get subscriptionconfigs service unavailable response has a 2xx status code
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get subscriptionconfigs service unavailable response has a 3xx status code
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get subscriptionconfigs service unavailable response has a 4xx status code
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get subscriptionconfigs service unavailable response has a 5xx status code
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get subscriptionconfigs service unavailable response a status code equal to that given
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) IsCode(code int) bool {
|
|
return code == 503
|
|
}
|
|
|
|
// Code gets the status code for the get subscriptionconfigs service unavailable response
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) Code() int {
|
|
return 503
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /subscriptionconfigs][%d] getSubscriptionconfigsServiceUnavailable %s", 503, payload)
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /subscriptionconfigs][%d] getSubscriptionconfigsServiceUnavailable %s", 503, payload)
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) GetPayload() *models.CommonJSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetSubscriptionconfigsServiceUnavailable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.CommonJSONError)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|