package arlo // A Device is the device data, this can be a camera, basestation, arloq, etc. type Device struct { AnalyticsEnabled bool `json:"analyticsEnabled"` ArloMobilePlan bool `json:"arloMobilePlan"` ArloMobilePlanId string `json:"arloMobilePlanId"` ArloMobilePlanName string `json:"arloMobilePlanName"` ArloMobilePlanThreshold int `json:"arloMobilePlanThreshold"` Connectivity Connectivity `json:"connectivity"` CriticalBatteryState bool `json:"criticalBatteryState"` DateCreated int64 `json:"dateCreated"` DeviceId string `json:"deviceId"` DeviceName string `json:"deviceName"` DeviceType string `json:"deviceType"` DisplayOrder uint8 `json:"displayOrder"` FirmwareVersion string `json:"firmwareVersion"` InterfaceVersion string `json:"interfaceVersion"` InterfaceSchemaVer string `json:"interfaceSchemaVer"` LastImageUploaded string `json:"lastImageUploaded"` LastModified int64 `json:"lastModified"` MigrateActivityZone bool `json:"migrateActivityZone"` MobileCarrier string `json:"mobileCarrier"` MobileTrialUsed bool `json:"mobileTrialUsed"` PermissionsFilePath string `json:"permissionsFilePath"` PermissionsSchemaVer string `json:"permissionsSchemaVer"` PermissionsVerison string `json:"permissionsVerison"` // WTF? Netgear developers think this is OK... *sigh* PermissionsVersion string `json:"permissionsVersion"` PresignedFullFrameSnapshotUrl string `json:"presignedFullFrameSnapshotUrl"` PresignedLastImageUrl string `json:"presignedLastImageUrl"` PresignedSnapshotUrl string `json:"presignedSnapshotUrl"` MediaObjectCount uint32 `json:"mediaObjectCount"` ModelId string `json:"modelId"` Owner Owner `json:"owner"` ParentId string `json:"parentId"` Properties Properties `json:"properties"` UniqueId string `json:"uniqueId"` UserId string `json:"userId"` UserRole string `json:"userRole"` State string `json:"state"` XCloudId string `json:"xCloudId"` } func (d Device) IsBasestation() bool { return d.DeviceType == DeviceTypeBasestation } func (d Device) IsCamera() bool { switch d.DeviceType { case DeviceTypeCamera, DeviceTypeArloQ: return true } return false } func (d Device) IsArloQ() bool { return d.DeviceType == DeviceTypeArloBridge } func (d Device) IsLight() bool { return d.DeviceType == DeviceTypeLights } func (d Device) IsSiren() bool { return d.DeviceType == DeviceTypeSiren }