mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-10-19 15:55:08 +00:00
220 lines
6.6 KiB
Go
220 lines
6.6 KiB
Go
// 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"
|
|
)
|
|
|
|
// AcceptLoginRequestReader is a Reader for the AcceptLoginRequest structure.
|
|
type AcceptLoginRequestReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *AcceptLoginRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewAcceptLoginRequestOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewAcceptLoginRequestBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewAcceptLoginRequestUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewAcceptLoginRequestNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewAcceptLoginRequestInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewAcceptLoginRequestOK creates a AcceptLoginRequestOK with default headers values
|
|
func NewAcceptLoginRequestOK() *AcceptLoginRequestOK {
|
|
return &AcceptLoginRequestOK{}
|
|
}
|
|
|
|
/* AcceptLoginRequestOK describes a response with status code 200, with default header values.
|
|
|
|
completedRequest
|
|
*/
|
|
type AcceptLoginRequestOK struct {
|
|
Payload *models.CompletedRequest
|
|
}
|
|
|
|
func (o *AcceptLoginRequestOK) Error() string {
|
|
return fmt.Sprintf("[PUT /oauth2/auth/requests/login/accept][%d] acceptLoginRequestOK %+v", 200, o.Payload)
|
|
}
|
|
func (o *AcceptLoginRequestOK) GetPayload() *models.CompletedRequest {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *AcceptLoginRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.CompletedRequest)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAcceptLoginRequestBadRequest creates a AcceptLoginRequestBadRequest with default headers values
|
|
func NewAcceptLoginRequestBadRequest() *AcceptLoginRequestBadRequest {
|
|
return &AcceptLoginRequestBadRequest{}
|
|
}
|
|
|
|
/* AcceptLoginRequestBadRequest describes a response with status code 400, with default header values.
|
|
|
|
jsonError
|
|
*/
|
|
type AcceptLoginRequestBadRequest struct {
|
|
Payload *models.JSONError
|
|
}
|
|
|
|
func (o *AcceptLoginRequestBadRequest) Error() string {
|
|
return fmt.Sprintf("[PUT /oauth2/auth/requests/login/accept][%d] acceptLoginRequestBadRequest %+v", 400, o.Payload)
|
|
}
|
|
func (o *AcceptLoginRequestBadRequest) GetPayload() *models.JSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *AcceptLoginRequestBadRequest) 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
|
|
}
|
|
|
|
// NewAcceptLoginRequestUnauthorized creates a AcceptLoginRequestUnauthorized with default headers values
|
|
func NewAcceptLoginRequestUnauthorized() *AcceptLoginRequestUnauthorized {
|
|
return &AcceptLoginRequestUnauthorized{}
|
|
}
|
|
|
|
/* AcceptLoginRequestUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
jsonError
|
|
*/
|
|
type AcceptLoginRequestUnauthorized struct {
|
|
Payload *models.JSONError
|
|
}
|
|
|
|
func (o *AcceptLoginRequestUnauthorized) Error() string {
|
|
return fmt.Sprintf("[PUT /oauth2/auth/requests/login/accept][%d] acceptLoginRequestUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
func (o *AcceptLoginRequestUnauthorized) GetPayload() *models.JSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *AcceptLoginRequestUnauthorized) 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
|
|
}
|
|
|
|
// NewAcceptLoginRequestNotFound creates a AcceptLoginRequestNotFound with default headers values
|
|
func NewAcceptLoginRequestNotFound() *AcceptLoginRequestNotFound {
|
|
return &AcceptLoginRequestNotFound{}
|
|
}
|
|
|
|
/* AcceptLoginRequestNotFound describes a response with status code 404, with default header values.
|
|
|
|
jsonError
|
|
*/
|
|
type AcceptLoginRequestNotFound struct {
|
|
Payload *models.JSONError
|
|
}
|
|
|
|
func (o *AcceptLoginRequestNotFound) Error() string {
|
|
return fmt.Sprintf("[PUT /oauth2/auth/requests/login/accept][%d] acceptLoginRequestNotFound %+v", 404, o.Payload)
|
|
}
|
|
func (o *AcceptLoginRequestNotFound) GetPayload() *models.JSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *AcceptLoginRequestNotFound) 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
|
|
}
|
|
|
|
// NewAcceptLoginRequestInternalServerError creates a AcceptLoginRequestInternalServerError with default headers values
|
|
func NewAcceptLoginRequestInternalServerError() *AcceptLoginRequestInternalServerError {
|
|
return &AcceptLoginRequestInternalServerError{}
|
|
}
|
|
|
|
/* AcceptLoginRequestInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
jsonError
|
|
*/
|
|
type AcceptLoginRequestInternalServerError struct {
|
|
Payload *models.JSONError
|
|
}
|
|
|
|
func (o *AcceptLoginRequestInternalServerError) Error() string {
|
|
return fmt.Sprintf("[PUT /oauth2/auth/requests/login/accept][%d] acceptLoginRequestInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
func (o *AcceptLoginRequestInternalServerError) GetPayload() *models.JSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *AcceptLoginRequestInternalServerError) 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
|
|
}
|