func (m *DelegationDelegatorReward) UnmarshalBinary(b []byte) error {
	var res DelegationDelegatorReward
	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 DelegationDelegatorReward struct {
	Reward []*Coin `json:"reward"`
	ValidatorAddress ValidatorAddress `json:"validator_address,omitempty"`
}
func (m *DelegationDelegatorReward) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateReward(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateValidatorAddress(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *DelegationDelegatorReward) validateReward(formats strfmt.Registry) error {
	if swag.IsZero(m.Reward) {  
		return nil
	}
	for i := 0; i < len(m.Reward); i++ {
		if swag.IsZero(m.Reward[i]) {  
			continue
		}
		if m.Reward[i] != nil {
			if err := m.Reward[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("reward" + "." + strconv.Itoa(i))
				}
				return err
			}
		}
	}
	return nil
}
func (m *DelegationDelegatorReward) validateValidatorAddress(formats strfmt.Registry) error {
	if swag.IsZero(m.ValidatorAddress) {  
		return nil
	}
	if err := m.ValidatorAddress.Validate(formats); err != nil {
		if ve, ok := err.(*errors.Validation); ok {
			return ve.ValidateName("validator_address")
		}
		return err
	}
	return nil
}
func (m *DelegationDelegatorReward) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}