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

package repository

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

// RepoDeleteTagReader is a Reader for the RepoDeleteTag structure.
type RepoDeleteTagReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *RepoDeleteTagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewRepoDeleteTagNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 404:
		result := NewRepoDeleteTagNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 405:
		result := NewRepoDeleteTagMethodNotAllowed()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewRepoDeleteTagConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewRepoDeleteTagUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 423:
		result := NewRepoDeleteTagLocked()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /repos/{owner}/{repo}/tags/{tag}] repoDeleteTag", response, response.Code())
	}
}

// NewRepoDeleteTagNoContent creates a RepoDeleteTagNoContent with default headers values
func NewRepoDeleteTagNoContent() *RepoDeleteTagNoContent {
	return &RepoDeleteTagNoContent{}
}

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

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

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

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

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

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

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

// Code gets the status code for the repo delete tag no content response
func (o *RepoDeleteTagNoContent) Code() int {
	return 204
}

func (o *RepoDeleteTagNoContent) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagNoContent", 204)
}

func (o *RepoDeleteTagNoContent) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagNoContent", 204)
}

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

	return nil
}

// NewRepoDeleteTagNotFound creates a RepoDeleteTagNotFound with default headers values
func NewRepoDeleteTagNotFound() *RepoDeleteTagNotFound {
	return &RepoDeleteTagNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the repo delete tag not found response
func (o *RepoDeleteTagNotFound) Code() int {
	return 404
}

func (o *RepoDeleteTagNotFound) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagNotFound", 404)
}

func (o *RepoDeleteTagNotFound) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagNotFound", 404)
}

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

	return nil
}

// NewRepoDeleteTagMethodNotAllowed creates a RepoDeleteTagMethodNotAllowed with default headers values
func NewRepoDeleteTagMethodNotAllowed() *RepoDeleteTagMethodNotAllowed {
	return &RepoDeleteTagMethodNotAllowed{}
}

/*
RepoDeleteTagMethodNotAllowed describes a response with status code 405, with default header values.

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

// IsSuccess returns true when this repo delete tag method not allowed response has a 2xx status code
func (o *RepoDeleteTagMethodNotAllowed) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this repo delete tag method not allowed response has a 3xx status code
func (o *RepoDeleteTagMethodNotAllowed) IsRedirect() bool {
	return false
}

// IsClientError returns true when this repo delete tag method not allowed response has a 4xx status code
func (o *RepoDeleteTagMethodNotAllowed) IsClientError() bool {
	return true
}

// IsServerError returns true when this repo delete tag method not allowed response has a 5xx status code
func (o *RepoDeleteTagMethodNotAllowed) IsServerError() bool {
	return false
}

// IsCode returns true when this repo delete tag method not allowed response a status code equal to that given
func (o *RepoDeleteTagMethodNotAllowed) IsCode(code int) bool {
	return code == 405
}

// Code gets the status code for the repo delete tag method not allowed response
func (o *RepoDeleteTagMethodNotAllowed) Code() int {
	return 405
}

func (o *RepoDeleteTagMethodNotAllowed) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagMethodNotAllowed", 405)
}

func (o *RepoDeleteTagMethodNotAllowed) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagMethodNotAllowed", 405)
}

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

	return nil
}

// NewRepoDeleteTagConflict creates a RepoDeleteTagConflict with default headers values
func NewRepoDeleteTagConflict() *RepoDeleteTagConflict {
	return &RepoDeleteTagConflict{}
}

/*
RepoDeleteTagConflict describes a response with status code 409, with default header values.

APIConflict is a conflict empty response
*/
type RepoDeleteTagConflict struct {
}

// IsSuccess returns true when this repo delete tag conflict response has a 2xx status code
func (o *RepoDeleteTagConflict) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this repo delete tag conflict response has a 3xx status code
func (o *RepoDeleteTagConflict) IsRedirect() bool {
	return false
}

// IsClientError returns true when this repo delete tag conflict response has a 4xx status code
func (o *RepoDeleteTagConflict) IsClientError() bool {
	return true
}

