// 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 ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/ory/hydra-client-go/models" ) // GetLoginRequestReader is a Reader for the GetLoginRequest structure. type GetLoginRequestReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetLoginRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetLoginRequestOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewGetLoginRequestBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewGetLoginRequestNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 410: result := NewGetLoginRequestGone() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetLoginRequestInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } // NewGetLoginRequestOK creates a GetLoginRequestOK with default headers values func NewGetLoginRequestOK() *GetLoginRequestOK { return &GetLoginRequestOK{} } /* GetLoginRequestOK describes a response with status code 200, with default header values. loginRequest */ type GetLoginRequestOK struct { Payload *models.LoginRequest } func (o *GetLoginRequestOK) Error() string { return fmt.Sprintf("[GET /oauth2/auth/requests/login][%d] getLoginRequestOK %+v", 200, o.Payload) } func (o *GetLoginRequestOK) GetPayload() *models.LoginRequest { return o.Payload } func (o *GetLoginRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.LoginRequest) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetLoginRequestBadRequest creates a GetLoginRequestBadRequest with default headers values func NewGetLoginRequestBadRequest() *GetLoginRequestBadRequest { return &GetLoginRequestBadRequest{} } /* GetLoginRequestBadRequest describes a response with status code 400, with default header values. jsonError */ type GetLoginRequestBadRequest struct { Payload *models.JSONError } func (o *GetLoginRequestBadRequest) Error() string { return fmt.Sprintf("[GET /oauth2/auth/requests/login][%d] getLoginRequestBadRequest %+v", 400, o.Payload) } func (o *GetLoginRequestBadRequest) GetPayload() *models.JSONError { return o.Payload } func (o *GetLoginRequestBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JSONError) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetLoginRequestNotFound creates a GetLoginRequestNotFound with default headers values func NewGetLoginRequestNotFound() *GetLoginRequestNotFound { return &GetLoginRequestNotFound{} } /* GetLoginRequestNotFound describes a response with status code 404, with default header values. jsonError */ type GetLoginRequestNotFound struct { Payload *models.JSONError } func (o *GetLoginRequestNotFound) Error() string { return fmt.Sprintf("[GET /oauth2/auth/requests/login][%d] getLoginRequestNotFound %+v", 404, o.Payload) } func (o *GetLoginRequestNotFound) GetPayload() *models.JSONError { return o.Payload } func (o *GetLoginRequestNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JSONError) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetLoginRequestGone creates a GetLoginRequestGone with default headers values func NewGetLoginRequestGone() *GetLoginRequestGone { return &GetLoginRequestGone{} } /* GetLoginRequestGone describes a response with status code 410, with default header values. requestWasHandledResponse */ type GetLoginRequestGone struct { Payload *models.RequestWasHandledResponse } func (o *GetLoginRequestGone) Error() string { return fmt.Sprintf("[GET /oauth2/auth/requests/login][%d] getLoginRequestGone %+v", 410, o.Payload) } func (o *GetLoginRequestGone) GetPayload() *models.RequestWasHandledResponse { return o.Payload } func (o *GetLoginRequestGone) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.RequestWasHandledResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetLoginRequestInternalServerError creates a GetLoginRequestInternalServerError with default headers values func NewGetLoginRequestInternalServerError() *GetLoginRequestInternalServerError { return &GetLoginRequestInternalServerError{} } /* GetLoginRequestInternalServerError describes a response with status code 500, with default header values. jsonError */ type GetLoginRequestInternalServerError struct { Payload *models.JSONError } func (o *GetLoginRequestInternalServerError) Error() string { return fmt.Sprintf("[GET /oauth2/auth/requests/login][%d] getLoginRequestInternalServerError %+v", 500, o.Payload) } func (o *GetLoginRequestInternalServerError) GetPayload() *models.JSONError { return o.Payload } func (o *GetLoginRequestInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JSONError) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil }