2022-11-30 17:43:00 +01:00
// Code generated by go-swagger; DO NOT EDIT.
package account
// 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"
)
// InviteReader is a Reader for the Invite structure.
type InviteReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * InviteReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 201 :
result := NewInviteCreated ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 400 :
result := NewInviteBadRequest ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
2023-01-19 21:40:41 +01:00
case 401 :
result := NewInviteUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
2022-11-30 17:43:00 +01:00
case 500 :
result := NewInviteInternalServerError ( )
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 ( ) )
}
}
// NewInviteCreated creates a InviteCreated with default headers values
func NewInviteCreated ( ) * InviteCreated {
return & InviteCreated { }
}
/ *
InviteCreated describes a response with status code 201 , with default header values .
invitation created
* /
type InviteCreated struct {
}
// IsSuccess returns true when this invite created response has a 2xx status code
func ( o * InviteCreated ) IsSuccess ( ) bool {
return true
}
// IsRedirect returns true when this invite created response has a 3xx status code
func ( o * InviteCreated ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this invite created response has a 4xx status code
func ( o * InviteCreated ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this invite created response has a 5xx status code
func ( o * InviteCreated ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this invite created response a status code equal to that given
func ( o * InviteCreated ) IsCode ( code int ) bool {
return code == 201
}
func ( o * InviteCreated ) Error ( ) string {
return fmt . Sprintf ( "[POST /invite][%d] inviteCreated " , 201 )
}
func ( o * InviteCreated ) String ( ) string {
return fmt . Sprintf ( "[POST /invite][%d] inviteCreated " , 201 )
}
func ( o * InviteCreated ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
return nil
}
// NewInviteBadRequest creates a InviteBadRequest with default headers values
func NewInviteBadRequest ( ) * InviteBadRequest {
return & InviteBadRequest { }
}
/ *
InviteBadRequest describes a response with status code 400 , with default header values .
invitation not created ( already exists )
* /
type InviteBadRequest struct {
}
// IsSuccess returns true when this invite bad request response has a 2xx status code
func ( o * InviteBadRequest ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this invite bad request response has a 3xx status code
func ( o * InviteBadRequest ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this invite bad request response has a 4xx status code
func ( o * InviteBadRequest ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this invite bad request response has a 5xx status code
func ( o * InviteBadRequest ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this invite bad request response a status code equal to that given
func ( o * InviteBadRequest ) IsCode ( code int ) bool {
return code == 400
}
func ( o * InviteBadRequest ) Error ( ) string {
return fmt . Sprintf ( "[POST /invite][%d] inviteBadRequest " , 400 )
}
func ( o * InviteBadRequest ) String ( ) string {
return fmt . Sprintf ( "[POST /invite][%d] inviteBadRequest " , 400 )
}
func ( o * InviteBadRequest ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
return nil
}
2023-01-19 21:40:41 +01:00
// NewInviteUnauthorized creates a InviteUnauthorized with default headers values
func NewInviteUnauthorized ( ) * InviteUnauthorized {
return & InviteUnauthorized { }
}
/ *
InviteUnauthorized describes a response with status code 401 , with default header values .
unauthorized
* /
type InviteUnauthorized struct {
}
// IsSuccess returns true when this invite unauthorized response has a 2xx status code
func ( o * InviteUnauthorized ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this invite unauthorized response has a 3xx status code
func ( o * InviteUnauthorized ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this invite unauthorized response has a 4xx status code
func ( o * InviteUnauthorized ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this invite unauthorized response has a 5xx status code
func ( o * InviteUnauthorized ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this invite unauthorized response a status code equal to that given
func ( o * InviteUnauthorized ) IsCode ( code int ) bool {
return code == 401
}
func ( o * InviteUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[POST /invite][%d] inviteUnauthorized " , 401 )
}
func ( o * InviteUnauthorized ) String ( ) string {
return fmt . Sprintf ( "[POST /invite][%d] inviteUnauthorized " , 401 )
}
func ( o * InviteUnauthorized ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
return nil
}
2022-11-30 17:43:00 +01:00
// NewInviteInternalServerError creates a InviteInternalServerError with default headers values
func NewInviteInternalServerError ( ) * InviteInternalServerError {
return & InviteInternalServerError { }
}
/ *
InviteInternalServerError describes a response with status code 500 , with default header values .
internal server error
* /
type InviteInternalServerError struct {
}
// IsSuccess returns true when this invite internal server error response has a 2xx status code
func ( o * InviteInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this invite internal server error response has a 3xx status code
func ( o * InviteInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this invite internal server error response has a 4xx status code
func ( o * InviteInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this invite internal server error response has a 5xx status code
func ( o * InviteInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this invite internal server error response a status code equal to that given
func ( o * InviteInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
func ( o * InviteInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[POST /invite][%d] inviteInternalServerError " , 500 )
}
func ( o * InviteInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[POST /invite][%d] inviteInternalServerError " , 500 )
}
func ( o * InviteInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
return nil
}