// Code generated by go-swagger; DO NOT EDIT. package invite // 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" ) // InviteGenerateReader is a Reader for the InviteGenerate structure. type InviteGenerateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *InviteGenerateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 201: result := NewInviteGenerateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewInviteGenerateBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewInviteGenerateInternalServerError() 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()) } } // NewInviteGenerateCreated creates a InviteGenerateCreated with default headers values func NewInviteGenerateCreated() *InviteGenerateCreated { return &InviteGenerateCreated{} } /* InviteGenerateCreated describes a response with status code 201, with default header values. invitation tokens created */ type InviteGenerateCreated struct { } // IsSuccess returns true when this invite generate created response has a 2xx status code func (o *InviteGenerateCreated) IsSuccess() bool { return true } // IsRedirect returns true when this invite generate created response has a 3xx status code func (o *InviteGenerateCreated) IsRedirect() bool { return false } // IsClientError returns true when this invite generate created response has a 4xx status code func (o *InviteGenerateCreated) IsClientError() bool { return false } // IsServerError returns true when this invite generate created response has a 5xx status code func (o *InviteGenerateCreated) IsServerError() bool { return false } // IsCode returns true when this invite generate created response a status code equal to that given func (o *InviteGenerateCreated) IsCode(code int) bool { return code == 201 } func (o *InviteGenerateCreated) Error() string { return fmt.Sprintf("[POST /invite/generate][%d] inviteGenerateCreated ", 201) } func (o *InviteGenerateCreated) String() string { return fmt.Sprintf("[POST /invite/generate][%d] inviteGenerateCreated ", 201) } func (o *InviteGenerateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewInviteGenerateBadRequest creates a InviteGenerateBadRequest with default headers values func NewInviteGenerateBadRequest() *InviteGenerateBadRequest { return &InviteGenerateBadRequest{} } /* InviteGenerateBadRequest describes a response with status code 400, with default header values. invitation tokens not created */ type InviteGenerateBadRequest struct { } // IsSuccess returns true when this invite generate bad request response has a 2xx status code func (o *InviteGenerateBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this invite generate bad request response has a 3xx status code func (o *InviteGenerateBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this invite generate bad request response has a 4xx status code func (o *InviteGenerateBadRequest) IsClientError() bool { return true } // IsServerError returns true when this invite generate bad request response has a 5xx status code func (o *InviteGenerateBadRequest) IsServerError() bool { return false } // IsCode returns true when this invite generate bad request response a status code equal to that given func (o *InviteGenerateBadRequest) IsCode(code int) bool { return code == 400 } func (o *InviteGenerateBadRequest) Error() string { return fmt.Sprintf("[POST /invite/generate][%d] inviteGenerateBadRequest ", 400) } func (o *InviteGenerateBadRequest) String() string { return fmt.Sprintf("[POST /invite/generate][%d] inviteGenerateBadRequest ", 400) } func (o *InviteGenerateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewInviteGenerateInternalServerError creates a InviteGenerateInternalServerError with default headers values func NewInviteGenerateInternalServerError() *InviteGenerateInternalServerError { return &InviteGenerateInternalServerError{} } /* InviteGenerateInternalServerError describes a response with status code 500, with default header values. internal server error */ type InviteGenerateInternalServerError struct { } // IsSuccess returns true when this invite generate internal server error response has a 2xx status code func (o *InviteGenerateInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this invite generate internal server error response has a 3xx status code func (o *InviteGenerateInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this invite generate internal server error response has a 4xx status code func (o *InviteGenerateInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this invite generate internal server error response has a 5xx status code func (o *InviteGenerateInternalServerError) IsServerError() bool { return true } // IsCode returns true when this invite generate internal server error response a status code equal to that given func (o *InviteGenerateInternalServerError) IsCode(code int) bool { return code == 500 } func (o *InviteGenerateInternalServerError) Error() string { return fmt.Sprintf("[POST /invite/generate][%d] inviteGenerateInternalServerError ", 500) } func (o *InviteGenerateInternalServerError) String() string { return fmt.Sprintf("[POST /invite/generate][%d] inviteGenerateInternalServerError ", 500) } func (o *InviteGenerateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }