// 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"
)

// AdminDeleteUserPublicKeyReader is a Reader for the AdminDeleteUserPublicKey structure.
type AdminDeleteUserPublicKeyReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *AdminDeleteUserPublicKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewAdminDeleteUserPublicKeyNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewAdminDeleteUserPublicKeyForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewAdminDeleteUserPublicKeyNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /admin/users/{username}/keys/{id}] adminDeleteUserPublicKey", response, response.Code())
	}
}

// NewAdminDeleteUserPublicKeyNoContent creates a AdminDeleteUserPublicKeyNoContent with default headers values
func NewAdminDeleteUserPublicKeyNoContent() *AdminDeleteUserPublicKeyNoContent {
	return &AdminDeleteUserPublicKeyNoContent{}
}

/*
AdminDeleteUserPublicKeyNoContent describes a response with status code 204, with default header values.

APIEmpty is an empty response
*/
type AdminDeleteUserPublicKeyNoContent struct {
}

// IsSuccess returns true when this admin delete user public key no content response has a 2xx status code
func (o *AdminDeleteUserPublicKeyNoContent) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this admin delete user public key no content response has a 3xx status code
func (o *AdminDeleteUserPublicKeyNoContent) IsRedirect() bool {
	return false
}

// IsClientError returns true when this admin delete user public key no content response has a 4xx status code
func (o *AdminDeleteUserPublicKeyNoContent) IsClientError() bool {
	return false
}

// IsServerError returns true when this admin delete user public key no content response has a 5xx status code
func (o *AdminDeleteUserPublicKeyNoContent) IsServerError() bool {
	return false
}

// IsCode returns true when this admin delete user public key no content response a status code equal to that given
func (o *AdminDeleteUserPublicKeyNoContent) IsCode(code int) bool {
	return code == 204
}

// Code gets the status code for the admin delete user public key no content response
func (o *AdminDeleteUserPublicKeyNoContent) Code() int {
	return 204
}

func (o *AdminDeleteUserPublicKeyNoContent) Error() string {
	return fmt.Sprintf("[DELETE /admin/users/{username}/keys/{id}][%d] adminDeleteUserPublicKeyNoContent", 204)
}

func (o *AdminDeleteUserPublicKeyNoContent) String() string {
	return fmt.Sprintf("[DELETE /admin/users/{username}/keys/{id}][%d] adminDeleteUserPublicKeyNoContent", 204)
}

func (o *AdminDeleteUserPublicKeyNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewAdminDeleteUserPublicKeyForbidden creates a AdminDeleteUserPublicKeyForbidden with default headers values
func NewAdminDeleteUserPublicKeyForbidden() *AdminDeleteUserPublicKeyForbidden {
	return &AdminDeleteUserPublicKeyForbidden{}
}

/*
AdminDeleteUserPublicKeyForbidden describes a response with status code 403, with default header values.

APIForbiddenError is a forbidden error response
*/
type AdminDeleteUserPublicKeyForbidden struct {
	Message string
	URL     string
}

// IsSuccess returns true when this admin delete user public key forbidden response has a 2xx status code
func (o *AdminDeleteUserPublicKeyForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this admin delete user public key forbidden response has a 3xx status code
func (o *AdminDeleteUserPublicKeyForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this admin delete user public key forbidden response has a 4xx status code
func (o *AdminDeleteUserPublicKeyForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this admin delete user public key forbidden response has a 5xx status code
func (o *AdminDeleteUserPublicKeyForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this admin delete user public key forbidden response a status code equal to that given
func (o *AdminDeleteUserPublicKeyForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the admin delete user public key forbidden response
func (o *AdminDeleteUserPublicKeyForbidden) Code() int {
	return 403
}

func (o *AdminDeleteUserPublicKeyForbidden) Error() string {
	return fmt.Sprintf("[DELETE /admin/users/{username}/keys/{id}][%d] adminDeleteUserPublicKeyForbidden", 403)
}

func (o *AdminDeleteUserPublicKeyForbidden) String() string {
	return fmt.Sprintf("[DELETE /admin/users/{username}/keys/{id}][%d] adminDeleteUserPublicKeyForbidden", 403)
}

func (o *AdminDeleteUserPublicKeyForbidden) 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
}

// NewAdminDeleteUserPublicKeyNotFound creates a AdminDeleteUserPublicKeyNotFound with default headers values
func NewAdminDeleteUserPublicKeyNotFound() *AdminDeleteUserPublicKeyNotFound {
	return &AdminDeleteUserPublicKeyNotFound{}
}

/*
AdminDeleteUserPublicKeyNotFound describes a response with status code 404, with default header values.

APINotFound is a not found empty response
*/
type AdminDeleteUserPublicKeyNotFound struct {
}

// IsSuccess returns true when this admin delete user public key not found response has a 2xx status code
func (o *AdminDeleteUserPublicKeyNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this admin delete user public key not found response has a 3xx status code
func (o *AdminDeleteUserPublicKeyNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this admin delete user public key not found response has a 4xx status code
func (o *AdminDeleteUserPublicKeyNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this admin delete user public key not found response has a 5xx status code
func (o *AdminDeleteUserPublicKeyNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this admin delete user public key not found response a status code equal to that given
func (o *AdminDeleteUserPublicKeyNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the admin delete user public key not found response
func (o *AdminDeleteUserPublicKeyNotFound) Code() int {
	return 404
}

func (o *AdminDeleteUserPublicKeyNotFound) Error() string {
	return fmt.Sprintf("[DELETE /admin/users/{username}/keys/{id}][%d] adminDeleteUserPublicKeyNotFound", 404)
}

func (o *AdminDeleteUserPublicKeyNotFound) String() string {
	return fmt.Sprintf("[DELETE /admin/users/{username}/keys/{id}][%d] adminDeleteUserPublicKeyNotFound", 404)
}

func (o *AdminDeleteUserPublicKeyNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}
