package main

// Common common response fields
type Common struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

// DeviceRegisterData device register response data field
type DeviceRegisterData struct {
	DeviceId         int64  `json:"device_id"`
	DeviceSecret     string `json:"device_secret"`
	DeviceKey        string `json:"device_key"`
	DeviceIdentifier string `json:"device_identifier"`
}

// DeviceRegisterResponse device register response
type DeviceRegisterResponse struct {
	Common
	Data DeviceRegisterData `json:"data"`
}

// DeviceAuthData device auth response data field
type DeviceAuthData struct {
	AccessToken string `json:"access_token"`
	AccessAddr  string `json:"access_addr"`
}

// DeviceAuthResponse device auth response
type DeviceAuthResponse struct {
	Common
	Data DeviceAuthData `json:"data"`
}
