func (m *Pagination) UnmarshalBinary(b []byte) error {
	var res Pagination
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
UnmarshalBinary interface implementation
package models
import (
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
type Pagination struct {
	Count *float64 `json:"count"`
	Cursors *PaginationCursors `json:"cursors"`
}
func (m *Pagination) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateCount(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateCursors(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *Pagination) validateCount(formats strfmt.Registry) error {
	if err := validate.Required("count", "body", m.Count); err != nil {
		return err
	}
	return nil
}
func (m *Pagination) validateCursors(formats strfmt.Registry) error {
	if err := validate.Required("cursors", "body", m.Cursors); err != nil {
		return err
	}
	if m.Cursors != nil {
		if err := m.Cursors.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("cursors")
			}
			return err
		}
	}
	return nil
}
func (m *Pagination) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}