// 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" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" ) // InviteTokenGenerateReader is a Reader for the InviteTokenGenerate structure. type InviteTokenGenerateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *InviteTokenGenerateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 201: result := NewInviteTokenGenerateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewInviteTokenGenerateBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewInviteTokenGenerateUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewInviteTokenGenerateInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[POST /invite/token/generate] inviteTokenGenerate", response, response.Code()) } } // NewInviteTokenGenerateCreated creates a InviteTokenGenerateCreated with default headers values func NewInviteTokenGenerateCreated() *InviteTokenGenerateCreated { return &InviteTokenGenerateCreated{} } /* InviteTokenGenerateCreated describes a response with status code 201, with default header values. invitation tokens created */ type InviteTokenGenerateCreated struct { } // IsSuccess returns true when this invite token generate created response has a 2xx status code func (o *InviteTokenGenerateCreated) IsSuccess() bool { return true } // IsRedirect returns true when this invite token generate created response has a 3xx status code func (o *InviteTokenGenerateCreated) IsRedirect() bool { return false } // IsClientError returns true when this invite token generate created response has a 4xx status code func (o *InviteTokenGenerateCreated) IsClientError() bool { return false } // IsServerError returns true when this invite token generate created response has a 5xx status code func (o *InviteTokenGenerateCreated) IsServerError() bool { return false } // IsCode returns true when this invite token generate created response a status code equal to that given func (o *InviteTokenGenerateCreated) IsCode(code int) bool { return code == 201 } // Code gets the status code for the invite token generate created response func (o *InviteTokenGenerateCreated) Code() int { return 201 } func (o *InviteTokenGenerateCreated) Error() string { return fmt.Sprintf("[POST /invite/token/generate][%d] inviteTokenGenerateCreated ", 201) } func (o *InviteTokenGenerateCreated) String() string { return fmt.Sprintf("[POST /invite/token/generate][%d] inviteTokenGenerateCreated ", 201) } func (o *InviteTokenGenerateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewInviteTokenGenerateBadRequest creates a InviteTokenGenerateBadRequest with default headers values func NewInviteTokenGenerateBadRequest() *InviteTokenGenerateBadRequest { return &InviteTokenGenerateBadRequest{} } /* InviteTokenGenerateBadRequest describes a response with status code 400, with default header values. invitation tokens not created */ type InviteTokenGenerateBadRequest struct { } // IsSuccess returns true when this invite token generate bad request response has a 2xx status code func (o *InviteTokenGenerateBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this invite token generate bad request response has a 3xx status code func (o *InviteTokenGenerateBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this invite token generate bad request response has a 4xx status code func (o *InviteTokenGenerateBadRequest) IsClientError() bool { return true } // IsServerError returns true when this invite token generate bad request response has a 5xx status code func (o *InviteTokenGenerateBadRequest) IsServerError() bool { return false } // IsCode returns true when this invite token generate bad request response a status code equal to that given func (o *InviteTokenGenerateBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the invite token generate bad request response func (o *InviteTokenGenerateBadRequest) Code() int { return 400 } func (o *InviteTokenGenerateBadRequest) Error() string { return fmt.Sprintf("[POST /invite/token/generate][%d] inviteTokenGenerateBadRequest ", 400) } func (o *InviteTokenGenerateBadRequest) String() string { return fmt.Sprintf("[POST /invite/token/generate][%d] inviteTokenGenerateBadRequest ", 400) } func (o *InviteTokenGenerateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewInviteTokenGenerateUnauthorized creates a InviteTokenGenerateUnauthorized with default headers values func NewInviteTokenGenerateUnauthorized() *InviteTokenGenerateUnauthorized { return &InviteTokenGenerateUnauthorized{} } /* InviteTokenGenerateUnauthorized describes a response with status code 401, with default header values. unauthorized */ type InviteTokenGenerateUnauthorized struct { } // IsSuccess returns true when this invite token generate unauthorized response has a 2xx status code func (o *InviteTokenGenerateUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this invite token generate unauthorized response has a 3xx status code func (o *InviteTokenGenerateUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this invite token generate unauthorized response has a 4xx status code func (o *InviteTokenGenerateUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this invite token generate unauthorized response has a 5xx status code func (o *InviteTokenGenerateUnauthorized) IsServerError() bool { return false } // IsCode returns true when this invite token generate unauthorized response a status code equal to that given func (o *InviteTokenGenerateUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the invite token generate unauthorized response func (o *InviteTokenGenerateUnauthorized) Code() int { return 401 } func (o *InviteTokenGenerateUnauthorized) Error() string { return fmt.Sprintf("[POST /invite/token/generate][%d] inviteTokenGenerateUnauthorized ", 401) } func (o *InviteTokenGenerateUnauthorized) String() string { return fmt.Sprintf("[POST /invite/token/generate][%d] inviteTokenGenerateUnauthorized ", 401) } func (o *InviteTokenGenerateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewInviteTokenGenerateInternalServerError creates a InviteTokenGenerateInternalServerError with default headers values func NewInviteTokenGenerateInternalServerError() *InviteTokenGenerateInternalServerError { return &InviteTokenGenerateInternalServerError{} } /* InviteTokenGenerateInternalServerError describes a response with status code 500, with default header values. internal server error */ type InviteTokenGenerateInternalServerError struct { } // IsSuccess returns true when this invite token generate internal server error response has a 2xx status code func (o *InviteTokenGenerateInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this invite token generate internal server error response has a 3xx status code func (o *InviteTokenGenerateInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this invite token generate internal server error response has a 4xx status code func (o *InviteTokenGenerateInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this invite token generate internal server error response has a 5xx status code func (o *InviteTokenGenerateInternalServerError) IsServerError() bool { return true } // IsCode returns true when this invite token generate internal server error response a status code equal to that given func (o *InviteTokenGenerateInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the invite token generate internal server error response func (o *InviteTokenGenerateInternalServerError) Code() int { return 500 } func (o *InviteTokenGenerateInternalServerError) Error() string { return fmt.Sprintf("[POST /invite/token/generate][%d] inviteTokenGenerateInternalServerError ", 500) } func (o *InviteTokenGenerateInternalServerError) String() string { return fmt.Sprintf("[POST /invite/token/generate][%d] inviteTokenGenerateInternalServerError ", 500) } func (o *InviteTokenGenerateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }