// 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" ) // AdminAccountsGetV2Reader is a Reader for the AdminAccountsGetV2 structure. type AdminAccountsGetV2Reader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *AdminAccountsGetV2Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewAdminAccountsGetV2OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewAdminAccountsGetV2BadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewAdminAccountsGetV2Unauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewAdminAccountsGetV2Forbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewAdminAccountsGetV2NotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewAdminAccountsGetV2NotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewAdminAccountsGetV2InternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[GET /api/v2/admin/accounts] adminAccountsGetV2", response, response.Code()) } } // NewAdminAccountsGetV2OK creates a AdminAccountsGetV2OK with default headers values func NewAdminAccountsGetV2OK() *AdminAccountsGetV2OK { return &AdminAccountsGetV2OK{} } /* AdminAccountsGetV2OK describes a response with status code 200, with default header values. AdminAccountsGetV2OK admin accounts get v2 o k */ type AdminAccountsGetV2OK struct { /* Links to the next and previous queries. */ Link string Payload []*models.AdminAccountInfo } // IsSuccess returns true when this admin accounts get v2 o k response has a 2xx status code func (o *AdminAccountsGetV2OK) IsSuccess() bool { return true } // IsRedirect returns true when this admin accounts get v2 o k response has a 3xx status code func (o *AdminAccountsGetV2OK) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v2 o k response has a 4xx status code func (o *AdminAccountsGetV2OK) IsClientError() bool { return false } // IsServerError returns true when this admin accounts get v2 o k response has a 5xx status code func (o *AdminAccountsGetV2OK) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v2 o k response a status code equal to that given func (o *AdminAccountsGetV2OK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the admin accounts get v2 o k response func (o *AdminAccountsGetV2OK) Code() int { return 200 } func (o *AdminAccountsGetV2OK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2OK %s", 200, payload) } func (o *AdminAccountsGetV2OK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2OK %s", 200, payload) } func (o *AdminAccountsGetV2OK) GetPayload() []*models.AdminAccountInfo { return o.Payload } func (o *AdminAccountsGetV2OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Link hdrLink := response.GetHeader("Link") if hdrLink != "" { o.Link = hdrLink } // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } return nil } // NewAdminAccountsGetV2BadRequest creates a AdminAccountsGetV2BadRequest with default headers values func NewAdminAccountsGetV2BadRequest() *AdminAccountsGetV2BadRequest { return &AdminAccountsGetV2BadRequest{} } /* AdminAccountsGetV2BadRequest describes a response with status code 400, with default header values. bad request */ type AdminAccountsGetV2BadRequest struct { } // IsSuccess returns true when this admin accounts get v2 bad request response has a 2xx status code func (o *AdminAccountsGetV2BadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v2 bad request response has a 3xx status code func (o *AdminAccountsGetV2BadRequest) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v2 bad request response has a 4xx status code func (o *AdminAccountsGetV2BadRequest) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v2 bad request response has a 5xx status code func (o *AdminAccountsGetV2BadRequest) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v2 bad request response a status code equal to that given func (o *AdminAccountsGetV2BadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the admin accounts get v2 bad request response func (o *AdminAccountsGetV2BadRequest) Code() int { return 400 } func (o *AdminAccountsGetV2BadRequest) Error() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2BadRequest", 400) } func (o *AdminAccountsGetV2BadRequest) String() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2BadRequest", 400) } func (o *AdminAccountsGetV2BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV2Unauthorized creates a AdminAccountsGetV2Unauthorized with default headers values func NewAdminAccountsGetV2Unauthorized() *AdminAccountsGetV2Unauthorized { return &AdminAccountsGetV2Unauthorized{} } /* AdminAccountsGetV2Unauthorized describes a response with status code 401, with default header values. unauthorized */ type AdminAccountsGetV2Unauthorized struct { } // IsSuccess returns true when this admin accounts get v2 unauthorized response has a 2xx status code func (o *AdminAccountsGetV2Unauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v2 unauthorized response has a 3xx status code func (o *AdminAccountsGetV2Unauthorized) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v2 unauthorized response has a 4xx status code func (o *AdminAccountsGetV2Unauthorized) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v2 unauthorized response has a 5xx status code func (o *AdminAccountsGetV2Unauthorized) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v2 unauthorized response a status code equal to that given func (o *AdminAccountsGetV2Unauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the admin accounts get v2 unauthorized response func (o *AdminAccountsGetV2Unauthorized) Code() int { return 401 } func (o *AdminAccountsGetV2Unauthorized) Error() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2Unauthorized", 401) } func (o *AdminAccountsGetV2Unauthorized) String() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2Unauthorized", 401) } func (o *AdminAccountsGetV2Unauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV2Forbidden creates a AdminAccountsGetV2Forbidden with default headers values func NewAdminAccountsGetV2Forbidden() *AdminAccountsGetV2Forbidden { return &AdminAccountsGetV2Forbidden{} } /* AdminAccountsGetV2Forbidden describes a response with status code 403, with default header values. forbidden */ type AdminAccountsGetV2Forbidden struct { } // IsSuccess returns true when this admin accounts get v2 forbidden response has a 2xx status code func (o *AdminAccountsGetV2Forbidden) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v2 forbidden response has a 3xx status code func (o *AdminAccountsGetV2Forbidden) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v2 forbidden response has a 4xx status code func (o *AdminAccountsGetV2Forbidden) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v2 forbidden response has a 5xx status code func (o *AdminAccountsGetV2Forbidden) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v2 forbidden response a status code equal to that given func (o *AdminAccountsGetV2Forbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the admin accounts get v2 forbidden response func (o *AdminAccountsGetV2Forbidden) Code() int { return 403 } func (o *AdminAccountsGetV2Forbidden) Error() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2Forbidden", 403) } func (o *AdminAccountsGetV2Forbidden) String() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2Forbidden", 403) } func (o *AdminAccountsGetV2Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV2NotFound creates a AdminAccountsGetV2NotFound with default headers values func NewAdminAccountsGetV2NotFound() *AdminAccountsGetV2NotFound { return &AdminAccountsGetV2NotFound{} } /* AdminAccountsGetV2NotFound describes a response with status code 404, with default header values. not found */ type AdminAccountsGetV2NotFound struct { } // IsSuccess returns true when this admin accounts get v2 not found response has a 2xx status code func (o *AdminAccountsGetV2NotFound) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v2 not found response has a 3xx status code func (o *AdminAccountsGetV2NotFound) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v2 not found response has a 4xx status code func (o *AdminAccountsGetV2NotFound) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v2 not found response has a 5xx status code func (o *AdminAccountsGetV2NotFound) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v2 not found response a status code equal to that given func (o *AdminAccountsGetV2NotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the admin accounts get v2 not found response func (o *AdminAccountsGetV2NotFound) Code() int { return 404 } func (o *AdminAccountsGetV2NotFound) Error() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2NotFound", 404) } func (o *AdminAccountsGetV2NotFound) String() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2NotFound", 404) } func (o *AdminAccountsGetV2NotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV2NotAcceptable creates a AdminAccountsGetV2NotAcceptable with default headers values func NewAdminAccountsGetV2NotAcceptable() *AdminAccountsGetV2NotAcceptable { return &AdminAccountsGetV2NotAcceptable{} } /* AdminAccountsGetV2NotAcceptable describes a response with status code 406, with default header values. not acceptable */ type AdminAccountsGetV2NotAcceptable struct { } // IsSuccess returns true when this admin accounts get v2 not acceptable response has a 2xx status code func (o *AdminAccountsGetV2NotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v2 not acceptable response has a 3xx status code func (o *AdminAccountsGetV2NotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v2 not acceptable response has a 4xx status code func (o *AdminAccountsGetV2NotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v2 not acceptable response has a 5xx status code func (o *AdminAccountsGetV2NotAcceptable) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v2 not acceptable response a status code equal to that given func (o *AdminAccountsGetV2NotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the admin accounts get v2 not acceptable response func (o *AdminAccountsGetV2NotAcceptable) Code() int { return 406 } func (o *AdminAccountsGetV2NotAcceptable) Error() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2NotAcceptable", 406) } func (o *AdminAccountsGetV2NotAcceptable) String() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2NotAcceptable", 406) } func (o *AdminAccountsGetV2NotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV2InternalServerError creates a AdminAccountsGetV2InternalServerError with default headers values func NewAdminAccountsGetV2InternalServerError() *AdminAccountsGetV2InternalServerError { return &AdminAccountsGetV2InternalServerError{} } /* AdminAccountsGetV2InternalServerError describes a response with status code 500, with default header values. internal server error */ type AdminAccountsGetV2InternalServerError struct { } // IsSuccess returns true when this admin accounts get v2 internal server error response has a 2xx status code func (o *AdminAccountsGetV2InternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v2 internal server error response has a 3xx status code func (o *AdminAccountsGetV2InternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v2 internal server error response has a 4xx status code func (o *AdminAccountsGetV2InternalServerError) IsClientError() bool { return false } // IsServerError returns true when this admin accounts get v2 internal server error response has a 5xx status code func (o *AdminAccountsGetV2InternalServerError) IsServerError() bool { return true } // IsCode returns true when this admin accounts get v2 internal server error response a status code equal to that given func (o *AdminAccountsGetV2InternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the admin accounts get v2 internal server error response func (o *AdminAccountsGetV2InternalServerError) Code() int { return 500 } func (o *AdminAccountsGetV2InternalServerError) Error() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2InternalServerError", 500) } func (o *AdminAccountsGetV2InternalServerError) String() string { return fmt.Sprintf("[GET /api/v2/admin/accounts][%d] adminAccountsGetV2InternalServerError", 500) } func (o *AdminAccountsGetV2InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }