// 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" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/openziti/zrok/rest_model_zrok" ) // VerifyReader is a Reader for the Verify structure. type VerifyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *VerifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewVerifyOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 404: result := NewVerifyNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewVerifyInternalServerError() 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()) } } // NewVerifyOK creates a VerifyOK with default headers values func NewVerifyOK() *VerifyOK { return &VerifyOK{} } /* VerifyOK describes a response with status code 200, with default header values. token ready */ type VerifyOK struct { Payload *rest_model_zrok.VerifyResponse } // IsSuccess returns true when this verify o k response has a 2xx status code func (o *VerifyOK) IsSuccess() bool { return true } // IsRedirect returns true when this verify o k response has a 3xx status code func (o *VerifyOK) IsRedirect() bool { return false } // IsClientError returns true when this verify o k response has a 4xx status code func (o *VerifyOK) IsClientError() bool { return false } // IsServerError returns true when this verify o k response has a 5xx status code func (o *VerifyOK) IsServerError() bool { return false } // IsCode returns true when this verify o k response a status code equal to that given func (o *VerifyOK) IsCode(code int) bool { return code == 200 } func (o *VerifyOK) Error() string { return fmt.Sprintf("[POST /verify][%d] verifyOK %+v", 200, o.Payload) } func (o *VerifyOK) String() string { return fmt.Sprintf("[POST /verify][%d] verifyOK %+v", 200, o.Payload) } func (o *VerifyOK) GetPayload() *rest_model_zrok.VerifyResponse { return o.Payload } func (o *VerifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(rest_model_zrok.VerifyResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewVerifyNotFound creates a VerifyNotFound with default headers values func NewVerifyNotFound() *VerifyNotFound { return &VerifyNotFound{} } /* VerifyNotFound describes a response with status code 404, with default header values. token not found */ type VerifyNotFound struct { } // IsSuccess returns true when this verify not found response has a 2xx status code func (o *VerifyNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this verify not found response has a 3xx status code func (o *VerifyNotFound) IsRedirect() bool { return false } // IsClientError returns true when this verify not found response has a 4xx status code func (o *VerifyNotFound) IsClientError() bool { return true } // IsServerError returns true when this verify not found response has a 5xx status code func (o *VerifyNotFound) IsServerError() bool { return false } // IsCode returns true when this verify not found response a status code equal to that given func (o *VerifyNotFound) IsCode(code int) bool { return code == 404 } func (o *VerifyNotFound) Error() string { return fmt.Sprintf("[POST /verify][%d] verifyNotFound ", 404) } func (o *VerifyNotFound) String() string { return fmt.Sprintf("[POST /verify][%d] verifyNotFound ", 404) } func (o *VerifyNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewVerifyInternalServerError creates a VerifyInternalServerError with default headers values func NewVerifyInternalServerError() *VerifyInternalServerError { return &VerifyInternalServerError{} } /* VerifyInternalServerError describes a response with status code 500, with default header values. internal server error */ type VerifyInternalServerError struct { } // IsSuccess returns true when this verify internal server error response has a 2xx status code func (o *VerifyInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this verify internal server error response has a 3xx status code func (o *VerifyInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this verify internal server error response has a 4xx status code func (o *VerifyInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this verify internal server error response has a 5xx status code func (o *VerifyInternalServerError) IsServerError() bool { return true } // IsCode returns true when this verify internal server error response a status code equal to that given func (o *VerifyInternalServerError) IsCode(code int) bool { return code == 500 } func (o *VerifyInternalServerError) Error() string { return fmt.Sprintf("[POST /verify][%d] verifyInternalServerError ", 500) } func (o *VerifyInternalServerError) String() string { return fmt.Sprintf("[POST /verify][%d] verifyInternalServerError ", 500) } func (o *VerifyInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }