func (o *GetTreasuryRewardWeightOKBody) UnmarshalBinary(b []byte) error {
	var res GetTreasuryRewardWeightOKBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}
UnmarshalBinary interface implementation
package treasury
import (
	"fmt"
	"io"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)
type GetTreasuryRewardWeightReader struct {
	formats strfmt.Registry
}
func (o *GetTreasuryRewardWeightReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetTreasuryRewardWeightOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 500:
		result := NewGetTreasuryRewardWeightInternalServerError()
		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 NewGetTreasuryRewardWeightOK() *GetTreasuryRewardWeightOK {
	return &GetTreasuryRewardWeightOK{}
}
type GetTreasuryRewardWeightOK struct {
	Payload *GetTreasuryRewardWeightOKBody
}
func (o *GetTreasuryRewardWeightOK) Error() string {
	return fmt.Sprintf("[GET /treasury/reward_weight][%d] getTreasuryRewardWeightOK  %+v", 200, o.Payload)
}
func (o *GetTreasuryRewardWeightOK) GetPayload() *GetTreasuryRewardWeightOKBody {
	return o.Payload
}
func (o *GetTreasuryRewardWeightOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(GetTreasuryRewardWeightOKBody)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetTreasuryRewardWeightInternalServerError() *GetTreasuryRewardWeightInternalServerError {
	return &GetTreasuryRewardWeightInternalServerError{}
}
type GetTreasuryRewardWeightInternalServerError struct {
}
func (o *GetTreasuryRewardWeightInternalServerError) Error() string {
	return fmt.Sprintf("[GET /treasury/reward_weight][%d] getTreasuryRewardWeightInternalServerError ", 500)
}
func (o *GetTreasuryRewardWeightInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	return nil
}
type GetTreasuryRewardWeightOKBody struct {
	Height string `json:"height,omitempty"`
	Result string `json:"result,omitempty"`
}
func (o *GetTreasuryRewardWeightOKBody) Validate(formats strfmt.Registry) error {
	return nil
}
func (o *GetTreasuryRewardWeightOKBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}