func (o *GetMarketParametersOKBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}
MarshalBinary interface implementation
package market
import (
	"fmt"
	"io"
	"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 GetMarketParametersReader struct {
	formats strfmt.Registry
}
func (o *GetMarketParametersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetMarketParametersOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetMarketParametersBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetMarketParametersInternalServerError()
		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 NewGetMarketParametersOK() *GetMarketParametersOK {
	return &GetMarketParametersOK{}
}
type GetMarketParametersOK struct {
	Payload *GetMarketParametersOKBody
}
func (o *GetMarketParametersOK) Error() string {
	return fmt.Sprintf("[GET /market/parameters][%d] getMarketParametersOK  %+v", 200, o.Payload)
}
func (o *GetMarketParametersOK) GetPayload() *GetMarketParametersOKBody {
	return o.Payload
}
func (o *GetMarketParametersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(GetMarketParametersOKBody)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetMarketParametersBadRequest() *GetMarketParametersBadRequest {
	return &GetMarketParametersBadRequest{}
}
type GetMarketParametersBadRequest struct {
}
func (o *GetMarketParametersBadRequest) Error() string {
	return fmt.Sprintf("[GET /market/parameters][%d] getMarketParametersBadRequest ", 400)
}
func (o *GetMarketParametersBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	return nil
}
func NewGetMarketParametersInternalServerError() *GetMarketParametersInternalServerError {
	return &GetMarketParametersInternalServerError{}
}
type GetMarketParametersInternalServerError struct {
}
func (o *GetMarketParametersInternalServerError) Error() string {
	return fmt.Sprintf("[GET /market/parameters][%d] getMarketParametersInternalServerError ", 500)
}
func (o *GetMarketParametersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	return nil
}
type GetMarketParametersOKBody struct {
	Height string `json:"height,omitempty"`
	Result *models.MarketParams `json:"result,omitempty"`
}
func (o *GetMarketParametersOKBody) 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 *GetMarketParametersOKBody) validateResult(formats strfmt.Registry) error {
	if swag.IsZero(o.Result) {  
		return nil
	}
	if o.Result != nil {
		if err := o.Result.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getMarketParametersOK" + "." + "result")
			}
			return err
		}
	}
	return nil
}