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

package a_bit_of_everything

import (
	"encoding/json"
	stderrors "errors"
	"fmt"
	"io"

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

	"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/abe/models"
)

// ABitOfEverythingServiceGetRepeatedQueryReader is a Reader for the ABitOfEverythingServiceGetRepeatedQuery structure.
type ABitOfEverythingServiceGetRepeatedQueryReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *ABitOfEverythingServiceGetRepeatedQueryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
	switch response.Code() {
	case 200:
		result := NewABitOfEverythingServiceGetRepeatedQueryOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewABitOfEverythingServiceGetRepeatedQueryForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewABitOfEverythingServiceGetRepeatedQueryNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 418:
		result := NewABitOfEverythingServiceGetRepeatedQueryIMATeapot()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewABitOfEverythingServiceGetRepeatedQueryInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		result := NewABitOfEverythingServiceGetRepeatedQueryDefault(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
	}
}

// NewABitOfEverythingServiceGetRepeatedQueryOK creates a ABitOfEverythingServiceGetRepeatedQueryOK with default headers values
func NewABitOfEverythingServiceGetRepeatedQueryOK() *ABitOfEverythingServiceGetRepeatedQueryOK {
	return &ABitOfEverythingServiceGetRepeatedQueryOK{}
}

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

A successful response.
*/
type ABitOfEverythingServiceGetRepeatedQueryOK struct {
	Payload *models.ExamplepbABitOfEverythingRepeated
}

// IsSuccess returns true when this a bit of everything service get repeated query o k response has a 2xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this a bit of everything service get repeated query o k response has a 3xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this a bit of everything service get repeated query o k response has a 4xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this a bit of everything service get repeated query o k response has a 5xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryOK) IsServerError() bool {
	return false
}

// IsCode returns true when this a bit of everything service get repeated query o k response a status code equal to that given
func (o *ABitOfEverythingServiceGetRepeatedQueryOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the a bit of everything service get repeated query o k response
func (o *ABitOfEverythingServiceGetRepeatedQueryOK) Code() int {
	return 200
}

func (o *ABitOfEverythingServiceGetRepeatedQueryOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryOK %s", 200, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryOK %s", 200, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryOK) GetPayload() *models.ExamplepbABitOfEverythingRepeated {
	return o.Payload
}

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

	o.Payload = new(models.ExamplepbABitOfEverythingRepeated)

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

	return nil
}

// NewABitOfEverythingServiceGetRepeatedQueryForbidden creates a ABitOfEverythingServiceGetRepeatedQueryForbidden with default headers values
func NewABitOfEverythingServiceGetRepeatedQueryForbidden() *ABitOfEverythingServiceGetRepeatedQueryForbidden {
	return &ABitOfEverythingServiceGetRepeatedQueryForbidden{}
}

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

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

// IsSuccess returns true when this a bit of everything service get repeated query forbidden response has a 2xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this a bit of everything service get repeated query forbidden response has a 3xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this a bit of everything service get repeated query forbidden response has a 4xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this a bit of everything service get repeated query forbidden response has a 5xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this a bit of everything service get repeated query forbidden response a status code equal to that given
func (o *ABitOfEverythingServiceGetRepeatedQueryForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the a bit of everything service get repeated query forbidden response
func (o *ABitOfEverythingServiceGetRepeatedQueryForbidden) Code() int {
	return 403
}

func (o *ABitOfEverythingServiceGetRepeatedQueryForbidden) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryForbidden %s", 403, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryForbidden) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryForbidden %s", 403, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryForbidden) GetPayload() any {
	return o.Payload
}

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

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

	return nil
}

// NewABitOfEverythingServiceGetRepeatedQueryNotFound creates a ABitOfEverythingServiceGetRepeatedQueryNotFound with default headers values
func NewABitOfEverythingServiceGetRepeatedQueryNotFound() *ABitOfEverythingServiceGetRepeatedQueryNotFound {
	return &ABitOfEverythingServiceGetRepeatedQueryNotFound{}
}

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

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

// IsSuccess returns true when this a bit of everything service get repeated query not found response has a 2xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this a bit of everything service get repeated query not found response has a 3xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this a bit of everything service get repeated query not found response has a 4xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this a bit of everything service get repeated query not found response has a 5xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this a bit of everything service get repeated query not found response a status code equal to that given
func (o *ABitOfEverythingServiceGetRepeatedQueryNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the a bit of everything service get repeated query not found response
func (o *ABitOfEverythingServiceGetRepeatedQueryNotFound) Code() int {
	return 404
}

func (o *ABitOfEverythingServiceGetRepeatedQueryNotFound) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryNotFound %s", 404, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryNotFound) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryNotFound %s", 404, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryNotFound) GetPayload() string {
	return o.Payload
}

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

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

	return nil
}

