Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
@@ -0,0 +1,334 @@
|
||||
// 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"
|
||||
|
||||
"fiskerinc.com/modules/ota_api/models"
|
||||
)
|
||||
|
||||
// DeleteSubscriptionconfigReader is a Reader for the DeleteSubscriptionconfig structure.
|
||||
type DeleteSubscriptionconfigReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *DeleteSubscriptionconfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewDeleteSubscriptionconfigOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 400:
|
||||
result := NewDeleteSubscriptionconfigBadRequest()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 401:
|
||||
result := NewDeleteSubscriptionconfigUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 503:
|
||||
result := NewDeleteSubscriptionconfigServiceUnavailable()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
default:
|
||||
return nil, runtime.NewAPIError("[DELETE /subscriptionconfig] DeleteSubscriptionconfig", response, response.Code())
|
||||
}
|
||||
}
|
||||
|
||||
// NewDeleteSubscriptionconfigOK creates a DeleteSubscriptionconfigOK with default headers values
|
||||
func NewDeleteSubscriptionconfigOK() *DeleteSubscriptionconfigOK {
|
||||
return &DeleteSubscriptionconfigOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
DeleteSubscriptionconfigOK describes a response with status code 200, with default header values.
|
||||
|
||||
OK
|
||||
*/
|
||||
type DeleteSubscriptionconfigOK struct {
|
||||
Payload *models.CommonJSONMessage
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this delete subscriptionconfig o k response has a 2xx status code
|
||||
func (o *DeleteSubscriptionconfigOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this delete subscriptionconfig o k response has a 3xx status code
|
||||
func (o *DeleteSubscriptionconfigOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this delete subscriptionconfig o k response has a 4xx status code
|
||||
func (o *DeleteSubscriptionconfigOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this delete subscriptionconfig o k response has a 5xx status code
|
||||
func (o *DeleteSubscriptionconfigOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this delete subscriptionconfig o k response a status code equal to that given
|
||||
func (o *DeleteSubscriptionconfigOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the delete subscriptionconfig o k response
|
||||
func (o *DeleteSubscriptionconfigOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigOK) Error() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[DELETE /subscriptionconfig][%d] deleteSubscriptionconfigOK %s", 200, payload)
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigOK) String() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[DELETE /subscriptionconfig][%d] deleteSubscriptionconfigOK %s", 200, payload)
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigOK) GetPayload() *models.CommonJSONMessage {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(models.CommonJSONMessage)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewDeleteSubscriptionconfigBadRequest creates a DeleteSubscriptionconfigBadRequest with default headers values
|
||||
func NewDeleteSubscriptionconfigBadRequest() *DeleteSubscriptionconfigBadRequest {
|
||||
return &DeleteSubscriptionconfigBadRequest{}
|
||||
}
|
||||
|
||||
/*
|
||||
DeleteSubscriptionconfigBadRequest describes a response with status code 400, with default header values.
|
||||
|
||||
Bad request
|
||||
*/
|
||||
type DeleteSubscriptionconfigBadRequest struct {
|
||||
Payload *models.CommonJSONError
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this delete subscriptionconfig bad request response has a 2xx status code
|
||||
func (o *DeleteSubscriptionconfigBadRequest) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this delete subscriptionconfig bad request response has a 3xx status code
|
||||
func (o *DeleteSubscriptionconfigBadRequest) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this delete subscriptionconfig bad request response has a 4xx status code
|
||||
func (o *DeleteSubscriptionconfigBadRequest) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this delete subscriptionconfig bad request response has a 5xx status code
|
||||
func (o *DeleteSubscriptionconfigBadRequest) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this delete subscriptionconfig bad request response a status code equal to that given
|
||||
func (o *DeleteSubscriptionconfigBadRequest) IsCode(code int) bool {
|
||||
return code == 400
|
||||
}
|
||||
|
||||
// Code gets the status code for the delete subscriptionconfig bad request response
|
||||
func (o *DeleteSubscriptionconfigBadRequest) Code() int {
|
||||
return 400
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigBadRequest) Error() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[DELETE /subscriptionconfig][%d] deleteSubscriptionconfigBadRequest %s", 400, payload)
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigBadRequest) String() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[DELETE /subscriptionconfig][%d] deleteSubscriptionconfigBadRequest %s", 400, payload)
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigBadRequest) GetPayload() *models.CommonJSONError {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigBadRequest) 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
|
||||
}
|
||||
|
||||
// NewDeleteSubscriptionconfigUnauthorized creates a DeleteSubscriptionconfigUnauthorized with default headers values
|
||||
func NewDeleteSubscriptionconfigUnauthorized() *DeleteSubscriptionconfigUnauthorized {
|
||||
return &DeleteSubscriptionconfigUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
DeleteSubscriptionconfigUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Unauthorized
|
||||
*/
|
||||
type DeleteSubscriptionconfigUnauthorized struct {
|
||||
Payload *models.CommonJSONError
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this delete subscriptionconfig unauthorized response has a 2xx status code
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this delete subscriptionconfig unauthorized response has a 3xx status code
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this delete subscriptionconfig unauthorized response has a 4xx status code
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this delete subscriptionconfig unauthorized response has a 5xx status code
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this delete subscriptionconfig unauthorized response a status code equal to that given
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the delete subscriptionconfig unauthorized response
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) Error() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[DELETE /subscriptionconfig][%d] deleteSubscriptionconfigUnauthorized %s", 401, payload)
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) String() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[DELETE /subscriptionconfig][%d] deleteSubscriptionconfigUnauthorized %s", 401, payload)
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) GetPayload() *models.CommonJSONError {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigUnauthorized) 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
|
||||
}
|
||||
|
||||
// NewDeleteSubscriptionconfigServiceUnavailable creates a DeleteSubscriptionconfigServiceUnavailable with default headers values
|
||||
func NewDeleteSubscriptionconfigServiceUnavailable() *DeleteSubscriptionconfigServiceUnavailable {
|
||||
return &DeleteSubscriptionconfigServiceUnavailable{}
|
||||
}
|
||||
|
||||
/*
|
||||
DeleteSubscriptionconfigServiceUnavailable describes a response with status code 503, with default header values.
|
||||
|
||||
Service unavailable
|
||||
*/
|
||||
type DeleteSubscriptionconfigServiceUnavailable struct {
|
||||
Payload *models.CommonJSONError
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this delete subscriptionconfig service unavailable response has a 2xx status code
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this delete subscriptionconfig service unavailable response has a 3xx status code
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this delete subscriptionconfig service unavailable response has a 4xx status code
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this delete subscriptionconfig service unavailable response has a 5xx status code
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this delete subscriptionconfig service unavailable response a status code equal to that given
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) IsCode(code int) bool {
|
||||
return code == 503
|
||||
}
|
||||
|
||||
// Code gets the status code for the delete subscriptionconfig service unavailable response
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) Code() int {
|
||||
return 503
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) Error() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[DELETE /subscriptionconfig][%d] deleteSubscriptionconfigServiceUnavailable %s", 503, payload)
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) String() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[DELETE /subscriptionconfig][%d] deleteSubscriptionconfigServiceUnavailable %s", 503, payload)
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) GetPayload() *models.CommonJSONError {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *DeleteSubscriptionconfigServiceUnavailable) 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
|
||||
}
|
||||
Reference in New Issue
Block a user