func (m *MultiSignReq) UnmarshalBinary(b []byte) error {
	var res MultiSignReq
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
UnmarshalBinary interface implementation
package models
import (
	"strconv"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)
type MultiSignReq struct {
	ChainID string `json:"chain_id,omitempty"`
	Pubkey *MultiSignPubKey `json:"pubkey,omitempty"`
	SignatureOnly bool `json:"signature_only,omitempty"`
	Signatures []*StdSignature `json:"signatures"`
	Tx *UnsignedStdTx `json:"tx,omitempty"`
}
func (m *MultiSignReq) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validatePubkey(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateSignatures(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateTx(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *MultiSignReq) validatePubkey(formats strfmt.Registry) error {
	if swag.IsZero(m.Pubkey) {  
		return nil
	}
	if m.Pubkey != nil {
		if err := m.Pubkey.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("pubkey")
			}
			return err
		}
	}
	return nil
}
func (m *MultiSignReq) validateSignatures(formats strfmt.Registry) error {
	if swag.IsZero(m.Signatures) {  
		return nil
	}
	for i := 0; i < len(m.Signatures); i++ {
		if swag.IsZero(m.Signatures[i]) {  
			continue
		}
		if m.Signatures[i] != nil {
			if err := m.Signatures[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("signatures" + "." + strconv.Itoa(i))
				}
				return err
			}
		}
	}
	return nil
}
func (m *MultiSignReq) validateTx(formats strfmt.Registry) error {
	if swag.IsZero(m.Tx) {  
		return nil
	}
	if m.Tx != nil {
		if err := m.Tx.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("tx")
			}
			return err
		}
	}
	return nil
}
func (m *MultiSignReq) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}