func (o *GetOracleVotersValidatorPrevotesOKBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}
MarshalBinary interface implementation
package oracle
import (
	"fmt"
	"io"
	"strconv"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/terra-project/mantle-sdk/lcd/models"
)
type GetOracleVotersValidatorPrevotesReader struct {
	formats strfmt.Registry
}
func (o *GetOracleVotersValidatorPrevotesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetOracleVotersValidatorPrevotesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetOracleVotersValidatorPrevotesBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetOracleVotersValidatorPrevotesInternalServerError()
		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())
	}
}
func NewGetOracleVotersValidatorPrevotesOK() *GetOracleVotersValidatorPrevotesOK {
	return &GetOracleVotersValidatorPrevotesOK{}
}
type GetOracleVotersValidatorPrevotesOK struct {
	Payload *GetOracleVotersValidatorPrevotesOKBody
}
func (o *GetOracleVotersValidatorPrevotesOK) Error() string {
	return fmt.Sprintf("[GET /oracle/voters/{validator}/prevotes][%d] getOracleVotersValidatorPrevotesOK  %+v", 200, o.Payload)
}
func (o *GetOracleVotersValidatorPrevotesOK) GetPayload() *GetOracleVotersValidatorPrevotesOKBody {
	return o.Payload
}
func (o *GetOracleVotersValidatorPrevotesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(GetOracleVotersValidatorPrevotesOKBody)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetOracleVotersValidatorPrevotesBadRequest() *GetOracleVotersValidatorPrevotesBadRequest {
	return &GetOracleVotersValidatorPrevotesBadRequest{}
}
type GetOracleVotersValidatorPrevotesBadRequest struct {
}
func (o *GetOracleVotersValidatorPrevotesBadRequest) Error() string {
	return fmt.Sprintf("[GET /oracle/voters/{validator}/prevotes][%d] getOracleVotersValidatorPrevotesBadRequest ", 400)
}
func (o *GetOracleVotersValidatorPrevotesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	return nil
}
func NewGetOracleVotersValidatorPrevotesInternalServerError() *GetOracleVotersValidatorPrevotesInternalServerError {
	return &GetOracleVotersValidatorPrevotesInternalServerError{}
}
type GetOracleVotersValidatorPrevotesInternalServerError struct {
}
func (o *GetOracleVotersValidatorPrevotesInternalServerError) Error() string {
	return fmt.Sprintf("[GET /oracle/voters/{validator}/prevotes][%d] getOracleVotersValidatorPrevotesInternalServerError ", 500)
}
func (o *GetOracleVotersValidatorPrevotesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	return nil
}
type GetOracleVotersValidatorPrevotesOKBody struct {
	Height string `json:"height,omitempty"`
	Result []*models.ExchangeRatePrevote `json:"result"`
}
func (o *GetOracleVotersValidatorPrevotesOKBody) Validate(formats strfmt.Registry) error {
	var res []error
	if err := o.validateResult(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (o *GetOracleVotersValidatorPrevotesOKBody) validateResult(formats strfmt.Registry) error {
	if swag.IsZero(o.Result) {  
		return nil
	}
	for i := 0; i < len(o.Result); i++ {
		if swag.IsZero(o.Result[i]) {  
			continue
		}
		if o.Result[i] != nil {
			if err := o.Result[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("getOracleVotersValidatorPrevotesOK" + "." + "result" + "." + strconv.Itoa(i))
				}
				return err
			}
		}
	}
	return nil
}