// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"

	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)

// UserToken UserToken represents a user token
//
// swagger:model UserToken
type UserToken struct {

	// auth token
	AuthToken string `json:"AuthToken,omitempty"`

	// auth token seen
	AuthTokenSeen bool `json:"AuthTokenSeen,omitempty"`

	// client Ip
	ClientIP string `json:"ClientIp,omitempty"`

	// created at
	CreatedAt int64 `json:"CreatedAt,omitempty"`

	// external session Id
	ExternalSessionID int64 `json:"ExternalSessionId,omitempty"`

	// Id
	ID int64 `json:"Id,omitempty"`

	// prev auth token
	PrevAuthToken string `json:"PrevAuthToken,omitempty"`

	// revoked at
	RevokedAt int64 `json:"RevokedAt,omitempty"`

	// rotated at
	RotatedAt int64 `json:"RotatedAt,omitempty"`

	// seen at
	SeenAt int64 `json:"SeenAt,omitempty"`

	// unhashed token
	UnhashedToken string `json:"UnhashedToken,omitempty"`

	// updated at
	UpdatedAt int64 `json:"UpdatedAt,omitempty"`

	// user agent
	UserAgent string `json:"UserAgent,omitempty"`

	// user Id
	UserID int64 `json:"UserId,omitempty"`
}

// Validate validates this user token
func (m *UserToken) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this user token based on context it is used
func (m *UserToken) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *UserToken) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *UserToken) UnmarshalBinary(b []byte) error {
	var res UserToken
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
