// Code generated by go-swagger; DO NOT EDIT. package user // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" ) // UserCheckUserBlockReader is a Reader for the UserCheckUserBlock structure. type UserCheckUserBlockReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *UserCheckUserBlockReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 204: result := NewUserCheckUserBlockNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 404: result := NewUserCheckUserBlockNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[GET /user/blocks/{username}] userCheckUserBlock", response, response.Code()) } } // NewUserCheckUserBlockNoContent creates a UserCheckUserBlockNoContent with default headers values func NewUserCheckUserBlockNoContent() *UserCheckUserBlockNoContent { return &UserCheckUserBlockNoContent{} } /* UserCheckUserBlockNoContent describes a response with status code 204, with default header values. APIEmpty is an empty response */ type UserCheckUserBlockNoContent struct { } // IsSuccess returns true when this user check user block no content response has a 2xx status code func (o *UserCheckUserBlockNoContent) IsSuccess() bool { return true } // IsRedirect returns true when this user check user block no content response has a 3xx status code func (o *UserCheckUserBlockNoContent) IsRedirect() bool { return false } // IsClientError returns true when this user check user block no content response has a 4xx status code func (o *UserCheckUserBlockNoContent) IsClientError() bool { return false } // IsServerError returns true when this user check user block no content response has a 5xx status code func (o *UserCheckUserBlockNoContent) IsServerError() bool { return false } // IsCode returns true when this user check user block no content response a status code equal to that given func (o *UserCheckUserBlockNoContent) IsCode(code int) bool { return code == 204 } // Code gets the status code for the user check user block no content response func (o *UserCheckUserBlockNoContent) Code() int { return 204 } func (o *UserCheckUserBlockNoContent) Error() string { return fmt.Sprintf("[GET /user/blocks/{username}][%d] userCheckUserBlockNoContent", 204) } func (o *UserCheckUserBlockNoContent) String() string { return fmt.Sprintf("[GET /user/blocks/{username}][%d] userCheckUserBlockNoContent", 204) } func (o *UserCheckUserBlockNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewUserCheckUserBlockNotFound creates a UserCheckUserBlockNotFound with default headers values func NewUserCheckUserBlockNotFound() *UserCheckUserBlockNotFound { return &UserCheckUserBlockNotFound{} } /* UserCheckUserBlockNotFound describes a response with status code 404, with default header values. APINotFound is a not found empty response */ type UserCheckUserBlockNotFound struct { } // IsSuccess returns true when this user check user block not found response has a 2xx status code func (o *UserCheckUserBlockNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this user check user block not found response has a 3xx status code func (o *UserCheckUserBlockNotFound) IsRedirect() bool { return false } // IsClientError returns true when this user check user block not found response has a 4xx status code func (o *UserCheckUserBlockNotFound) IsClientError() bool { return true } // IsServerError returns true when this user check user block not found response has a 5xx status code func (o *UserCheckUserBlockNotFound) IsServerError() bool { return false } // IsCode returns true when this user check user block not found response a status code equal to that given func (o *UserCheckUserBlockNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the user check user block not found response func (o *UserCheckUserBlockNotFound) Code() int { return 404 } func (o *UserCheckUserBlockNotFound) Error() string { return fmt.Sprintf("[GET /user/blocks/{username}][%d] userCheckUserBlockNotFound", 404) } func (o *UserCheckUserBlockNotFound) String() string { return fmt.Sprintf("[GET /user/blocks/{username}][%d] userCheckUserBlockNotFound", 404) } func (o *UserCheckUserBlockNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }