229 lines
7.2 KiB
Go
229 lines
7.2 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
package user
|
||
|
|
||
|
// 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"
|
||
|
)
|
||
|
|
||
|
// UserCurrentDeleteKeyReader is a Reader for the UserCurrentDeleteKey structure.
|
||
|
type UserCurrentDeleteKeyReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *UserCurrentDeleteKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 204:
|
||
|
result := NewUserCurrentDeleteKeyNoContent()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 403:
|
||
|
result := NewUserCurrentDeleteKeyForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewUserCurrentDeleteKeyNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
default:
|
||
|
return nil, runtime.NewAPIError("[DELETE /user/keys/{id}] userCurrentDeleteKey", response, response.Code())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewUserCurrentDeleteKeyNoContent creates a UserCurrentDeleteKeyNoContent with default headers values
|
||
|
func NewUserCurrentDeleteKeyNoContent() *UserCurrentDeleteKeyNoContent {
|
||
|
return &UserCurrentDeleteKeyNoContent{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentDeleteKeyNoContent describes a response with status code 204, with default header values.
|
||
|
|
||
|
APIEmpty is an empty response
|
||
|
*/
|
||
|
type UserCurrentDeleteKeyNoContent struct {
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this user current delete key no content response has a 2xx status code
|
||
|
func (o *UserCurrentDeleteKeyNoContent) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this user current delete key no content response has a 3xx status code
|
||
|
func (o *UserCurrentDeleteKeyNoContent) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this user current delete key no content response has a 4xx status code
|
||
|
func (o *UserCurrentDeleteKeyNoContent) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this user current delete key no content response has a 5xx status code
|
||
|
func (o *UserCurrentDeleteKeyNoContent) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this user current delete key no content response a status code equal to that given
|
||
|
func (o *UserCurrentDeleteKeyNoContent) IsCode(code int) bool {
|
||
|
return code == 204
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the user current delete key no content response
|
||
|
func (o *UserCurrentDeleteKeyNoContent) Code() int {
|
||
|
return 204
|
||
|
}
|
||
|
|
||
|
func (o *UserCurrentDeleteKeyNoContent) Error() string {
|
||
|
return fmt.Sprintf("[DELETE /user/keys/{id}][%d] userCurrentDeleteKeyNoContent", 204)
|
||
|
}
|
||
|
|
||
|
func (o *UserCurrentDeleteKeyNoContent) String() string {
|
||
|
return fmt.Sprintf("[DELETE /user/keys/{id}][%d] userCurrentDeleteKeyNoContent", 204)
|
||
|
}
|
||
|
|
||
|
func (o *UserCurrentDeleteKeyNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewUserCurrentDeleteKeyForbidden creates a UserCurrentDeleteKeyForbidden with default headers values
|
||
|
func NewUserCurrentDeleteKeyForbidden() *UserCurrentDeleteKeyForbidden {
|
||
|
return &UserCurrentDeleteKeyForbidden{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentDeleteKeyForbidden describes a response with status code 403, with default header values.
|
||
|
|
||
|
APIForbiddenError is a forbidden error response
|
||
|
*/
|
||
|
type UserCurrentDeleteKeyForbidden struct {
|
||
|
Message string
|
||
|
URL string
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this user current delete key forbidden response has a 2xx status code
|
||
|
func (o *UserCurrentDeleteKeyForbidden) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this user current delete key forbidden response has a 3xx status code
|
||
|
func (o *UserCurrentDeleteKeyForbidden) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this user current delete key forbidden response has a 4xx status code
|
||
|
func (o *UserCurrentDeleteKeyForbidden) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this user current delete key forbidden response has a 5xx status code
|
||
|
func (o *UserCurrentDeleteKeyForbidden) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this user current delete key forbidden response a status code equal to that given
|
||
|
func (o *UserCurrentDeleteKeyForbidden) IsCode(code int) bool {
|
||
|
return code == 403
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the user current delete key forbidden response
|
||
|
func (o *UserCurrentDeleteKeyForbidden) Code() int {
|
||
|
return 403
|
||
|
}
|
||
|
|
||
|
func (o *UserCurrentDeleteKeyForbidden) Error() string {
|
||
|
return fmt.Sprintf("[DELETE /user/keys/{id}][%d] userCurrentDeleteKeyForbidden", 403)
|
||
|
}
|
||
|
|
||
|
func (o *UserCurrentDeleteKeyForbidden) String() string {
|
||
|
return fmt.Sprintf("[DELETE /user/keys/{id}][%d] userCurrentDeleteKeyForbidden", 403)
|
||
|
}
|
||
|
|
||
|
func (o *UserCurrentDeleteKeyForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
// hydrates response header message
|
||
|
hdrMessage := response.GetHeader("message")
|
||
|
|
||
|
if hdrMessage != "" {
|
||
|
o.Message = hdrMessage
|
||
|
}
|
||
|
|
||
|
// hydrates response header url
|
||
|
hdrURL := response.GetHeader("url")
|
||
|
|
||
|
if hdrURL != "" {
|
||
|
o.URL = hdrURL
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewUserCurrentDeleteKeyNotFound creates a UserCurrentDeleteKeyNotFound with default headers values
|
||
|
func NewUserCurrentDeleteKeyNotFound() *UserCurrentDeleteKeyNotFound {
|
||
|
return &UserCurrentDeleteKeyNotFound{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentDeleteKeyNotFound describes a response with status code 404, with default header values.
|
||
|
|
||
|
APINotFound is a not found empty response
|
||
|
*/
|
||
|
type UserCurrentDeleteKeyNotFound struct {
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this user current delete key not found response has a 2xx status code
|
||
|
func (o *UserCurrentDeleteKeyNotFound) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this user current delete key not found response has a 3xx status code
|
||
|
func (o *UserCurrentDeleteKeyNotFound) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this user current delete key not found response has a 4xx status code
|
||
|
func (o *UserCurrentDeleteKeyNotFound) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this user current delete key not found response has a 5xx status code
|
||
|
func (o *UserCurrentDeleteKeyNotFound) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this user current delete key not found response a status code equal to that given
|
||
|
func (o *UserCurrentDeleteKeyNotFound) IsCode(code int) bool {
|
||
|
return code == 404
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the user current delete key not found response
|
||
|
func (o *UserCurrentDeleteKeyNotFound) Code() int {
|
||
|
return 404
|
||
|
}
|
||
|
|
||
|
func (o *UserCurrentDeleteKeyNotFound) Error() string {
|
||
|
return fmt.Sprintf("[DELETE /user/keys/{id}][%d] userCurrentDeleteKeyNotFound", 404)
|
||
|
}
|
||
|
|
||
|
func (o *UserCurrentDeleteKeyNotFound) String() string {
|
||
|
return fmt.Sprintf("[DELETE /user/keys/{id}][%d] userCurrentDeleteKeyNotFound", 404)
|
||
|
}
|
||
|
|
||
|
func (o *UserCurrentDeleteKeyNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
return nil
|
||
|
}
|