270 lines
8.5 KiB
Go
270 lines
8.5 KiB
Go
package arlo
|
|
|
|
/*
|
|
// Credentials is the login credential data.
|
|
type Credentials struct {
|
|
Email string `json:"email"`
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
// Duration holds two dates used when you need to specify a date range in the format "20060102".
|
|
type Duration struct {
|
|
DateFrom string `json:"dateFrom""`
|
|
DateTo string `json:"dateTo"`
|
|
}
|
|
|
|
// PasswordPair is used when updating the account password.
|
|
type PasswordPair struct {
|
|
CurrentPassword string `json:"currentPassword"`
|
|
NewPassword string `json:"newPassword"`
|
|
}
|
|
|
|
// FullName is used when updating the account username.
|
|
type FullName struct {
|
|
FirstName string `json:"firstName"`
|
|
LastName string `json:"lastName"`
|
|
}
|
|
*/
|
|
|
|
// Account is the account data.
|
|
type Account struct {
|
|
UserId string `json:"userId"`
|
|
Email string `json:"email"`
|
|
Token string `json:"token"`
|
|
PaymentId string `json:"paymentId"`
|
|
Authenticated uint32 `json:"authenticated"`
|
|
AccountStatus string `json:"accountStatus"`
|
|
SerialNumber string `json:"serialNumber"`
|
|
CountryCode string `json:"countryCode"`
|
|
TocUpdate bool `json:"tocUpdate"`
|
|
PolicyUpdate bool `json:"policyUpdate"`
|
|
ValidEmail bool `json:"validEmail"`
|
|
Arlo bool `json:"arlo"`
|
|
DateCreated int64 `json:"dateCreated"`
|
|
}
|
|
|
|
type AppStore struct {
|
|
Enforce bool `json:"enforce"`
|
|
LatestVersion string `json:"latestVersion"`
|
|
UpdateLink string `json:"updateLink"`
|
|
}
|
|
|
|
type Session struct {
|
|
AccountStatus string `json:"accountStatus"`
|
|
|
|
AppStore `json:"appStore"`
|
|
Account
|
|
}
|
|
|
|
type UserProfile struct {
|
|
Type string `json:"_type"`
|
|
AcceptedPolicy int `json:"acceptedPolicy"`
|
|
Country string `json:"country"`
|
|
CurrentPolicy int `json:"currentPolicy"`
|
|
FirstName string `json:"firstName"`
|
|
LastName string `json:"lastName"`
|
|
ValidEmail bool `json:"validEmail"`
|
|
}
|
|
|
|
// Friend is the account data for non-primary account holders designated as friends.
|
|
type Friend struct {
|
|
FirstName string `json:"firstName"`
|
|
LastName string `json:"lastName"`
|
|
LastModified int64 `json:"lastModified"`
|
|
AdminUser bool `json:"adminUser"`
|
|
Email string `json:"email"`
|
|
Id string `json:"id"`
|
|
}
|
|
|
|
// Connectivity is part of the Device data.
|
|
type Connectivity struct {
|
|
ActiveNetwork string `json:"activeNetwork,omitempty"`
|
|
APN string `json:"apn,omitempty"`
|
|
CarrierFw string `json:"carrierFw,omitempty"`
|
|
Connected bool `json:"connected,omitempty"`
|
|
FWVersion string `json:"fwVersion,omitempty"`
|
|
ICCID string `json:"iccid,omitempty"`
|
|
IMEI string `json:"imei,omitempty"`
|
|
MEPStatus string `json:"mepStatus,omitempty"`
|
|
MSISDN string `json:"msisdn,omitempty"`
|
|
NetworkMode string `json:"networkMode,omitempty"`
|
|
NetworkName string `json:"networkName,omitempty"`
|
|
RFBand int `json:"rfBand,omitempty"`
|
|
Roaming bool `json:"roaming"`
|
|
RoamingAllowed bool `json:"roamingAllowed"`
|
|
SignalStrength string `json:"signalStrength,omitempty"`
|
|
Type string `json:"type,omitempty"`
|
|
WWANIPAddr string `json:"wwanIpAddr,omitempty"`
|
|
}
|
|
|
|
type BaseStationMetadata struct {
|
|
InterfaceVersion int `json:"interfaceVersion"`
|
|
ApiVersion int `json:"apiVersion"`
|
|
State string `json:"state"`
|
|
SwVersion string `json:"swVersion"`
|
|
HwVersion string `json:"hwVersion"`
|
|
ModelId string `json:"modelId"`
|
|
Capabilities []string `json:"capabilities"`
|
|
McsEnabled bool `json:"mcsEnabled"`
|
|
AutoUpdateEnabled bool `json:"autoUpdateEnabled"`
|
|
TimeZone string `json:"timeZone"`
|
|
OlsonTimeZone string `json:"olsonTimeZone"`
|
|
UploadBandwidthSaturated bool `json:"uploadBandwidthSaturated"`
|
|
AntiFlicker map[string]int `json:"antiFlicker"`
|
|
LowBatteryAlert map[string]bool `json:"lowBatteryAlert"`
|
|
LowSignalAlert map[string]bool `json:"lowSignalAlert"`
|
|
Claimed bool `json:"claimed"`
|
|
TimeSyncState string `json:"timeSyncState"`
|
|
Connectivity Connectivity `json:"connectivity"`
|
|
}
|
|
|
|
// Owner is the owner of a Device data.
|
|
type Owner struct {
|
|
FirstName string `json:"firstName"`
|
|
LastName string `json:"lastName"`
|
|
OwnerId string `json:"ownerId"`
|
|
}
|
|
|
|
// Properties is the Device properties data.
|
|
type Properties struct {
|
|
ModelId string `json:"modelId"`
|
|
OlsonTimeZone string `json:"olsonTimeZone"`
|
|
HwVersion string `json:"hwVersion"`
|
|
}
|
|
|
|
type Favorite struct {
|
|
NonFavorite uint8 `json:"nonFavorite"`
|
|
Favorite uint8 `json:"Favorite"`
|
|
}
|
|
|
|
type BaseDetectionProperties struct {
|
|
Armed bool `json:"armed"`
|
|
Sensitivity int `json:"sensitivity"`
|
|
Zones []string `json:"zones,omitempty"`
|
|
}
|
|
|
|
// MotionDetectionProperties is the Properties struct for the EventStreamPayload type.
|
|
type MotionDetectionProperties struct {
|
|
BaseDetectionProperties `json:"motionDetection"`
|
|
}
|
|
|
|
// AudioDetectionProperties is the Properties struct for the EventStreamPayload type.
|
|
type AudioDetectionProperties struct {
|
|
BaseDetectionProperties `json:"audioDetection"`
|
|
}
|
|
|
|
type EmailNotification struct {
|
|
Enabled bool `json:"enabled"`
|
|
EmailList []string `json:"emailList"`
|
|
PushNotification bool `json:"pushNotification"`
|
|
}
|
|
|
|
type PlayTrackProperties struct {
|
|
TrackId string `json:"trackId"`
|
|
Position int `json:"position"`
|
|
}
|
|
|
|
type BaseLoopbackModeProperties struct {
|
|
LoopbackMode string `json:"loopbackMode"`
|
|
}
|
|
|
|
type LoopbackModeProperties struct {
|
|
Config BaseLoopbackModeProperties `json:"config"`
|
|
}
|
|
|
|
type BaseSleepTimerProperties struct {
|
|
SleepTime int64 `json:"sleepTime"`
|
|
SleepTimeRel int `json:"sleepTimeRel"`
|
|
}
|
|
|
|
type SleepTimerProperties struct {
|
|
Config BaseSleepTimerProperties `json:"config"`
|
|
}
|
|
type BaseEventActionProperties struct {
|
|
ActionType string `json:"actionType"`
|
|
StopType string `json:"stopType"`
|
|
Timeout int `json:"timeout"`
|
|
EmailNotification `json:"emailNotification"`
|
|
}
|
|
|
|
type EventActionProperties struct {
|
|
BaseEventActionProperties `json:"eventAction"`
|
|
}
|
|
|
|
type BaseShuffleProperties struct {
|
|
ShuffleActive bool `json:"shuffleActive"`
|
|
}
|
|
|
|
type ShuffleProperties struct {
|
|
Config BaseShuffleProperties `json:"config"`
|
|
}
|
|
|
|
type VolumeProperties struct {
|
|
Mute bool `json:"mute"`
|
|
Volume int `json:"volume,omitempty"`
|
|
}
|
|
|
|
type SpeakerProperties struct {
|
|
Speaker VolumeProperties `json:"speaker"`
|
|
}
|
|
|
|
type NightLightRGBProperties struct {
|
|
Red int `json:"red"`
|
|
Green int `json:"green"`
|
|
Blue int `json:"blue"`
|
|
}
|
|
|
|
type BaseNightLightProperties struct {
|
|
Brightness int `json:"brightness,omitempty"`
|
|
Enabled bool `json:"enabled"`
|
|
Mode string `json:"mode,omitempty"`
|
|
RGB NightLightRGBProperties `json:"rgb,omitempty"`
|
|
SleepTime int64 `json:"sleepTime,omitempty"`
|
|
SleepTimeRel int `json:"sleepTimeRel,omitempty"`
|
|
}
|
|
|
|
type NightLightProperties struct {
|
|
NightLight BaseNightLightProperties `json:"nightLight"`
|
|
}
|
|
|
|
type SirenProperties struct {
|
|
SirenState string `json:"sirenState"`
|
|
Duration int `json:"duration"`
|
|
Volume int `json:"volume"`
|
|
Pattern string `json:"pattern"`
|
|
}
|
|
|
|
type CameraProperties struct {
|
|
PrivacyActive bool `json:"privacyActive"`
|
|
Brightness int `json:"brightness,omitempty"`
|
|
}
|
|
|
|
// EventStreamPayload is the message that will be sent to the arlo servers via the /notify API.
|
|
type EventStreamPayload struct {
|
|
Action string `json:"action,omitempty"`
|
|
Resource string `json:"resource,omitempty"`
|
|
PublishResponse bool `json:"publishResponse"`
|
|
Properties interface{} `json:"properties,omitempty"`
|
|
TransId string `json:"transId"`
|
|
From string `json:"from"`
|
|
To string `json:"to"`
|
|
}
|
|
|
|
type PlaylistItem struct {
|
|
TZ string `json:"tz"`
|
|
D string `json:"d"`
|
|
URL string `json:"url"`
|
|
SURL string `json:"sUrl"`
|
|
S string `json:"s"`
|
|
U int64 `json:"u"`
|
|
}
|
|
|
|
type CvrPlaylist struct {
|
|
ToDate string `json:"toDate"`
|
|
Playlist map[string]map[string][]PlaylistItem `json:"playlist"`
|
|
UserId string `json:"userId"`
|
|
FromDate string `json:"fromDate"`
|
|
DeviceId string `json:"deviceId"`
|
|
UniqueId string `json:"uniqueId"`
|
|
}
|