// Code generated by go-swagger; DO NOT EDIT. package admin // 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" ) // DomainAllowsGetReader is a Reader for the DomainAllowsGet structure. type DomainAllowsGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *DomainAllowsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewDomainAllowsGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewDomainAllowsGetBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewDomainAllowsGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewDomainAllowsGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewDomainAllowsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewDomainAllowsGetNotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewDomainAllowsGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[GET /api/v1/admin/domain_allows] domainAllowsGet", response, response.Code()) } } // NewDomainAllowsGetOK creates a DomainAllowsGetOK with default headers values func NewDomainAllowsGetOK() *DomainAllowsGetOK { return &DomainAllowsGetOK{} } /* DomainAllowsGetOK describes a response with status code 200, with default header values. All domain allows currently in place. */ type DomainAllowsGetOK struct { Payload []*models.DomainPermission } // IsSuccess returns true when this domain allows get o k response has a 2xx status code func (o *DomainAllowsGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this domain allows get o k response has a 3xx status code func (o *DomainAllowsGetOK) IsRedirect() bool { return false } // IsClientError returns true when this domain allows get o k response has a 4xx status code func (o *DomainAllowsGetOK) IsClientError() bool { return false } // IsServerError returns true when this domain allows get o k response has a 5xx status code func (o *DomainAllowsGetOK) IsServerError() bool { return false } // IsCode returns true when this domain allows get o k response a status code equal to that given func (o *DomainAllowsGetOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the domain allows get o k response func (o *DomainAllowsGetOK) Code() int { return 200 } func (o *DomainAllowsGetOK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetOK %s", 200, payload) } func (o *DomainAllowsGetOK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetOK %s", 200, payload) } func (o *DomainAllowsGetOK) GetPayload() []*models.DomainPermission { return o.Payload } func (o *DomainAllowsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } return nil } // NewDomainAllowsGetBadRequest creates a DomainAllowsGetBadRequest with default headers values func NewDomainAllowsGetBadRequest() *DomainAllowsGetBadRequest { return &DomainAllowsGetBadRequest{} } /* DomainAllowsGetBadRequest describes a response with status code 400, with default header values. bad request */ type DomainAllowsGetBadRequest struct { } // IsSuccess returns true when this domain allows get bad request response has a 2xx status code func (o *DomainAllowsGetBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this domain allows get bad request response has a 3xx status code func (o *DomainAllowsGetBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this domain allows get bad request response has a 4xx status code func (o *DomainAllowsGetBadRequest) IsClientError() bool { return true } // IsServerError returns true when this domain allows get bad request response has a 5xx status code func (o *DomainAllowsGetBadRequest) IsServerError() bool { return false } // IsCode returns true when this domain allows get bad request response a status code equal to that given func (o *DomainAllowsGetBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the domain allows get bad request response func (o *DomainAllowsGetBadRequest) Code() int { return 400 } func (o *DomainAllowsGetBadRequest) Error() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetBadRequest", 400) } func (o *DomainAllowsGetBadRequest) String() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetBadRequest", 400) } func (o *DomainAllowsGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewDomainAllowsGetUnauthorized creates a DomainAllowsGetUnauthorized with default headers values func NewDomainAllowsGetUnauthorized() *DomainAllowsGetUnauthorized { return &DomainAllowsGetUnauthorized{} } /* DomainAllowsGetUnauthorized describes a response with status code 401, with default header values. unauthorized */ type DomainAllowsGetUnauthorized struct { } // IsSuccess returns true when this domain allows get unauthorized response has a 2xx status code func (o *DomainAllowsGetUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this domain allows get unauthorized response has a 3xx status code func (o *DomainAllowsGetUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this domain allows get unauthorized response has a 4xx status code func (o *DomainAllowsGetUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this domain allows get unauthorized response has a 5xx status code func (o *DomainAllowsGetUnauthorized) IsServerError() bool { return false } // IsCode returns true when this domain allows get unauthorized response a status code equal to that given func (o *DomainAllowsGetUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the domain allows get unauthorized response func (o *DomainAllowsGetUnauthorized) Code() int { return 401 } func (o *DomainAllowsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetUnauthorized", 401) } func (o *DomainAllowsGetUnauthorized) String() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetUnauthorized", 401) } func (o *DomainAllowsGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewDomainAllowsGetForbidden creates a DomainAllowsGetForbidden with default headers values func NewDomainAllowsGetForbidden() *DomainAllowsGetForbidden { return &DomainAllowsGetForbidden{} } /* DomainAllowsGetForbidden describes a response with status code 403, with default header values. forbidden */ type DomainAllowsGetForbidden struct { } // IsSuccess returns true when this domain allows get forbidden response has a 2xx status code func (o *DomainAllowsGetForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this domain allows get forbidden response has a 3xx status code func (o *DomainAllowsGetForbidden) IsRedirect() bool { return false } // IsClientError returns true when this domain allows get forbidden response has a 4xx status code func (o *DomainAllowsGetForbidden) IsClientError() bool { return true } // IsServerError returns true when this domain allows get forbidden response has a 5xx status code func (o *DomainAllowsGetForbidden) IsServerError() bool { return false } // IsCode returns true when this domain allows get forbidden response a status code equal to that given func (o *DomainAllowsGetForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the domain allows get forbidden response func (o *DomainAllowsGetForbidden) Code() int { return 403 } func (o *DomainAllowsGetForbidden) Error() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetForbidden", 403) } func (o *DomainAllowsGetForbidden) String() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetForbidden", 403) } func (o *DomainAllowsGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewDomainAllowsGetNotFound creates a DomainAllowsGetNotFound with default headers values func NewDomainAllowsGetNotFound() *DomainAllowsGetNotFound { return &DomainAllowsGetNotFound{} } /* DomainAllowsGetNotFound describes a response with status code 404, with default header values. not found */ type DomainAllowsGetNotFound struct { } // IsSuccess returns true when this domain allows get not found response has a 2xx status code func (o *DomainAllowsGetNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this domain allows get not found response has a 3xx status code func (o *DomainAllowsGetNotFound) IsRedirect() bool { return false } // IsClientError returns true when this domain allows get not found response has a 4xx status code func (o *DomainAllowsGetNotFound) IsClientError() bool { return true } // IsServerError returns true when this domain allows get not found response has a 5xx status code func (o *DomainAllowsGetNotFound) IsServerError() bool { return false } // IsCode returns true when this domain allows get not found response a status code equal to that given func (o *DomainAllowsGetNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the domain allows get not found response func (o *DomainAllowsGetNotFound) Code() int { return 404 } func (o *DomainAllowsGetNotFound) Error() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetNotFound", 404) } func (o *DomainAllowsGetNotFound) String() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetNotFound", 404) } func (o *DomainAllowsGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewDomainAllowsGetNotAcceptable creates a DomainAllowsGetNotAcceptable with default headers values func NewDomainAllowsGetNotAcceptable() *DomainAllowsGetNotAcceptable { return &DomainAllowsGetNotAcceptable{} } /* DomainAllowsGetNotAcceptable describes a response with status code 406, with default header values. not acceptable */ type DomainAllowsGetNotAcceptable struct { } // IsSuccess returns true when this domain allows get not acceptable response has a 2xx status code func (o *DomainAllowsGetNotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this domain allows get not acceptable response has a 3xx status code func (o *DomainAllowsGetNotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this domain allows get not acceptable response has a 4xx status code func (o *DomainAllowsGetNotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this domain allows get not acceptable response has a 5xx status code func (o *DomainAllowsGetNotAcceptable) IsServerError() bool { return false } // IsCode returns true when this domain allows get not acceptable response a status code equal to that given func (o *DomainAllowsGetNotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the domain allows get not acceptable response func (o *DomainAllowsGetNotAcceptable) Code() int { return 406 } func (o *DomainAllowsGetNotAcceptable) Error() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetNotAcceptable", 406) } func (o *DomainAllowsGetNotAcceptable) String() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetNotAcceptable", 406) } func (o *DomainAllowsGetNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewDomainAllowsGetInternalServerError creates a DomainAllowsGetInternalServerError with default headers values func NewDomainAllowsGetInternalServerError() *DomainAllowsGetInternalServerError { return &DomainAllowsGetInternalServerError{} } /* DomainAllowsGetInternalServerError describes a response with status code 500, with default header values. internal server error */ type DomainAllowsGetInternalServerError struct { } // IsSuccess returns true when this domain allows get internal server error response has a 2xx status code func (o *DomainAllowsGetInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this domain allows get internal server error response has a 3xx status code func (o *DomainAllowsGetInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this domain allows get internal server error response has a 4xx status code func (o *DomainAllowsGetInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this domain allows get internal server error response has a 5xx status code func (o *DomainAllowsGetInternalServerError) IsServerError() bool { return true } // IsCode returns true when this domain allows get internal server error response a status code equal to that given func (o *DomainAllowsGetInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the domain allows get internal server error response func (o *DomainAllowsGetInternalServerError) Code() int { return 500 } func (o *DomainAllowsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetInternalServerError", 500) } func (o *DomainAllowsGetInternalServerError) String() string { return fmt.Sprintf("[GET /api/v1/admin/domain_allows][%d] domainAllowsGetInternalServerError", 500) } func (o *DomainAllowsGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }