func (m *RestSearchACLRequest) 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 RestSearchACLRequest struct {
	CountOnly bool `json:"CountOnly,omitempty"`
	GroupBy int32 `json:"GroupBy,omitempty"`
	Limit string `json:"Limit,omitempty"`
	Offset string `json:"Offset,omitempty"`
	Operation ServiceOperationType `json:"Operation,omitempty"`
	Queries []*IdmACLSingleQuery `json:"Queries"`
}
func (m *RestSearchACLRequest) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateOperation(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateQueries(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *RestSearchACLRequest) validateOperation(formats strfmt.Registry) error {
	if swag.IsZero(m.Operation) {  
		return nil
	}
	if err := m.Operation.Validate(formats); err != nil {
		if ve, ok := err.(*errors.Validation); ok {
			return ve.ValidateName("Operation")
		}
		return err
	}
	return nil
}
func (m *RestSearchACLRequest) validateQueries(formats strfmt.Registry) error {
	if swag.IsZero(m.Queries) {  
		return nil
	}
	for i := 0; i < len(m.Queries); i++ {
		if swag.IsZero(m.Queries[i]) {  
			continue
		}
		if m.Queries[i] != nil {
			if err := m.Queries[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("Queries" + "." + strconv.Itoa(i))
				}
				return err
			}
		}
	}
	return nil
}