All checks were successful
continuous-integration/drone/push Build is passing
293 lines
9.8 KiB
Go
293 lines
9.8 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package interaction_policies
|
|
|
|
// 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"
|
|
|
|
"git.coopcloud.tech/decentral1se/gtslib/models"
|
|
)
|
|
|
|
// PoliciesDefaultsGetReader is a Reader for the PoliciesDefaultsGet structure.
|
|
type PoliciesDefaultsGetReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *PoliciesDefaultsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewPoliciesDefaultsGetOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewPoliciesDefaultsGetUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 406:
|
|
result := NewPoliciesDefaultsGetNotAcceptable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewPoliciesDefaultsGetInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /api/v1/interaction_policies/defaults] policiesDefaultsGet", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewPoliciesDefaultsGetOK creates a PoliciesDefaultsGetOK with default headers values
|
|
func NewPoliciesDefaultsGetOK() *PoliciesDefaultsGetOK {
|
|
return &PoliciesDefaultsGetOK{}
|
|
}
|
|
|
|
/*
|
|
PoliciesDefaultsGetOK describes a response with status code 200, with default header values.
|
|
|
|
A default policies object containing a policy for each status visibility.
|
|
*/
|
|
type PoliciesDefaultsGetOK struct {
|
|
Payload *models.DefaultPolicies
|
|
}
|
|
|
|
// IsSuccess returns true when this policies defaults get o k response has a 2xx status code
|
|
func (o *PoliciesDefaultsGetOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this policies defaults get o k response has a 3xx status code
|
|
func (o *PoliciesDefaultsGetOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this policies defaults get o k response has a 4xx status code
|
|
func (o *PoliciesDefaultsGetOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this policies defaults get o k response has a 5xx status code
|
|
func (o *PoliciesDefaultsGetOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this policies defaults get o k response a status code equal to that given
|
|
func (o *PoliciesDefaultsGetOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the policies defaults get o k response
|
|
func (o *PoliciesDefaultsGetOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/interaction_policies/defaults][%d] policiesDefaultsGetOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/interaction_policies/defaults][%d] policiesDefaultsGetOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetOK) GetPayload() *models.DefaultPolicies {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.DefaultPolicies)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPoliciesDefaultsGetUnauthorized creates a PoliciesDefaultsGetUnauthorized with default headers values
|
|
func NewPoliciesDefaultsGetUnauthorized() *PoliciesDefaultsGetUnauthorized {
|
|
return &PoliciesDefaultsGetUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
PoliciesDefaultsGetUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type PoliciesDefaultsGetUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this policies defaults get unauthorized response has a 2xx status code
|
|
func (o *PoliciesDefaultsGetUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this policies defaults get unauthorized response has a 3xx status code
|
|
func (o *PoliciesDefaultsGetUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this policies defaults get unauthorized response has a 4xx status code
|
|
func (o *PoliciesDefaultsGetUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this policies defaults get unauthorized response has a 5xx status code
|
|
func (o *PoliciesDefaultsGetUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this policies defaults get unauthorized response a status code equal to that given
|
|
func (o *PoliciesDefaultsGetUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the policies defaults get unauthorized response
|
|
func (o *PoliciesDefaultsGetUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/interaction_policies/defaults][%d] policiesDefaultsGetUnauthorized", 401)
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/interaction_policies/defaults][%d] policiesDefaultsGetUnauthorized", 401)
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPoliciesDefaultsGetNotAcceptable creates a PoliciesDefaultsGetNotAcceptable with default headers values
|
|
func NewPoliciesDefaultsGetNotAcceptable() *PoliciesDefaultsGetNotAcceptable {
|
|
return &PoliciesDefaultsGetNotAcceptable{}
|
|
}
|
|
|
|
/*
|
|
PoliciesDefaultsGetNotAcceptable describes a response with status code 406, with default header values.
|
|
|
|
not acceptable
|
|
*/
|
|
type PoliciesDefaultsGetNotAcceptable struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this policies defaults get not acceptable response has a 2xx status code
|
|
func (o *PoliciesDefaultsGetNotAcceptable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this policies defaults get not acceptable response has a 3xx status code
|
|
func (o *PoliciesDefaultsGetNotAcceptable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this policies defaults get not acceptable response has a 4xx status code
|
|
func (o *PoliciesDefaultsGetNotAcceptable) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this policies defaults get not acceptable response has a 5xx status code
|
|
func (o *PoliciesDefaultsGetNotAcceptable) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this policies defaults get not acceptable response a status code equal to that given
|
|
func (o *PoliciesDefaultsGetNotAcceptable) IsCode(code int) bool {
|
|
return code == 406
|
|
}
|
|
|
|
// Code gets the status code for the policies defaults get not acceptable response
|
|
func (o *PoliciesDefaultsGetNotAcceptable) Code() int {
|
|
return 406
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetNotAcceptable) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/interaction_policies/defaults][%d] policiesDefaultsGetNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetNotAcceptable) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/interaction_policies/defaults][%d] policiesDefaultsGetNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPoliciesDefaultsGetInternalServerError creates a PoliciesDefaultsGetInternalServerError with default headers values
|
|
func NewPoliciesDefaultsGetInternalServerError() *PoliciesDefaultsGetInternalServerError {
|
|
return &PoliciesDefaultsGetInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
PoliciesDefaultsGetInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type PoliciesDefaultsGetInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this policies defaults get internal server error response has a 2xx status code
|
|
func (o *PoliciesDefaultsGetInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this policies defaults get internal server error response has a 3xx status code
|
|
func (o *PoliciesDefaultsGetInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this policies defaults get internal server error response has a 4xx status code
|
|
func (o *PoliciesDefaultsGetInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this policies defaults get internal server error response has a 5xx status code
|
|
func (o *PoliciesDefaultsGetInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this policies defaults get internal server error response a status code equal to that given
|
|
func (o *PoliciesDefaultsGetInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the policies defaults get internal server error response
|
|
func (o *PoliciesDefaultsGetInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/interaction_policies/defaults][%d] policiesDefaultsGetInternalServerError", 500)
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/interaction_policies/defaults][%d] policiesDefaultsGetInternalServerError", 500)
|
|
}
|
|
|
|
func (o *PoliciesDefaultsGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|