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

package silence

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"fmt"
	"io"

	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)

// DeleteSilenceReader is a Reader for the DeleteSilence structure.
type DeleteSilenceReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteSilenceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
	switch response.Code() {
	case 200:
		result := NewDeleteSilenceOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 500:
		result := NewDeleteSilenceInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
	}
}

// NewDeleteSilenceOK creates a DeleteSilenceOK with default headers values
func NewDeleteSilenceOK() *DeleteSilenceOK {
	return &DeleteSilenceOK{}
}

/*
	DeleteSilenceOK describes a response with status code 200, with default header values.

Delete silence response
*/
type DeleteSilenceOK struct {
}

func (o *DeleteSilenceOK) Error() string {
	return fmt.Sprintf("[DELETE /silence/{silenceID}][%d] deleteSilenceOK ", 200)
}

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

	return nil
}

// NewDeleteSilenceInternalServerError creates a DeleteSilenceInternalServerError with default headers values
func NewDeleteSilenceInternalServerError() *DeleteSilenceInternalServerError {
	return &DeleteSilenceInternalServerError{}
}

/*
	DeleteSilenceInternalServerError describes a response with status code 500, with default header values.

Internal server error
*/
type DeleteSilenceInternalServerError struct {
	Payload string
}

func (o *DeleteSilenceInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /silence/{silenceID}][%d] deleteSilenceInternalServerError  %+v", 500, o.Payload)
}
func (o *DeleteSilenceInternalServerError) GetPayload() string {
	return o.Payload
}

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

	// response payload
	if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}
