func (m *Notifications) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
MarshalBinary interface implementation
package models
import (
	"strconv"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)
type Notifications struct {
	Count int64 `json:"count,omitempty"`
	IsTruncated bool `json:"is_truncated,omitempty"`
	Items []*Notification `json:"items"`
	NextOffset int64 `json:"next_offset,omitempty"`
}
func (m *Notifications) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateItems(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *Notifications) validateItems(formats strfmt.Registry) error {
	if swag.IsZero(m.Items) {  
		return nil
	}
	for i := 0; i < len(m.Items); i++ {
		if swag.IsZero(m.Items[i]) {  
			continue
		}
		if m.Items[i] != nil {
			if err := m.Items[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("items" + "." + strconv.Itoa(i))
				}
				return err
			}
		}
	}
	return nil
}