// IsServerError returns true when this repo delete tag conflict response has a 5xx status code
func (o *RepoDeleteTagConflict) IsServerError() bool {
	return false
}

// IsCode returns true when this repo delete tag conflict response a status code equal to that given
func (o *RepoDeleteTagConflict) IsCode(code int) bool {
	return code == 409
}

// Code gets the status code for the repo delete tag conflict response
func (o *RepoDeleteTagConflict) Code() int {
	return 409
}

func (o *RepoDeleteTagConflict) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagConflict", 409)
}

func (o *RepoDeleteTagConflict) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagConflict", 409)
}

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

	return nil
}

// NewRepoDeleteTagUnprocessableEntity creates a RepoDeleteTagUnprocessableEntity with default headers values
func NewRepoDeleteTagUnprocessableEntity() *RepoDeleteTagUnprocessableEntity {
	return &RepoDeleteTagUnprocessableEntity{}
}

/*
RepoDeleteTagUnprocessableEntity describes a response with status code 422, with default header values.

APIValidationError is error format response related to input validation
*/
type RepoDeleteTagUnprocessableEntity struct {
	Message string
	URL     string
}

// IsSuccess returns true when this repo delete tag unprocessable entity response has a 2xx status code
func (o *RepoDeleteTagUnprocessableEntity) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this repo delete tag unprocessable entity response has a 3xx status code
func (o *RepoDeleteTagUnprocessableEntity) IsRedirect() bool {
	return false
}

// IsClientError returns true when this repo delete tag unprocessable entity response has a 4xx status code
func (o *RepoDeleteTagUnprocessableEntity) IsClientError() bool {
	return true
}

// IsServerError returns true when this repo delete tag unprocessable entity response has a 5xx status code
func (o *RepoDeleteTagUnprocessableEntity) IsServerError() bool {
	return false
}

// IsCode returns true when this repo delete tag unprocessable entity response a status code equal to that given
func (o *RepoDeleteTagUnprocessableEntity) IsCode(code int) bool {
	return code == 422
}

// Code gets the status code for the repo delete tag unprocessable entity response
func (o *RepoDeleteTagUnprocessableEntity) Code() int {
	return 422
}

func (o *RepoDeleteTagUnprocessableEntity) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagUnprocessableEntity", 422)
}

func (o *RepoDeleteTagUnprocessableEntity) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagUnprocessableEntity", 422)
}

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

// NewRepoDeleteTagLocked creates a RepoDeleteTagLocked with default headers values
func NewRepoDeleteTagLocked() *RepoDeleteTagLocked {
	return &RepoDeleteTagLocked{}
}

/*
RepoDeleteTagLocked describes a response with status code 423, with default header values.

APIRepoArchivedError is an error that is raised when an archived repo should be modified
*/
type RepoDeleteTagLocked struct {
	Message string
	URL     string
}

// IsSuccess returns true when this repo delete tag locked response has a 2xx status code
func (o *RepoDeleteTagLocked) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this repo delete tag locked response has a 3xx status code
func (o *RepoDeleteTagLocked) IsRedirect() bool {
	return false
}

// IsClientError returns true when this repo delete tag locked response has a 4xx status code
func (o *RepoDeleteTagLocked) IsClientError() bool {
	return true
}

// IsServerError returns true when this repo delete tag locked response has a 5xx status code
func (o *RepoDeleteTagLocked) IsServerError() bool {
	return false
}

// IsCode returns true when this repo delete tag locked response a status code equal to that given
func (o *RepoDeleteTagLocked) IsCode(code int) bool {
	return code == 423
}

// Code gets the status code for the repo delete tag locked response
func (o *RepoDeleteTagLocked) Code() int {
	return 423
}

func (o *RepoDeleteTagLocked) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagLocked", 423)
}

func (o *RepoDeleteTagLocked) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/tags/{tag}][%d] repoDeleteTagLocked", 423)
}

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