// 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" ) // AdminAccountsGetV1Reader is a Reader for the AdminAccountsGetV1 structure. type AdminAccountsGetV1Reader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *AdminAccountsGetV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewAdminAccountsGetV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewAdminAccountsGetV1BadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewAdminAccountsGetV1Unauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewAdminAccountsGetV1Forbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewAdminAccountsGetV1NotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewAdminAccountsGetV1NotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewAdminAccountsGetV1InternalServerError() 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/accounts] adminAccountsGetV1", response, response.Code()) } } // NewAdminAccountsGetV1OK creates a AdminAccountsGetV1OK with default headers values func NewAdminAccountsGetV1OK() *AdminAccountsGetV1OK { return &AdminAccountsGetV1OK{} } /* AdminAccountsGetV1OK describes a response with status code 200, with default header values. AdminAccountsGetV1OK admin accounts get v1 o k */ type AdminAccountsGetV1OK struct { /* Links to the next and previous queries. */ Link string Payload []*models.AdminAccountInfo } // IsSuccess returns true when this admin accounts get v1 o k response has a 2xx status code func (o *AdminAccountsGetV1OK) IsSuccess() bool { return true } // IsRedirect returns true when this admin accounts get v1 o k response has a 3xx status code func (o *AdminAccountsGetV1OK) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v1 o k response has a 4xx status code func (o *AdminAccountsGetV1OK) IsClientError() bool { return false } // IsServerError returns true when this admin accounts get v1 o k response has a 5xx status code func (o *AdminAccountsGetV1OK) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v1 o k response a status code equal to that given func (o *AdminAccountsGetV1OK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the admin accounts get v1 o k response func (o *AdminAccountsGetV1OK) Code() int { return 200 } func (o *AdminAccountsGetV1OK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1OK %s", 200, payload) } func (o *AdminAccountsGetV1OK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1OK %s", 200, payload) } func (o *AdminAccountsGetV1OK) GetPayload() []*models.AdminAccountInfo { return o.Payload } func (o *AdminAccountsGetV1OK) 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 } // NewAdminAccountsGetV1BadRequest creates a AdminAccountsGetV1BadRequest with default headers values func NewAdminAccountsGetV1BadRequest() *AdminAccountsGetV1BadRequest { return &AdminAccountsGetV1BadRequest{} } /* AdminAccountsGetV1BadRequest describes a response with status code 400, with default header values. bad request */ type AdminAccountsGetV1BadRequest struct { } // IsSuccess returns true when this admin accounts get v1 bad request response has a 2xx status code func (o *AdminAccountsGetV1BadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v1 bad request response has a 3xx status code func (o *AdminAccountsGetV1BadRequest) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v1 bad request response has a 4xx status code func (o *AdminAccountsGetV1BadRequest) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v1 bad request response has a 5xx status code func (o *AdminAccountsGetV1BadRequest) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v1 bad request response a status code equal to that given func (o *AdminAccountsGetV1BadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the admin accounts get v1 bad request response func (o *AdminAccountsGetV1BadRequest) Code() int { return 400 } func (o *AdminAccountsGetV1BadRequest) Error() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1BadRequest", 400) } func (o *AdminAccountsGetV1BadRequest) String() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1BadRequest", 400) } func (o *AdminAccountsGetV1BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV1Unauthorized creates a AdminAccountsGetV1Unauthorized with default headers values func NewAdminAccountsGetV1Unauthorized() *AdminAccountsGetV1Unauthorized { return &AdminAccountsGetV1Unauthorized{} } /* AdminAccountsGetV1Unauthorized describes a response with status code 401, with default header values. unauthorized */ type AdminAccountsGetV1Unauthorized struct { } // IsSuccess returns true when this admin accounts get v1 unauthorized response has a 2xx status code func (o *AdminAccountsGetV1Unauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v1 unauthorized response has a 3xx status code func (o *AdminAccountsGetV1Unauthorized) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v1 unauthorized response has a 4xx status code func (o *AdminAccountsGetV1Unauthorized) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v1 unauthorized response has a 5xx status code func (o *AdminAccountsGetV1Unauthorized) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v1 unauthorized response a status code equal to that given func (o *AdminAccountsGetV1Unauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the admin accounts get v1 unauthorized response func (o *AdminAccountsGetV1Unauthorized) Code() int { return 401 } func (o *AdminAccountsGetV1Unauthorized) Error() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1Unauthorized", 401) } func (o *AdminAccountsGetV1Unauthorized) String() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1Unauthorized", 401) } func (o *AdminAccountsGetV1Unauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV1Forbidden creates a AdminAccountsGetV1Forbidden with default headers values func NewAdminAccountsGetV1Forbidden() *AdminAccountsGetV1Forbidden { return &AdminAccountsGetV1Forbidden{} } /* AdminAccountsGetV1Forbidden describes a response with status code 403, with default header values. forbidden */ type AdminAccountsGetV1Forbidden struct { } // IsSuccess returns true when this admin accounts get v1 forbidden response has a 2xx status code func (o *AdminAccountsGetV1Forbidden) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v1 forbidden response has a 3xx status code func (o *AdminAccountsGetV1Forbidden) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v1 forbidden response has a 4xx status code func (o *AdminAccountsGetV1Forbidden) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v1 forbidden response has a 5xx status code func (o *AdminAccountsGetV1Forbidden) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v1 forbidden response a status code equal to that given func (o *AdminAccountsGetV1Forbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the admin accounts get v1 forbidden response func (o *AdminAccountsGetV1Forbidden) Code() int { return 403 } func (o *AdminAccountsGetV1Forbidden) Error() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1Forbidden", 403) } func (o *AdminAccountsGetV1Forbidden) String() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1Forbidden", 403) } func (o *AdminAccountsGetV1Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV1NotFound creates a AdminAccountsGetV1NotFound with default headers values func NewAdminAccountsGetV1NotFound() *AdminAccountsGetV1NotFound { return &AdminAccountsGetV1NotFound{} } /* AdminAccountsGetV1NotFound describes a response with status code 404, with default header values. not found */ type AdminAccountsGetV1NotFound struct { } // IsSuccess returns true when this admin accounts get v1 not found response has a 2xx status code func (o *AdminAccountsGetV1NotFound) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v1 not found response has a 3xx status code func (o *AdminAccountsGetV1NotFound) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v1 not found response has a 4xx status code func (o *AdminAccountsGetV1NotFound) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v1 not found response has a 5xx status code func (o *AdminAccountsGetV1NotFound) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v1 not found response a status code equal to that given func (o *AdminAccountsGetV1NotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the admin accounts get v1 not found response func (o *AdminAccountsGetV1NotFound) Code() int { return 404 } func (o *AdminAccountsGetV1NotFound) Error() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1NotFound", 404) } func (o *AdminAccountsGetV1NotFound) String() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1NotFound", 404) } func (o *AdminAccountsGetV1NotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV1NotAcceptable creates a AdminAccountsGetV1NotAcceptable with default headers values func NewAdminAccountsGetV1NotAcceptable() *AdminAccountsGetV1NotAcceptable { return &AdminAccountsGetV1NotAcceptable{} } /* AdminAccountsGetV1NotAcceptable describes a response with status code 406, with default header values. not acceptable */ type AdminAccountsGetV1NotAcceptable struct { } // IsSuccess returns true when this admin accounts get v1 not acceptable response has a 2xx status code func (o *AdminAccountsGetV1NotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v1 not acceptable response has a 3xx status code func (o *AdminAccountsGetV1NotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v1 not acceptable response has a 4xx status code func (o *AdminAccountsGetV1NotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this admin accounts get v1 not acceptable response has a 5xx status code func (o *AdminAccountsGetV1NotAcceptable) IsServerError() bool { return false } // IsCode returns true when this admin accounts get v1 not acceptable response a status code equal to that given func (o *AdminAccountsGetV1NotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the admin accounts get v1 not acceptable response func (o *AdminAccountsGetV1NotAcceptable) Code() int { return 406 } func (o *AdminAccountsGetV1NotAcceptable) Error() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1NotAcceptable", 406) } func (o *AdminAccountsGetV1NotAcceptable) String() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1NotAcceptable", 406) } func (o *AdminAccountsGetV1NotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminAccountsGetV1InternalServerError creates a AdminAccountsGetV1InternalServerError with default headers values func NewAdminAccountsGetV1InternalServerError() *AdminAccountsGetV1InternalServerError { return &AdminAccountsGetV1InternalServerError{} } /* AdminAccountsGetV1InternalServerError describes a response with status code 500, with default header values. internal server error */ type AdminAccountsGetV1InternalServerError struct { } // IsSuccess returns true when this admin accounts get v1 internal server error response has a 2xx status code func (o *AdminAccountsGetV1InternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this admin accounts get v1 internal server error response has a 3xx status code func (o *AdminAccountsGetV1InternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this admin accounts get v1 internal server error response has a 4xx status code func (o *AdminAccountsGetV1InternalServerError) IsClientError() bool { return false } // IsServerError returns true when this admin accounts get v1 internal server error response has a 5xx status code func (o *AdminAccountsGetV1InternalServerError) IsServerError() bool { return true } // IsCode returns true when this admin accounts get v1 internal server error response a status code equal to that given func (o *AdminAccountsGetV1InternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the admin accounts get v1 internal server error response func (o *AdminAccountsGetV1InternalServerError) Code() int { return 500 } func (o *AdminAccountsGetV1InternalServerError) Error() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1InternalServerError", 500) } func (o *AdminAccountsGetV1InternalServerError) String() string { return fmt.Sprintf("[GET /api/v1/admin/accounts][%d] adminAccountsGetV1InternalServerError", 500) } func (o *AdminAccountsGetV1InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }