// Code generated by go-swagger; DO NOT EDIT. package accounts // 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" ) // AccountSearchGetReader is a Reader for the AccountSearchGet structure. type AccountSearchGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *AccountSearchGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewAccountSearchGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewAccountSearchGetBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewAccountSearchGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewAccountSearchGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewAccountSearchGetNotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewAccountSearchGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[GET /api/v1/accounts/search] accountSearchGet", response, response.Code()) } } // NewAccountSearchGetOK creates a AccountSearchGetOK with default headers values func NewAccountSearchGetOK() *AccountSearchGetOK { return &AccountSearchGetOK{} } /* AccountSearchGetOK describes a response with status code 200, with default header values. Results of the search. */ type AccountSearchGetOK struct { Payload []*models.Account } // IsSuccess returns true when this account search get o k response has a 2xx status code func (o *AccountSearchGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this account search get o k response has a 3xx status code func (o *AccountSearchGetOK) IsRedirect() bool { return false } // IsClientError returns true when this account search get o k response has a 4xx status code func (o *AccountSearchGetOK) IsClientError() bool { return false } // IsServerError returns true when this account search get o k response has a 5xx status code func (o *AccountSearchGetOK) IsServerError() bool { return false } // IsCode returns true when this account search get o k response a status code equal to that given func (o *AccountSearchGetOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the account search get o k response func (o *AccountSearchGetOK) Code() int { return 200 } func (o *AccountSearchGetOK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetOK %s", 200, payload) } func (o *AccountSearchGetOK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetOK %s", 200, payload) } func (o *AccountSearchGetOK) GetPayload() []*models.Account { return o.Payload } func (o *AccountSearchGetOK) 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 } // NewAccountSearchGetBadRequest creates a AccountSearchGetBadRequest with default headers values func NewAccountSearchGetBadRequest() *AccountSearchGetBadRequest { return &AccountSearchGetBadRequest{} } /* AccountSearchGetBadRequest describes a response with status code 400, with default header values. bad request */ type AccountSearchGetBadRequest struct { } // IsSuccess returns true when this account search get bad request response has a 2xx status code func (o *AccountSearchGetBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this account search get bad request response has a 3xx status code func (o *AccountSearchGetBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this account search get bad request response has a 4xx status code func (o *AccountSearchGetBadRequest) IsClientError() bool { return true } // IsServerError returns true when this account search get bad request response has a 5xx status code func (o *AccountSearchGetBadRequest) IsServerError() bool { return false } // IsCode returns true when this account search get bad request response a status code equal to that given func (o *AccountSearchGetBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the account search get bad request response func (o *AccountSearchGetBadRequest) Code() int { return 400 } func (o *AccountSearchGetBadRequest) Error() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetBadRequest", 400) } func (o *AccountSearchGetBadRequest) String() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetBadRequest", 400) } func (o *AccountSearchGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAccountSearchGetUnauthorized creates a AccountSearchGetUnauthorized with default headers values func NewAccountSearchGetUnauthorized() *AccountSearchGetUnauthorized { return &AccountSearchGetUnauthorized{} } /* AccountSearchGetUnauthorized describes a response with status code 401, with default header values. unauthorized */ type AccountSearchGetUnauthorized struct { } // IsSuccess returns true when this account search get unauthorized response has a 2xx status code func (o *AccountSearchGetUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this account search get unauthorized response has a 3xx status code func (o *AccountSearchGetUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this account search get unauthorized response has a 4xx status code func (o *AccountSearchGetUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this account search get unauthorized response has a 5xx status code func (o *AccountSearchGetUnauthorized) IsServerError() bool { return false } // IsCode returns true when this account search get unauthorized response a status code equal to that given func (o *AccountSearchGetUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the account search get unauthorized response func (o *AccountSearchGetUnauthorized) Code() int { return 401 } func (o *AccountSearchGetUnauthorized) Error() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetUnauthorized", 401) } func (o *AccountSearchGetUnauthorized) String() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetUnauthorized", 401) } func (o *AccountSearchGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAccountSearchGetNotFound creates a AccountSearchGetNotFound with default headers values func NewAccountSearchGetNotFound() *AccountSearchGetNotFound { return &AccountSearchGetNotFound{} } /* AccountSearchGetNotFound describes a response with status code 404, with default header values. not found */ type AccountSearchGetNotFound struct { } // IsSuccess returns true when this account search get not found response has a 2xx status code func (o *AccountSearchGetNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this account search get not found response has a 3xx status code func (o *AccountSearchGetNotFound) IsRedirect() bool { return false } // IsClientError returns true when this account search get not found response has a 4xx status code func (o *AccountSearchGetNotFound) IsClientError() bool { return true } // IsServerError returns true when this account search get not found response has a 5xx status code func (o *AccountSearchGetNotFound) IsServerError() bool { return false } // IsCode returns true when this account search get not found response a status code equal to that given func (o *AccountSearchGetNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the account search get not found response func (o *AccountSearchGetNotFound) Code() int { return 404 } func (o *AccountSearchGetNotFound) Error() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetNotFound", 404) } func (o *AccountSearchGetNotFound) String() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetNotFound", 404) } func (o *AccountSearchGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAccountSearchGetNotAcceptable creates a AccountSearchGetNotAcceptable with default headers values func NewAccountSearchGetNotAcceptable() *AccountSearchGetNotAcceptable { return &AccountSearchGetNotAcceptable{} } /* AccountSearchGetNotAcceptable describes a response with status code 406, with default header values. not acceptable */ type AccountSearchGetNotAcceptable struct { } // IsSuccess returns true when this account search get not acceptable response has a 2xx status code func (o *AccountSearchGetNotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this account search get not acceptable response has a 3xx status code func (o *AccountSearchGetNotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this account search get not acceptable response has a 4xx status code func (o *AccountSearchGetNotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this account search get not acceptable response has a 5xx status code func (o *AccountSearchGetNotAcceptable) IsServerError() bool { return false } // IsCode returns true when this account search get not acceptable response a status code equal to that given func (o *AccountSearchGetNotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the account search get not acceptable response func (o *AccountSearchGetNotAcceptable) Code() int { return 406 } func (o *AccountSearchGetNotAcceptable) Error() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetNotAcceptable", 406) } func (o *AccountSearchGetNotAcceptable) String() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetNotAcceptable", 406) } func (o *AccountSearchGetNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAccountSearchGetInternalServerError creates a AccountSearchGetInternalServerError with default headers values func NewAccountSearchGetInternalServerError() *AccountSearchGetInternalServerError { return &AccountSearchGetInternalServerError{} } /* AccountSearchGetInternalServerError describes a response with status code 500, with default header values. internal server error */ type AccountSearchGetInternalServerError struct { } // IsSuccess returns true when this account search get internal server error response has a 2xx status code func (o *AccountSearchGetInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this account search get internal server error response has a 3xx status code func (o *AccountSearchGetInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this account search get internal server error response has a 4xx status code func (o *AccountSearchGetInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this account search get internal server error response has a 5xx status code func (o *AccountSearchGetInternalServerError) IsServerError() bool { return true } // IsCode returns true when this account search get internal server error response a status code equal to that given func (o *AccountSearchGetInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the account search get internal server error response func (o *AccountSearchGetInternalServerError) Code() int { return 500 } func (o *AccountSearchGetInternalServerError) Error() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetInternalServerError", 500) } func (o *AccountSearchGetInternalServerError) String() string { return fmt.Sprintf("[GET /api/v1/accounts/search][%d] accountSearchGetInternalServerError", 500) } func (o *AccountSearchGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }