zrok/rest_client_zrok/account/invite_responses.go
2022-11-30 11:43:00 -05:00

198 lines
5.7 KiB
Go

// 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
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
}
// 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
}