func (m *RestListSharedResourcesResponse) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
MarshalBinary interface implementation
package models
import (
	"strconv"
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
)
type RestListSharedResourcesResponse struct {
	Limit int32 `json:"Limit,omitempty"`
	Offset int32 `json:"Offset,omitempty"`
	Resources []*ListSharedResourcesResponseSharedResource `json:"Resources"`
	Total int32 `json:"Total,omitempty"`
}
func (m *RestListSharedResourcesResponse) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateResources(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *RestListSharedResourcesResponse) validateResources(formats strfmt.Registry) error {
	if swag.IsZero(m.Resources) {  
		return nil
	}
	for i := 0; i < len(m.Resources); i++ {
		if swag.IsZero(m.Resources[i]) {  
			continue
		}
		if m.Resources[i] != nil {
			if err := m.Resources[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("Resources" + "." + strconv.Itoa(i))
				}
				return err
			}
		}
	}
	return nil
}