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

package audit_information

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

	"github.com/RafayLabs/rcloud-base/api/def/clients/sentry/models"
)

// AuditInformationLookupClusterReader is a Reader for the AuditInformationLookupCluster structure.
type AuditInformationLookupClusterReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *AuditInformationLookupClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewAuditInformationLookupClusterOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewAuditInformationLookupClusterForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewAuditInformationLookupClusterNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		result := NewAuditInformationLookupClusterDefault(response.Code())
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		if response.Code()/100 == 2 {
			return result, nil
		}
		return nil, result
	}
}

// NewAuditInformationLookupClusterOK creates a AuditInformationLookupClusterOK with default headers values
func NewAuditInformationLookupClusterOK() *AuditInformationLookupClusterOK {
	return &AuditInformationLookupClusterOK{}
}

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

A successful response.
*/
type AuditInformationLookupClusterOK struct {
	Payload *models.RPCLookupClusterResponse
}

func (o *AuditInformationLookupClusterOK) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/auditInfo/cluster][%d] auditInformationLookupClusterOK  %+v", 200, o.Payload)
}
func (o *AuditInformationLookupClusterOK) GetPayload() *models.RPCLookupClusterResponse {
	return o.Payload
}

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

	o.Payload = new(models.RPCLookupClusterResponse)

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

	return nil
}

// NewAuditInformationLookupClusterForbidden creates a AuditInformationLookupClusterForbidden with default headers values
func NewAuditInformationLookupClusterForbidden() *AuditInformationLookupClusterForbidden {
	return &AuditInformationLookupClusterForbidden{}
}

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

Returned when the user does not have permission to access the resource.
*/
type AuditInformationLookupClusterForbidden struct {
	Payload interface{}
}

func (o *AuditInformationLookupClusterForbidden) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/auditInfo/cluster][%d] auditInformationLookupClusterForbidden  %+v", 403, o.Payload)
}
func (o *AuditInformationLookupClusterForbidden) GetPayload() interface{} {
	return o.Payload
}

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

// NewAuditInformationLookupClusterNotFound creates a AuditInformationLookupClusterNotFound with default headers values
func NewAuditInformationLookupClusterNotFound() *AuditInformationLookupClusterNotFound {
	return &AuditInformationLookupClusterNotFound{}
}

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

Returned when the resource does not exist.
*/
type AuditInformationLookupClusterNotFound struct {
	Payload string
}

func (o *AuditInformationLookupClusterNotFound) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/auditInfo/cluster][%d] auditInformationLookupClusterNotFound  %+v", 404, o.Payload)
}
func (o *AuditInformationLookupClusterNotFound) GetPayload() string {
	return o.Payload
}

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

// NewAuditInformationLookupClusterDefault creates a AuditInformationLookupClusterDefault with default headers values
func NewAuditInformationLookupClusterDefault(code int) *AuditInformationLookupClusterDefault {
	return &AuditInformationLookupClusterDefault{
		_statusCode: code,
	}
}

/* AuditInformationLookupClusterDefault describes a response with status code -1, with default header values.

An unexpected error response.
*/
type AuditInformationLookupClusterDefault struct {
	_statusCode int

	Payload *models.GooglerpcStatus
}

// Code gets the status code for the audit information lookup cluster default response
func (o *AuditInformationLookupClusterDefault) Code() int {
	return o._statusCode
}

func (o *AuditInformationLookupClusterDefault) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/auditInfo/cluster][%d] AuditInformation_LookupCluster default  %+v", o._statusCode, o.Payload)
}
func (o *AuditInformationLookupClusterDefault) GetPayload() *models.GooglerpcStatus {
	return o.Payload
}

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

	o.Payload = new(models.GooglerpcStatus)

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

	return nil
}
