func (m *RestFrontSessionResponse) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
MarshalBinary interface implementation
package models
import (
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
)
type RestFrontSessionResponse struct {
	Error string `json:"Error,omitempty"`
	ExpireTime int32 `json:"ExpireTime,omitempty"`
	JWT string `json:"JWT,omitempty"`
	RedirectTo string `json:"RedirectTo,omitempty"`
	Token *AuthToken `json:"Token,omitempty"`
	Trigger string `json:"Trigger,omitempty"`
	TriggerInfo map[string]string `json:"TriggerInfo,omitempty"`
}
func (m *RestFrontSessionResponse) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateToken(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *RestFrontSessionResponse) validateToken(formats strfmt.Registry) error {
	if swag.IsZero(m.Token) {  
		return nil
	}
	if m.Token != nil {
		if err := m.Token.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("Token")
			}
			return err
		}
	}
	return nil
}