mirror of
https://github.com/openziti/zrok.git
synced 2024-12-23 07:09:12 +01:00
304 lines
8.7 KiB
Go
304 lines
8.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 (
|
|
"context"
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
"github.com/go-openapi/swag"
|
|
)
|
|
|
|
// RegenerateTokenReader is a Reader for the RegenerateToken structure.
|
|
type RegenerateTokenReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *RegenerateTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewRegenerateTokenOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 404:
|
|
result := NewRegenerateTokenNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewRegenerateTokenInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[POST /regenerateToken] regenerateToken", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewRegenerateTokenOK creates a RegenerateTokenOK with default headers values
|
|
func NewRegenerateTokenOK() *RegenerateTokenOK {
|
|
return &RegenerateTokenOK{}
|
|
}
|
|
|
|
/*
|
|
RegenerateTokenOK describes a response with status code 200, with default header values.
|
|
|
|
regenerate account token
|
|
*/
|
|
type RegenerateTokenOK struct {
|
|
Payload *RegenerateTokenOKBody
|
|
}
|
|
|
|
// IsSuccess returns true when this regenerate token o k response has a 2xx status code
|
|
func (o *RegenerateTokenOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this regenerate token o k response has a 3xx status code
|
|
func (o *RegenerateTokenOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this regenerate token o k response has a 4xx status code
|
|
func (o *RegenerateTokenOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this regenerate token o k response has a 5xx status code
|
|
func (o *RegenerateTokenOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this regenerate token o k response a status code equal to that given
|
|
func (o *RegenerateTokenOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the regenerate token o k response
|
|
func (o *RegenerateTokenOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *RegenerateTokenOK) Error() string {
|
|
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *RegenerateTokenOK) String() string {
|
|
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *RegenerateTokenOK) GetPayload() *RegenerateTokenOKBody {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *RegenerateTokenOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(RegenerateTokenOKBody)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewRegenerateTokenNotFound creates a RegenerateTokenNotFound with default headers values
|
|
func NewRegenerateTokenNotFound() *RegenerateTokenNotFound {
|
|
return &RegenerateTokenNotFound{}
|
|
}
|
|
|
|
/*
|
|
RegenerateTokenNotFound describes a response with status code 404, with default header values.
|
|
|
|
account not found
|
|
*/
|
|
type RegenerateTokenNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this regenerate token not found response has a 2xx status code
|
|
func (o *RegenerateTokenNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this regenerate token not found response has a 3xx status code
|
|
func (o *RegenerateTokenNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this regenerate token not found response has a 4xx status code
|
|
func (o *RegenerateTokenNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this regenerate token not found response has a 5xx status code
|
|
func (o *RegenerateTokenNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this regenerate token not found response a status code equal to that given
|
|
func (o *RegenerateTokenNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the regenerate token not found response
|
|
func (o *RegenerateTokenNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *RegenerateTokenNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenNotFound ", 404)
|
|
}
|
|
|
|
func (o *RegenerateTokenNotFound) String() string {
|
|
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenNotFound ", 404)
|
|
}
|
|
|
|
func (o *RegenerateTokenNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewRegenerateTokenInternalServerError creates a RegenerateTokenInternalServerError with default headers values
|
|
func NewRegenerateTokenInternalServerError() *RegenerateTokenInternalServerError {
|
|
return &RegenerateTokenInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
RegenerateTokenInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type RegenerateTokenInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this regenerate token internal server error response has a 2xx status code
|
|
func (o *RegenerateTokenInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this regenerate token internal server error response has a 3xx status code
|
|
func (o *RegenerateTokenInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this regenerate token internal server error response has a 4xx status code
|
|
func (o *RegenerateTokenInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this regenerate token internal server error response has a 5xx status code
|
|
func (o *RegenerateTokenInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this regenerate token internal server error response a status code equal to that given
|
|
func (o *RegenerateTokenInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the regenerate token internal server error response
|
|
func (o *RegenerateTokenInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *RegenerateTokenInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *RegenerateTokenInternalServerError) String() string {
|
|
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *RegenerateTokenInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
/*
|
|
RegenerateTokenBody regenerate token body
|
|
swagger:model RegenerateTokenBody
|
|
*/
|
|
type RegenerateTokenBody struct {
|
|
|
|
// email address
|
|
EmailAddress string `json:"emailAddress,omitempty"`
|
|
}
|
|
|
|
// Validate validates this regenerate token body
|
|
func (o *RegenerateTokenBody) Validate(formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// ContextValidate validates this regenerate token body based on context it is used
|
|
func (o *RegenerateTokenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *RegenerateTokenBody) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *RegenerateTokenBody) UnmarshalBinary(b []byte) error {
|
|
var res RegenerateTokenBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*
|
|
RegenerateTokenOKBody regenerate token o k body
|
|
swagger:model RegenerateTokenOKBody
|
|
*/
|
|
type RegenerateTokenOKBody struct {
|
|
|
|
// token
|
|
Token string `json:"token,omitempty"`
|
|
}
|
|
|
|
// Validate validates this regenerate token o k body
|
|
func (o *RegenerateTokenOKBody) Validate(formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// ContextValidate validates this regenerate token o k body based on context it is used
|
|
func (o *RegenerateTokenOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *RegenerateTokenOKBody) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *RegenerateTokenOKBody) UnmarshalBinary(b []byte) error {
|
|
var res RegenerateTokenOKBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|