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

// AuditInformationLookupUserReader is a Reader for the AuditInformationLookupUser structure.
type AuditInformationLookupUserReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *AuditInformationLookupUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewAuditInformationLookupUserOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewAuditInformationLookupUserForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewAuditInformationLookupUserNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		result := NewAuditInformationLookupUserDefault(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
	}
}

// NewAuditInformationLookupUserOK creates a AuditInformationLookupUserOK with default headers values
func NewAuditInformationLookupUserOK() *AuditInformationLookupUserOK {
	return &AuditInformationLookupUserOK{}
}

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

A successful response.
*/
type AuditInformationLookupUserOK struct {
	Payload *models.RPCLookupUserResponse
}

func (o *AuditInformationLookupUserOK) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/auditInfo/user][%d] auditInformationLookupUserOK  %+v", 200, o.Payload)
}
func (o *AuditInformationLookupUserOK) GetPayload() *models.RPCLookupUserResponse {
	return o.Payload
}

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

	o.Payload = new(models.RPCLookupUserResponse)

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

	return nil
}

// NewAuditInformationLookupUserForbidden creates a AuditInformationLookupUserForbidden with default headers values
func NewAuditInformationLookupUserForbidden() *AuditInformationLookupUserForbidden {
	return &AuditInformationLookupUserForbidden{}
}

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

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

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

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

// NewAuditInformationLookupUserNotFound creates a AuditInformationLookupUserNotFound with default headers values
func NewAuditInformationLookupUserNotFound() *AuditInformationLookupUserNotFound {
	return &AuditInformationLookupUserNotFound{}
}

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

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

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

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

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

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

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

	Payload *models.GooglerpcStatus
}

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

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

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