// Code generated by go-swagger; DO NOT EDIT.

package organization

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

// DeleteOrgSecretReader is a Reader for the DeleteOrgSecret structure.
type DeleteOrgSecretReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteOrgSecretReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewDeleteOrgSecretNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewDeleteOrgSecretBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewDeleteOrgSecretNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /orgs/{org}/actions/secrets/{secretname}] deleteOrgSecret", response, response.Code())
	}
}

// NewDeleteOrgSecretNoContent creates a DeleteOrgSecretNoContent with default headers values
func NewDeleteOrgSecretNoContent() *DeleteOrgSecretNoContent {
	return &DeleteOrgSecretNoContent{}
}

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

delete one secret of the organization
*/
type DeleteOrgSecretNoContent struct {
}

// IsSuccess returns true when this delete org secret no content response has a 2xx status code
func (o *DeleteOrgSecretNoContent) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this delete org secret no content response has a 3xx status code
func (o *DeleteOrgSecretNoContent) IsRedirect() bool {
	return false
}

// IsClientError returns true when this delete org secret no content response has a 4xx status code
func (o *DeleteOrgSecretNoContent) IsClientError() bool {
	return false
}

// IsServerError returns true when this delete org secret no content response has a 5xx status code
func (o *DeleteOrgSecretNoContent) IsServerError() bool {
	return false
}

// IsCode returns true when this delete org secret no content response a status code equal to that given
func (o *DeleteOrgSecretNoContent) IsCode(code int) bool {
	return code == 204
}

// Code gets the status code for the delete org secret no content response
func (o *DeleteOrgSecretNoContent) Code() int {
	return 204
}

func (o *DeleteOrgSecretNoContent) Error() string {
	return fmt.Sprintf("[DELETE /orgs/{org}/actions/secrets/{secretname}][%d] deleteOrgSecretNoContent", 204)
}

func (o *DeleteOrgSecretNoContent) String() string {
	return fmt.Sprintf("[DELETE /orgs/{org}/actions/secrets/{secretname}][%d] deleteOrgSecretNoContent", 204)
}

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

	return nil
}

// NewDeleteOrgSecretBadRequest creates a DeleteOrgSecretBadRequest with default headers values
func NewDeleteOrgSecretBadRequest() *DeleteOrgSecretBadRequest {
	return &DeleteOrgSecretBadRequest{}
}

/*
DeleteOrgSecretBadRequest describes a response with status code 400, with default header values.

APIError is error format response
*/
type DeleteOrgSecretBadRequest struct {
	Message string
	URL     string
}

// IsSuccess returns true when this delete org secret bad request response has a 2xx status code
func (o *DeleteOrgSecretBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this delete org secret bad request response has a 3xx status code
func (o *DeleteOrgSecretBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this delete org secret bad request response has a 4xx status code
func (o *DeleteOrgSecretBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this delete org secret bad request response has a 5xx status code
func (o *DeleteOrgSecretBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this delete org secret bad request response a status code equal to that given
func (o *DeleteOrgSecretBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the delete org secret bad request response
func (o *DeleteOrgSecretBadRequest) Code() int {
	return 400
}

func (o *DeleteOrgSecretBadRequest) Error() string {
	return fmt.Sprintf("[DELETE /orgs/{org}/actions/secrets/{secretname}][%d] deleteOrgSecretBadRequest", 400)
}

func (o *DeleteOrgSecretBadRequest) String() string {
	return fmt.Sprintf("[DELETE /orgs/{org}/actions/secrets/{secretname}][%d] deleteOrgSecretBadRequest", 400)
}

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

// NewDeleteOrgSecretNotFound creates a DeleteOrgSecretNotFound with default headers values
func NewDeleteOrgSecretNotFound() *DeleteOrgSecretNotFound {
	return &DeleteOrgSecretNotFound{}
}

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

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

// IsSuccess returns true when this delete org secret not found response has a 2xx status code
func (o *DeleteOrgSecretNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this delete org secret not found response has a 3xx status code
func (o *DeleteOrgSecretNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this delete org secret not found response has a 4xx status code
func (o *DeleteOrgSecretNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this delete org secret not found response has a 5xx status code
func (o *DeleteOrgSecretNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this delete org secret not found response a status code equal to that given
func (o *DeleteOrgSecretNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the delete org secret not found response
func (o *DeleteOrgSecretNotFound) Code() int {
	return 404
}

func (o *DeleteOrgSecretNotFound) Error() string {
	return fmt.Sprintf("[DELETE /orgs/{org}/actions/secrets/{secretname}][%d] deleteOrgSecretNotFound", 404)
}

func (o *DeleteOrgSecretNotFound) String() string {
	return fmt.Sprintf("[DELETE /orgs/{org}/actions/secrets/{secretname}][%d] deleteOrgSecretNotFound", 404)
}

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

	return nil
}
