func (o *GetGovProposalsOKBody) UnmarshalBinary(b []byte) error {
	var res GetGovProposalsOKBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}
UnmarshalBinary interface implementation
package governance
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 GetGovProposalsReader struct {
	formats strfmt.Registry
}
func (o *GetGovProposalsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetGovProposalsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetGovProposalsBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetGovProposalsInternalServerError()
		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 NewGetGovProposalsOK() *GetGovProposalsOK {
	return &GetGovProposalsOK{}
}
type GetGovProposalsOK struct {
	Payload *GetGovProposalsOKBody
}
func (o *GetGovProposalsOK) Error() string {
	return fmt.Sprintf("[GET /gov/proposals][%d] getGovProposalsOK  %+v", 200, o.Payload)
}
func (o *GetGovProposalsOK) GetPayload() *GetGovProposalsOKBody {
	return o.Payload
}
func (o *GetGovProposalsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(GetGovProposalsOKBody)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetGovProposalsBadRequest() *GetGovProposalsBadRequest {
	return &GetGovProposalsBadRequest{}
}
type GetGovProposalsBadRequest struct {
}
func (o *GetGovProposalsBadRequest) Error() string {
	return fmt.Sprintf("[GET /gov/proposals][%d] getGovProposalsBadRequest ", 400)
}
func (o *GetGovProposalsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	return nil
}
func NewGetGovProposalsInternalServerError() *GetGovProposalsInternalServerError {
	return &GetGovProposalsInternalServerError{}
}
type GetGovProposalsInternalServerError struct {
}
func (o *GetGovProposalsInternalServerError) Error() string {
	return fmt.Sprintf("[GET /gov/proposals][%d] getGovProposalsInternalServerError ", 500)
}
func (o *GetGovProposalsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	return nil
}
type GetGovProposalsOKBody struct {
	Height string `json:"height,omitempty"`
	Result []*models.TextProposal `json:"result"`
}
func (o *GetGovProposalsOKBody) 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 *GetGovProposalsOKBody) 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("getGovProposalsOK" + "." + "result" + "." + strconv.Itoa(i))
				}
				return err
			}
		}
	}
	return nil
}
func (o *GetGovProposalsOKBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}