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

package operations

// 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/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/firecracker/client/models"
)

// DescribeBalloonStatsReader is a Reader for the DescribeBalloonStats structure.
type DescribeBalloonStatsReader struct {
	formats strfmt.Registry
}

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

// NewDescribeBalloonStatsOK creates a DescribeBalloonStatsOK with default headers values
func NewDescribeBalloonStatsOK() *DescribeBalloonStatsOK {
	return &DescribeBalloonStatsOK{}
}

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

The balloon device statistics
*/
type DescribeBalloonStatsOK struct {
	Payload *models.BalloonStats
}

func (o *DescribeBalloonStatsOK) Error() string {
	return fmt.Sprintf("[GET /balloon/statistics][%d] describeBalloonStatsOK  %+v", 200, o.Payload)
}
func (o *DescribeBalloonStatsOK) GetPayload() *models.BalloonStats {
	return o.Payload
}

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

	o.Payload = new(models.BalloonStats)

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

	return nil
}

// NewDescribeBalloonStatsBadRequest creates a DescribeBalloonStatsBadRequest with default headers values
func NewDescribeBalloonStatsBadRequest() *DescribeBalloonStatsBadRequest {
	return &DescribeBalloonStatsBadRequest{}
}

/* DescribeBalloonStatsBadRequest describes a response with status code 400, with default header values.

The balloon device statistics were not enabled when the device was configured.
*/
type DescribeBalloonStatsBadRequest struct {
	Payload *models.Error
}

func (o *DescribeBalloonStatsBadRequest) Error() string {
	return fmt.Sprintf("[GET /balloon/statistics][%d] describeBalloonStatsBadRequest  %+v", 400, o.Payload)
}
func (o *DescribeBalloonStatsBadRequest) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

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

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

Internal Server Error
*/
type DescribeBalloonStatsDefault struct {
	_statusCode int

	Payload *models.Error
}

// Code gets the status code for the describe balloon stats default response
func (o *DescribeBalloonStatsDefault) Code() int {
	return o._statusCode
}

func (o *DescribeBalloonStatsDefault) Error() string {
	return fmt.Sprintf("[GET /balloon/statistics][%d] describeBalloonStats default  %+v", o._statusCode, o.Payload)
}
func (o *DescribeBalloonStatsDefault) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}