// NewABitOfEverythingServiceGetRepeatedQueryIMATeapot creates a ABitOfEverythingServiceGetRepeatedQueryIMATeapot with default headers values
func NewABitOfEverythingServiceGetRepeatedQueryIMATeapot() *ABitOfEverythingServiceGetRepeatedQueryIMATeapot {
	return &ABitOfEverythingServiceGetRepeatedQueryIMATeapot{}
}

/*
ABitOfEverythingServiceGetRepeatedQueryIMATeapot describes a response with status code 418, with default header values.

I'm a teapot.
*/
type ABitOfEverythingServiceGetRepeatedQueryIMATeapot struct {
	Payload models.ExamplepbNumericEnum
}

// IsSuccess returns true when this a bit of everything service get repeated query i m a teapot response has a 2xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryIMATeapot) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this a bit of everything service get repeated query i m a teapot response has a 3xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryIMATeapot) IsRedirect() bool {
	return false
}

// IsClientError returns true when this a bit of everything service get repeated query i m a teapot response has a 4xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryIMATeapot) IsClientError() bool {
	return true
}

// IsServerError returns true when this a bit of everything service get repeated query i m a teapot response has a 5xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryIMATeapot) IsServerError() bool {
	return false
}

// IsCode returns true when this a bit of everything service get repeated query i m a teapot response a status code equal to that given
func (o *ABitOfEverythingServiceGetRepeatedQueryIMATeapot) IsCode(code int) bool {
	return code == 418
}

// Code gets the status code for the a bit of everything service get repeated query i m a teapot response
func (o *ABitOfEverythingServiceGetRepeatedQueryIMATeapot) Code() int {
	return 418
}

func (o *ABitOfEverythingServiceGetRepeatedQueryIMATeapot) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryIMATeapot %s", 418, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryIMATeapot) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryIMATeapot %s", 418, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryIMATeapot) GetPayload() models.ExamplepbNumericEnum {
	return o.Payload
}

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

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

	return nil
}

// NewABitOfEverythingServiceGetRepeatedQueryInternalServerError creates a ABitOfEverythingServiceGetRepeatedQueryInternalServerError with default headers values
func NewABitOfEverythingServiceGetRepeatedQueryInternalServerError() *ABitOfEverythingServiceGetRepeatedQueryInternalServerError {
	return &ABitOfEverythingServiceGetRepeatedQueryInternalServerError{}
}

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

Server error
*/
type ABitOfEverythingServiceGetRepeatedQueryInternalServerError struct {
	Payload *models.ExamplepbErrorResponse
}

// IsSuccess returns true when this a bit of everything service get repeated query internal server error response has a 2xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this a bit of everything service get repeated query internal server error response has a 3xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this a bit of everything service get repeated query internal server error response has a 4xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this a bit of everything service get repeated query internal server error response has a 5xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this a bit of everything service get repeated query internal server error response a status code equal to that given
func (o *ABitOfEverythingServiceGetRepeatedQueryInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the a bit of everything service get repeated query internal server error response
func (o *ABitOfEverythingServiceGetRepeatedQueryInternalServerError) Code() int {
	return 500
}

func (o *ABitOfEverythingServiceGetRepeatedQueryInternalServerError) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryInternalServerError %s", 500, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryInternalServerError) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] aBitOfEverythingServiceGetRepeatedQueryInternalServerError %s", 500, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryInternalServerError) GetPayload() *models.ExamplepbErrorResponse {
	return o.Payload
}

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

	o.Payload = new(models.ExamplepbErrorResponse)

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

	return nil
}

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

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

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

	Payload *models.GoogleRPCStatus
}

// IsSuccess returns true when this a bit of everything service get repeated query default response has a 2xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) IsSuccess() bool {
	return o._statusCode/100 == 2
}

// IsRedirect returns true when this a bit of everything service get repeated query default response has a 3xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) IsRedirect() bool {
	return o._statusCode/100 == 3
}

// IsClientError returns true when this a bit of everything service get repeated query default response has a 4xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) IsClientError() bool {
	return o._statusCode/100 == 4
}

// IsServerError returns true when this a bit of everything service get repeated query default response has a 5xx status code
func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) IsServerError() bool {
	return o._statusCode/100 == 5
}

// IsCode returns true when this a bit of everything service get repeated query default response a status code equal to that given
func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) IsCode(code int) bool {
	return o._statusCode == code
}

// Code gets the status code for the a bit of everything service get repeated query default response
func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) Code() int {
	return o._statusCode
}

func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] ABitOfEverythingService_GetRepeatedQuery default %s", o._statusCode, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}][%d] ABitOfEverythingService_GetRepeatedQuery default %s", o._statusCode, payload)
}

func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) GetPayload() *models.GoogleRPCStatus {
	return o.Payload
}

func (o *ABitOfEverythingServiceGetRepeatedQueryDefault) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}
