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

// UserCurrentDeleteGPGKeyReader is a Reader for the UserCurrentDeleteGPGKey structure.
type UserCurrentDeleteGPGKeyReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *UserCurrentDeleteGPGKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewUserCurrentDeleteGPGKeyNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewUserCurrentDeleteGPGKeyForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewUserCurrentDeleteGPGKeyNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /user/gpg_keys/{id}] userCurrentDeleteGPGKey", response, response.Code())
	}
}

// NewUserCurrentDeleteGPGKeyNoContent creates a UserCurrentDeleteGPGKeyNoContent with default headers values
func NewUserCurrentDeleteGPGKeyNoContent() *UserCurrentDeleteGPGKeyNoContent {
	return &UserCurrentDeleteGPGKeyNoContent{}
}

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

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

// IsSuccess returns true when this user current delete g p g key no content response has a 2xx status code
func (o *UserCurrentDeleteGPGKeyNoContent) IsSuccess() bool {
	return true
}

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

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

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

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

// Code gets the status code for the user current delete g p g key no content response
func (o *UserCurrentDeleteGPGKeyNoContent) Code() int {
	return 204
}

func (o *UserCurrentDeleteGPGKeyNoContent) Error() string {
	return fmt.Sprintf("[DELETE /user/gpg_keys/{id}][%d] userCurrentDeleteGPGKeyNoContent", 204)
}

func (o *UserCurrentDeleteGPGKeyNoContent) String() string {
	return fmt.Sprintf("[DELETE /user/gpg_keys/{id}][%d] userCurrentDeleteGPGKeyNoContent", 204)
}

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

	return nil
}

// NewUserCurrentDeleteGPGKeyForbidden creates a UserCurrentDeleteGPGKeyForbidden with default headers values
func NewUserCurrentDeleteGPGKeyForbidden() *UserCurrentDeleteGPGKeyForbidden {
	return &UserCurrentDeleteGPGKeyForbidden{}
}

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

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

// IsSuccess returns true when this user current delete g p g key forbidden response has a 2xx status code
func (o *UserCurrentDeleteGPGKeyForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this user current delete g p g key forbidden response has a 3xx status code
func (o *UserCurrentDeleteGPGKeyForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this user current delete g p g key forbidden response has a 4xx status code
func (o *UserCurrentDeleteGPGKeyForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this user current delete g p g key forbidden response has a 5xx status code
func (o *UserCurrentDeleteGPGKeyForbidden) IsServerError() bool {
	return false
}

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

// Code gets the status code for the user current delete g p g key forbidden response
func (o *UserCurrentDeleteGPGKeyForbidden) Code() int {
	return 403
}

func (o *UserCurrentDeleteGPGKeyForbidden) Error() string {
	return fmt.Sprintf("[DELETE /user/gpg_keys/{id}][%d] userCurrentDeleteGPGKeyForbidden", 403)
}

func (o *UserCurrentDeleteGPGKeyForbidden) String() string {
	return fmt.Sprintf("[DELETE /user/gpg_keys/{id}][%d] userCurrentDeleteGPGKeyForbidden", 403)
}

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

// NewUserCurrentDeleteGPGKeyNotFound creates a UserCurrentDeleteGPGKeyNotFound with default headers values
func NewUserCurrentDeleteGPGKeyNotFound() *UserCurrentDeleteGPGKeyNotFound {
	return &UserCurrentDeleteGPGKeyNotFound{}
}

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

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

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

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

// IsClientError returns true when this user current delete g p g key not found response has a 4xx status code
func (o *UserCurrentDeleteGPGKeyNotFound) IsClientError() bool {
	return true
}

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

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

// Code gets the status code for the user current delete g p g key not found response
func (o *UserCurrentDeleteGPGKeyNotFound) Code() int {
	return 404
}

func (o *UserCurrentDeleteGPGKeyNotFound) Error() string {
	return fmt.Sprintf("[DELETE /user/gpg_keys/{id}][%d] userCurrentDeleteGPGKeyNotFound", 404)
}

func (o *UserCurrentDeleteGPGKeyNotFound) String() string {
	return fmt.Sprintf("[DELETE /user/gpg_keys/{id}][%d] userCurrentDeleteGPGKeyNotFound", 404)
}

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

	return nil
}
