{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.AndroidManagement.Types.Product where
import Network.Google.AndroidManagement.Types.Sum
import Network.Google.Prelude
data Status = Status'
{ _sDetails :: !(Maybe [StatusDetailsItem])
, _sCode :: !(Maybe (Textual Int32))
, _sMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
status
:: Status
status =
Status'
{ _sDetails = Nothing
, _sCode = Nothing
, _sMessage = Nothing
}
sDetails :: Lens' Status [StatusDetailsItem]
sDetails
= lens _sDetails (\ s a -> s{_sDetails = a}) .
_Default
. _Coerce
sCode :: Lens' Status (Maybe Int32)
sCode
= lens _sCode (\ s a -> s{_sCode = a}) .
mapping _Coerce
sMessage :: Lens' Status (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
instance FromJSON Status where
parseJSON
= withObject "Status"
(\ o ->
Status' <$>
(o .:? "details" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON Status where
toJSON Status'{..}
= object
(catMaybes
[("details" .=) <$> _sDetails,
("code" .=) <$> _sCode,
("message" .=) <$> _sMessage])
data ListPoliciesResponse = ListPoliciesResponse'
{ _lprNextPageToken :: !(Maybe Text)
, _lprPolicies :: !(Maybe [Policy])
} deriving (Eq,Show,Data,Typeable,Generic)
listPoliciesResponse
:: ListPoliciesResponse
listPoliciesResponse =
ListPoliciesResponse'
{ _lprNextPageToken = Nothing
, _lprPolicies = Nothing
}
lprNextPageToken :: Lens' ListPoliciesResponse (Maybe Text)
lprNextPageToken
= lens _lprNextPageToken
(\ s a -> s{_lprNextPageToken = a})
lprPolicies :: Lens' ListPoliciesResponse [Policy]
lprPolicies
= lens _lprPolicies (\ s a -> s{_lprPolicies = a}) .
_Default
. _Coerce
instance FromJSON ListPoliciesResponse where
parseJSON
= withObject "ListPoliciesResponse"
(\ o ->
ListPoliciesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "policies" .!= mempty))
instance ToJSON ListPoliciesResponse where
toJSON ListPoliciesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lprNextPageToken,
("policies" .=) <$> _lprPolicies])
data MemoryInfo = MemoryInfo'
{ _miTotalInternalStorage :: !(Maybe (Textual Int64))
, _miTotalRam :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
memoryInfo
:: MemoryInfo
memoryInfo =
MemoryInfo'
{ _miTotalInternalStorage = Nothing
, _miTotalRam = Nothing
}
miTotalInternalStorage :: Lens' MemoryInfo (Maybe Int64)
miTotalInternalStorage
= lens _miTotalInternalStorage
(\ s a -> s{_miTotalInternalStorage = a})
. mapping _Coerce
miTotalRam :: Lens' MemoryInfo (Maybe Int64)
miTotalRam
= lens _miTotalRam (\ s a -> s{_miTotalRam = a}) .
mapping _Coerce
instance FromJSON MemoryInfo where
parseJSON
= withObject "MemoryInfo"
(\ o ->
MemoryInfo' <$>
(o .:? "totalInternalStorage") <*>
(o .:? "totalRam"))
instance ToJSON MemoryInfo where
toJSON MemoryInfo'{..}
= object
(catMaybes
[("totalInternalStorage" .=) <$>
_miTotalInternalStorage,
("totalRam" .=) <$> _miTotalRam])
newtype PackageNameList = PackageNameList'
{ _pnlPackageNames :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
packageNameList
:: PackageNameList
packageNameList =
PackageNameList'
{ _pnlPackageNames = Nothing
}
pnlPackageNames :: Lens' PackageNameList [Text]
pnlPackageNames
= lens _pnlPackageNames
(\ s a -> s{_pnlPackageNames = a})
. _Default
. _Coerce
instance FromJSON PackageNameList where
parseJSON
= withObject "PackageNameList"
(\ o ->
PackageNameList' <$>
(o .:? "packageNames" .!= mempty))
instance ToJSON PackageNameList where
toJSON PackageNameList'{..}
= object
(catMaybes
[("packageNames" .=) <$> _pnlPackageNames])
data Command = Command'
{ _cResetPasswordFlags :: !(Maybe [Text])
, _cNewPassword :: !(Maybe Text)
, _cUserName :: !(Maybe Text)
, _cErrorCode :: !(Maybe CommandErrorCode)
, _cType :: !(Maybe CommandType)
, _cDuration :: !(Maybe GDuration)
, _cCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
command
:: Command
command =
Command'
{ _cResetPasswordFlags = Nothing
, _cNewPassword = Nothing
, _cUserName = Nothing
, _cErrorCode = Nothing
, _cType = Nothing
, _cDuration = Nothing
, _cCreateTime = Nothing
}
cResetPasswordFlags :: Lens' Command [Text]
cResetPasswordFlags
= lens _cResetPasswordFlags
(\ s a -> s{_cResetPasswordFlags = a})
. _Default
. _Coerce
cNewPassword :: Lens' Command (Maybe Text)
cNewPassword
= lens _cNewPassword (\ s a -> s{_cNewPassword = a})
cUserName :: Lens' Command (Maybe Text)
cUserName
= lens _cUserName (\ s a -> s{_cUserName = a})
cErrorCode :: Lens' Command (Maybe CommandErrorCode)
cErrorCode
= lens _cErrorCode (\ s a -> s{_cErrorCode = a})
cType :: Lens' Command (Maybe CommandType)
cType = lens _cType (\ s a -> s{_cType = a})
cDuration :: Lens' Command (Maybe Scientific)
cDuration
= lens _cDuration (\ s a -> s{_cDuration = a}) .
mapping _GDuration
cCreateTime :: Lens' Command (Maybe UTCTime)
cCreateTime
= lens _cCreateTime (\ s a -> s{_cCreateTime = a}) .
mapping _DateTime
instance FromJSON Command where
parseJSON
= withObject "Command"
(\ o ->
Command' <$>
(o .:? "resetPasswordFlags" .!= mempty) <*>
(o .:? "newPassword")
<*> (o .:? "userName")
<*> (o .:? "errorCode")
<*> (o .:? "type")
<*> (o .:? "duration")
<*> (o .:? "createTime"))
instance ToJSON Command where
toJSON Command'{..}
= object
(catMaybes
[("resetPasswordFlags" .=) <$> _cResetPasswordFlags,
("newPassword" .=) <$> _cNewPassword,
("userName" .=) <$> _cUserName,
("errorCode" .=) <$> _cErrorCode,
("type" .=) <$> _cType,
("duration" .=) <$> _cDuration,
("createTime" .=) <$> _cCreateTime])
data ListOperationsResponse = ListOperationsResponse'
{ _lorNextPageToken :: !(Maybe Text)
, _lorOperations :: !(Maybe [Operation])
} deriving (Eq,Show,Data,Typeable,Generic)
listOperationsResponse
:: ListOperationsResponse
listOperationsResponse =
ListOperationsResponse'
{ _lorNextPageToken = Nothing
, _lorOperations = Nothing
}
lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a})
lorOperations :: Lens' ListOperationsResponse [Operation]
lorOperations
= lens _lorOperations
(\ s a -> s{_lorOperations = a})
. _Default
. _Coerce
instance FromJSON ListOperationsResponse where
parseJSON
= withObject "ListOperationsResponse"
(\ o ->
ListOperationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "operations" .!= mempty))
instance ToJSON ListOperationsResponse where
toJSON ListOperationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lorNextPageToken,
("operations" .=) <$> _lorOperations])
data Display = Display'
{ _dHeight :: !(Maybe (Textual Int32))
, _dState :: !(Maybe DisplayState)
, _dWidth :: !(Maybe (Textual Int32))
, _dName :: !(Maybe Text)
, _dRefreshRate :: !(Maybe (Textual Int32))
, _dDisplayId :: !(Maybe (Textual Int32))
, _dDensity :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
display
:: Display
display =
Display'
{ _dHeight = Nothing
, _dState = Nothing
, _dWidth = Nothing
, _dName = Nothing
, _dRefreshRate = Nothing
, _dDisplayId = Nothing
, _dDensity = Nothing
}
dHeight :: Lens' Display (Maybe Int32)
dHeight
= lens _dHeight (\ s a -> s{_dHeight = a}) .
mapping _Coerce
dState :: Lens' Display (Maybe DisplayState)
dState = lens _dState (\ s a -> s{_dState = a})
dWidth :: Lens' Display (Maybe Int32)
dWidth
= lens _dWidth (\ s a -> s{_dWidth = a}) .
mapping _Coerce
dName :: Lens' Display (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a})
dRefreshRate :: Lens' Display (Maybe Int32)
dRefreshRate
= lens _dRefreshRate (\ s a -> s{_dRefreshRate = a})
. mapping _Coerce
dDisplayId :: Lens' Display (Maybe Int32)
dDisplayId
= lens _dDisplayId (\ s a -> s{_dDisplayId = a}) .
mapping _Coerce
dDensity :: Lens' Display (Maybe Int32)
dDensity
= lens _dDensity (\ s a -> s{_dDensity = a}) .
mapping _Coerce
instance FromJSON Display where
parseJSON
= withObject "Display"
(\ o ->
Display' <$>
(o .:? "height") <*> (o .:? "state") <*>
(o .:? "width")
<*> (o .:? "name")
<*> (o .:? "refreshRate")
<*> (o .:? "displayId")
<*> (o .:? "density"))
instance ToJSON Display where
toJSON Display'{..}
= object
(catMaybes
[("height" .=) <$> _dHeight,
("state" .=) <$> _dState, ("width" .=) <$> _dWidth,
("name" .=) <$> _dName,
("refreshRate" .=) <$> _dRefreshRate,
("displayId" .=) <$> _dDisplayId,
("density" .=) <$> _dDensity])
data AlwaysOnVPNPackage = AlwaysOnVPNPackage'
{ _aovpLockdownEnabled :: !(Maybe Bool)
, _aovpPackageName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
alwaysOnVPNPackage
:: AlwaysOnVPNPackage
alwaysOnVPNPackage =
AlwaysOnVPNPackage'
{ _aovpLockdownEnabled = Nothing
, _aovpPackageName = Nothing
}
aovpLockdownEnabled :: Lens' AlwaysOnVPNPackage (Maybe Bool)
aovpLockdownEnabled
= lens _aovpLockdownEnabled
(\ s a -> s{_aovpLockdownEnabled = a})
aovpPackageName :: Lens' AlwaysOnVPNPackage (Maybe Text)
aovpPackageName
= lens _aovpPackageName
(\ s a -> s{_aovpPackageName = a})
instance FromJSON AlwaysOnVPNPackage where
parseJSON
= withObject "AlwaysOnVPNPackage"
(\ o ->
AlwaysOnVPNPackage' <$>
(o .:? "lockdownEnabled") <*> (o .:? "packageName"))
instance ToJSON AlwaysOnVPNPackage where
toJSON AlwaysOnVPNPackage'{..}
= object
(catMaybes
[("lockdownEnabled" .=) <$> _aovpLockdownEnabled,
("packageName" .=) <$> _aovpPackageName])
newtype PolicyOpenNetworkConfiguration = PolicyOpenNetworkConfiguration'
{ _poncAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
policyOpenNetworkConfiguration
:: HashMap Text JSONValue
-> PolicyOpenNetworkConfiguration
policyOpenNetworkConfiguration pPoncAddtional_ =
PolicyOpenNetworkConfiguration'
{ _poncAddtional = _Coerce # pPoncAddtional_
}
poncAddtional :: Lens' PolicyOpenNetworkConfiguration (HashMap Text JSONValue)
poncAddtional
= lens _poncAddtional
(\ s a -> s{_poncAddtional = a})
. _Coerce
instance FromJSON PolicyOpenNetworkConfiguration
where
parseJSON
= withObject "PolicyOpenNetworkConfiguration"
(\ o ->
PolicyOpenNetworkConfiguration' <$>
(parseJSONObject o))
instance ToJSON PolicyOpenNetworkConfiguration where
toJSON = toJSON . _poncAddtional
data HardwareStatus = HardwareStatus'
{ _hsCPUTemperatures :: !(Maybe [Textual Double])
, _hsBatteryTemperatures :: !(Maybe [Textual Double])
, _hsGpuTemperatures :: !(Maybe [Textual Double])
, _hsFanSpeeds :: !(Maybe [Textual Double])
, _hsSkinTemperatures :: !(Maybe [Textual Double])
, _hsCPUUsages :: !(Maybe [Textual Double])
, _hsCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
hardwareStatus
:: HardwareStatus
hardwareStatus =
HardwareStatus'
{ _hsCPUTemperatures = Nothing
, _hsBatteryTemperatures = Nothing
, _hsGpuTemperatures = Nothing
, _hsFanSpeeds = Nothing
, _hsSkinTemperatures = Nothing
, _hsCPUUsages = Nothing
, _hsCreateTime = Nothing
}
hsCPUTemperatures :: Lens' HardwareStatus [Double]
hsCPUTemperatures
= lens _hsCPUTemperatures
(\ s a -> s{_hsCPUTemperatures = a})
. _Default
. _Coerce
hsBatteryTemperatures :: Lens' HardwareStatus [Double]
hsBatteryTemperatures
= lens _hsBatteryTemperatures
(\ s a -> s{_hsBatteryTemperatures = a})
. _Default
. _Coerce
hsGpuTemperatures :: Lens' HardwareStatus [Double]
hsGpuTemperatures
= lens _hsGpuTemperatures
(\ s a -> s{_hsGpuTemperatures = a})
. _Default
. _Coerce
hsFanSpeeds :: Lens' HardwareStatus [Double]
hsFanSpeeds
= lens _hsFanSpeeds (\ s a -> s{_hsFanSpeeds = a}) .
_Default
. _Coerce
hsSkinTemperatures :: Lens' HardwareStatus [Double]
hsSkinTemperatures
= lens _hsSkinTemperatures
(\ s a -> s{_hsSkinTemperatures = a})
. _Default
. _Coerce
hsCPUUsages :: Lens' HardwareStatus [Double]
hsCPUUsages
= lens _hsCPUUsages (\ s a -> s{_hsCPUUsages = a}) .
_Default
. _Coerce
hsCreateTime :: Lens' HardwareStatus (Maybe UTCTime)
hsCreateTime
= lens _hsCreateTime (\ s a -> s{_hsCreateTime = a})
. mapping _DateTime
instance FromJSON HardwareStatus where
parseJSON
= withObject "HardwareStatus"
(\ o ->
HardwareStatus' <$>
(o .:? "cpuTemperatures" .!= mempty) <*>
(o .:? "batteryTemperatures" .!= mempty)
<*> (o .:? "gpuTemperatures" .!= mempty)
<*> (o .:? "fanSpeeds" .!= mempty)
<*> (o .:? "skinTemperatures" .!= mempty)
<*> (o .:? "cpuUsages" .!= mempty)
<*> (o .:? "createTime"))
instance ToJSON HardwareStatus where
toJSON HardwareStatus'{..}
= object
(catMaybes
[("cpuTemperatures" .=) <$> _hsCPUTemperatures,
("batteryTemperatures" .=) <$>
_hsBatteryTemperatures,
("gpuTemperatures" .=) <$> _hsGpuTemperatures,
("fanSpeeds" .=) <$> _hsFanSpeeds,
("skinTemperatures" .=) <$> _hsSkinTemperatures,
("cpuUsages" .=) <$> _hsCPUUsages,
("createTime" .=) <$> _hsCreateTime])
data Application = Application'
{ _aManagedProperties :: !(Maybe [ManagedProperty])
, _aName :: !(Maybe Text)
, _aPermissions :: !(Maybe [ApplicationPermission])
, _aTitle :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
application
:: Application
application =
Application'
{ _aManagedProperties = Nothing
, _aName = Nothing
, _aPermissions = Nothing
, _aTitle = Nothing
}
aManagedProperties :: Lens' Application [ManagedProperty]
aManagedProperties
= lens _aManagedProperties
(\ s a -> s{_aManagedProperties = a})
. _Default
. _Coerce
aName :: Lens' Application (Maybe Text)
aName = lens _aName (\ s a -> s{_aName = a})
aPermissions :: Lens' Application [ApplicationPermission]
aPermissions
= lens _aPermissions (\ s a -> s{_aPermissions = a})
. _Default
. _Coerce
aTitle :: Lens' Application (Maybe Text)
aTitle = lens _aTitle (\ s a -> s{_aTitle = a})
instance FromJSON Application where
parseJSON
= withObject "Application"
(\ o ->
Application' <$>
(o .:? "managedProperties" .!= mempty) <*>
(o .:? "name")
<*> (o .:? "permissions" .!= mempty)
<*> (o .:? "title"))
instance ToJSON Application where
toJSON Application'{..}
= object
(catMaybes
[("managedProperties" .=) <$> _aManagedProperties,
("name" .=) <$> _aName,
("permissions" .=) <$> _aPermissions,
("title" .=) <$> _aTitle])
data ManagedProperty = ManagedProperty'
{ _mpEntries :: !(Maybe [ManagedPropertyEntry])
, _mpNestedProperties :: !(Maybe [ManagedProperty])
, _mpKey :: !(Maybe Text)
, _mpDefaultValue :: !(Maybe JSONValue)
, _mpTitle :: !(Maybe Text)
, _mpType :: !(Maybe ManagedPropertyType)
, _mpDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedProperty
:: ManagedProperty
managedProperty =
ManagedProperty'
{ _mpEntries = Nothing
, _mpNestedProperties = Nothing
, _mpKey = Nothing
, _mpDefaultValue = Nothing
, _mpTitle = Nothing
, _mpType = Nothing
, _mpDescription = Nothing
}
mpEntries :: Lens' ManagedProperty [ManagedPropertyEntry]
mpEntries
= lens _mpEntries (\ s a -> s{_mpEntries = a}) .
_Default
. _Coerce
mpNestedProperties :: Lens' ManagedProperty [ManagedProperty]
mpNestedProperties
= lens _mpNestedProperties
(\ s a -> s{_mpNestedProperties = a})
. _Default
. _Coerce
mpKey :: Lens' ManagedProperty (Maybe Text)
mpKey = lens _mpKey (\ s a -> s{_mpKey = a})
mpDefaultValue :: Lens' ManagedProperty (Maybe JSONValue)
mpDefaultValue
= lens _mpDefaultValue
(\ s a -> s{_mpDefaultValue = a})
mpTitle :: Lens' ManagedProperty (Maybe Text)
mpTitle = lens _mpTitle (\ s a -> s{_mpTitle = a})
mpType :: Lens' ManagedProperty (Maybe ManagedPropertyType)
mpType = lens _mpType (\ s a -> s{_mpType = a})
mpDescription :: Lens' ManagedProperty (Maybe Text)
mpDescription
= lens _mpDescription
(\ s a -> s{_mpDescription = a})
instance FromJSON ManagedProperty where
parseJSON
= withObject "ManagedProperty"
(\ o ->
ManagedProperty' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "nestedProperties" .!= mempty)
<*> (o .:? "key")
<*> (o .:? "defaultValue")
<*> (o .:? "title")
<*> (o .:? "type")
<*> (o .:? "description"))
instance ToJSON ManagedProperty where
toJSON ManagedProperty'{..}
= object
(catMaybes
[("entries" .=) <$> _mpEntries,
("nestedProperties" .=) <$> _mpNestedProperties,
("key" .=) <$> _mpKey,
("defaultValue" .=) <$> _mpDefaultValue,
("title" .=) <$> _mpTitle, ("type" .=) <$> _mpType,
("description" .=) <$> _mpDescription])
data ProxyInfo = ProxyInfo'
{ _piPacURI :: !(Maybe Text)
, _piHost :: !(Maybe Text)
, _piExcludedHosts :: !(Maybe [Text])
, _piPort :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
proxyInfo
:: ProxyInfo
proxyInfo =
ProxyInfo'
{ _piPacURI = Nothing
, _piHost = Nothing
, _piExcludedHosts = Nothing
, _piPort = Nothing
}
piPacURI :: Lens' ProxyInfo (Maybe Text)
piPacURI = lens _piPacURI (\ s a -> s{_piPacURI = a})
piHost :: Lens' ProxyInfo (Maybe Text)
piHost = lens _piHost (\ s a -> s{_piHost = a})
piExcludedHosts :: Lens' ProxyInfo [Text]
piExcludedHosts
= lens _piExcludedHosts
(\ s a -> s{_piExcludedHosts = a})
. _Default
. _Coerce
piPort :: Lens' ProxyInfo (Maybe Int32)
piPort
= lens _piPort (\ s a -> s{_piPort = a}) .
mapping _Coerce
instance FromJSON ProxyInfo where
parseJSON
= withObject "ProxyInfo"
(\ o ->
ProxyInfo' <$>
(o .:? "pacUri") <*> (o .:? "host") <*>
(o .:? "excludedHosts" .!= mempty)
<*> (o .:? "port"))
instance ToJSON ProxyInfo where
toJSON ProxyInfo'{..}
= object
(catMaybes
[("pacUri" .=) <$> _piPacURI,
("host" .=) <$> _piHost,
("excludedHosts" .=) <$> _piExcludedHosts,
("port" .=) <$> _piPort])
data PersistentPreferredActivity = PersistentPreferredActivity'
{ _ppaActions :: !(Maybe [Text])
, _ppaCategories :: !(Maybe [Text])
, _ppaReceiverActivity :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
persistentPreferredActivity
:: PersistentPreferredActivity
persistentPreferredActivity =
PersistentPreferredActivity'
{ _ppaActions = Nothing
, _ppaCategories = Nothing
, _ppaReceiverActivity = Nothing
}
ppaActions :: Lens' PersistentPreferredActivity [Text]
ppaActions
= lens _ppaActions (\ s a -> s{_ppaActions = a}) .
_Default
. _Coerce
ppaCategories :: Lens' PersistentPreferredActivity [Text]
ppaCategories
= lens _ppaCategories
(\ s a -> s{_ppaCategories = a})
. _Default
. _Coerce
ppaReceiverActivity :: Lens' PersistentPreferredActivity (Maybe Text)
ppaReceiverActivity
= lens _ppaReceiverActivity
(\ s a -> s{_ppaReceiverActivity = a})
instance FromJSON PersistentPreferredActivity where
parseJSON
= withObject "PersistentPreferredActivity"
(\ o ->
PersistentPreferredActivity' <$>
(o .:? "actions" .!= mempty) <*>
(o .:? "categories" .!= mempty)
<*> (o .:? "receiverActivity"))
instance ToJSON PersistentPreferredActivity where
toJSON PersistentPreferredActivity'{..}
= object
(catMaybes
[("actions" .=) <$> _ppaActions,
("categories" .=) <$> _ppaCategories,
("receiverActivity" .=) <$> _ppaReceiverActivity])
data Operation = Operation'
{ _oDone :: !(Maybe Bool)
, _oError :: !(Maybe Status)
, _oResponse :: !(Maybe OperationResponse)
, _oName :: !(Maybe Text)
, _oMetadata :: !(Maybe OperationMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oDone = Nothing
, _oError = Nothing
, _oResponse = Nothing
, _oName = Nothing
, _oMetadata = Nothing
}
oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a})
oError :: Lens' Operation (Maybe Status)
oError = lens _oError (\ s a -> s{_oError = a})
oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oMetadata :: Lens' Operation (Maybe OperationMetadata)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "response")
<*> (o .:? "name")
<*> (o .:? "metadata"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("done" .=) <$> _oDone, ("error" .=) <$> _oError,
("response" .=) <$> _oResponse,
("name" .=) <$> _oName,
("metadata" .=) <$> _oMetadata])
data Empty =
Empty'
deriving (Eq,Show,Data,Typeable,Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
data ExternalData = ExternalData'
{ _edURL :: !(Maybe Text)
, _edSha256Hash :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
externalData
:: ExternalData
externalData =
ExternalData'
{ _edURL = Nothing
, _edSha256Hash = Nothing
}
edURL :: Lens' ExternalData (Maybe Text)
edURL = lens _edURL (\ s a -> s{_edURL = a})
edSha256Hash :: Lens' ExternalData (Maybe Text)
edSha256Hash
= lens _edSha256Hash (\ s a -> s{_edSha256Hash = a})
instance FromJSON ExternalData where
parseJSON
= withObject "ExternalData"
(\ o ->
ExternalData' <$>
(o .:? "url") <*> (o .:? "sha256Hash"))
instance ToJSON ExternalData where
toJSON ExternalData'{..}
= object
(catMaybes
[("url" .=) <$> _edURL,
("sha256Hash" .=) <$> _edSha256Hash])
newtype APILevelCondition = APILevelCondition'
{ _alcMinAPILevel :: Maybe (Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
apiLevelCondition
:: APILevelCondition
apiLevelCondition =
APILevelCondition'
{ _alcMinAPILevel = Nothing
}
alcMinAPILevel :: Lens' APILevelCondition (Maybe Int32)
alcMinAPILevel
= lens _alcMinAPILevel
(\ s a -> s{_alcMinAPILevel = a})
. mapping _Coerce
instance FromJSON APILevelCondition where
parseJSON
= withObject "APILevelCondition"
(\ o -> APILevelCondition' <$> (o .:? "minApiLevel"))
instance ToJSON APILevelCondition where
toJSON APILevelCondition'{..}
= object
(catMaybes [("minApiLevel" .=) <$> _alcMinAPILevel])
data DeviceSettings = DeviceSettings'
{ _dsIsEncrypted :: !(Maybe Bool)
, _dsAdbEnabled :: !(Maybe Bool)
, _dsIsDeviceSecure :: !(Maybe Bool)
, _dsVerifyAppsEnabled :: !(Maybe Bool)
, _dsDevelopmentSettingsEnabled :: !(Maybe Bool)
, _dsEncryptionStatus :: !(Maybe DeviceSettingsEncryptionStatus)
, _dsUnknownSourcesEnabled :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
deviceSettings
:: DeviceSettings
deviceSettings =
DeviceSettings'
{ _dsIsEncrypted = Nothing
, _dsAdbEnabled = Nothing
, _dsIsDeviceSecure = Nothing
, _dsVerifyAppsEnabled = Nothing
, _dsDevelopmentSettingsEnabled = Nothing
, _dsEncryptionStatus = Nothing
, _dsUnknownSourcesEnabled = Nothing
}
dsIsEncrypted :: Lens' DeviceSettings (Maybe Bool)
dsIsEncrypted
= lens _dsIsEncrypted
(\ s a -> s{_dsIsEncrypted = a})
dsAdbEnabled :: Lens' DeviceSettings (Maybe Bool)
dsAdbEnabled
= lens _dsAdbEnabled (\ s a -> s{_dsAdbEnabled = a})
dsIsDeviceSecure :: Lens' DeviceSettings (Maybe Bool)
dsIsDeviceSecure
= lens _dsIsDeviceSecure
(\ s a -> s{_dsIsDeviceSecure = a})
dsVerifyAppsEnabled :: Lens' DeviceSettings (Maybe Bool)
dsVerifyAppsEnabled
= lens _dsVerifyAppsEnabled
(\ s a -> s{_dsVerifyAppsEnabled = a})
dsDevelopmentSettingsEnabled :: Lens' DeviceSettings (Maybe Bool)
dsDevelopmentSettingsEnabled
= lens _dsDevelopmentSettingsEnabled
(\ s a -> s{_dsDevelopmentSettingsEnabled = a})
dsEncryptionStatus :: Lens' DeviceSettings (Maybe DeviceSettingsEncryptionStatus)
dsEncryptionStatus
= lens _dsEncryptionStatus
(\ s a -> s{_dsEncryptionStatus = a})
dsUnknownSourcesEnabled :: Lens' DeviceSettings (Maybe Bool)
dsUnknownSourcesEnabled
= lens _dsUnknownSourcesEnabled
(\ s a -> s{_dsUnknownSourcesEnabled = a})
instance FromJSON DeviceSettings where
parseJSON
= withObject "DeviceSettings"
(\ o ->
DeviceSettings' <$>
(o .:? "isEncrypted") <*> (o .:? "adbEnabled") <*>
(o .:? "isDeviceSecure")
<*> (o .:? "verifyAppsEnabled")
<*> (o .:? "developmentSettingsEnabled")
<*> (o .:? "encryptionStatus")
<*> (o .:? "unknownSourcesEnabled"))
instance ToJSON DeviceSettings where
toJSON DeviceSettings'{..}
= object
(catMaybes
[("isEncrypted" .=) <$> _dsIsEncrypted,
("adbEnabled" .=) <$> _dsAdbEnabled,
("isDeviceSecure" .=) <$> _dsIsDeviceSecure,
("verifyAppsEnabled" .=) <$> _dsVerifyAppsEnabled,
("developmentSettingsEnabled" .=) <$>
_dsDevelopmentSettingsEnabled,
("encryptionStatus" .=) <$> _dsEncryptionStatus,
("unknownSourcesEnabled" .=) <$>
_dsUnknownSourcesEnabled])
newtype ManagedConfigurationTemplateConfigurationVariables = ManagedConfigurationTemplateConfigurationVariables'
{ _mctcvAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
managedConfigurationTemplateConfigurationVariables
:: HashMap Text Text
-> ManagedConfigurationTemplateConfigurationVariables
managedConfigurationTemplateConfigurationVariables pMctcvAddtional_ =
ManagedConfigurationTemplateConfigurationVariables'
{ _mctcvAddtional = _Coerce # pMctcvAddtional_
}
mctcvAddtional :: Lens' ManagedConfigurationTemplateConfigurationVariables (HashMap Text Text)
mctcvAddtional
= lens _mctcvAddtional
(\ s a -> s{_mctcvAddtional = a})
. _Coerce
instance FromJSON
ManagedConfigurationTemplateConfigurationVariables
where
parseJSON
= withObject
"ManagedConfigurationTemplateConfigurationVariables"
(\ o ->
ManagedConfigurationTemplateConfigurationVariables'
<$> (parseJSONObject o))
instance ToJSON
ManagedConfigurationTemplateConfigurationVariables
where
toJSON = toJSON . _mctcvAddtional
data HardwareInfo = HardwareInfo'
{ _hiCPUThrottlingTemperatures :: !(Maybe [Textual Double])
, _hiManufacturer :: !(Maybe Text)
, _hiBrand :: !(Maybe Text)
, _hiCPUShutdownTemperatures :: !(Maybe [Textual Double])
, _hiBatteryThrottlingTemperatures :: !(Maybe [Textual Double])
, _hiModel :: !(Maybe Text)
, _hiBatteryShutdownTemperatures :: !(Maybe [Textual Double])
, _hiSkinThrottlingTemperatures :: !(Maybe [Textual Double])
, _hiGpuShutdownTemperatures :: !(Maybe [Textual Double])
, _hiGpuThrottlingTemperatures :: !(Maybe [Textual Double])
, _hiSkinShutdownTemperatures :: !(Maybe [Textual Double])
, _hiSerialNumber :: !(Maybe Text)
, _hiDeviceBasebandVersion :: !(Maybe Text)
, _hiHardware :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
hardwareInfo
:: HardwareInfo
hardwareInfo =
HardwareInfo'
{ _hiCPUThrottlingTemperatures = Nothing
, _hiManufacturer = Nothing
, _hiBrand = Nothing
, _hiCPUShutdownTemperatures = Nothing
, _hiBatteryThrottlingTemperatures = Nothing
, _hiModel = Nothing
, _hiBatteryShutdownTemperatures = Nothing
, _hiSkinThrottlingTemperatures = Nothing
, _hiGpuShutdownTemperatures = Nothing
, _hiGpuThrottlingTemperatures = Nothing
, _hiSkinShutdownTemperatures = Nothing
, _hiSerialNumber = Nothing
, _hiDeviceBasebandVersion = Nothing
, _hiHardware = Nothing
}
hiCPUThrottlingTemperatures :: Lens' HardwareInfo [Double]
hiCPUThrottlingTemperatures
= lens _hiCPUThrottlingTemperatures
(\ s a -> s{_hiCPUThrottlingTemperatures = a})
. _Default
. _Coerce
hiManufacturer :: Lens' HardwareInfo (Maybe Text)
hiManufacturer
= lens _hiManufacturer
(\ s a -> s{_hiManufacturer = a})
hiBrand :: Lens' HardwareInfo (Maybe Text)
hiBrand = lens _hiBrand (\ s a -> s{_hiBrand = a})
hiCPUShutdownTemperatures :: Lens' HardwareInfo [Double]
hiCPUShutdownTemperatures
= lens _hiCPUShutdownTemperatures
(\ s a -> s{_hiCPUShutdownTemperatures = a})
. _Default
. _Coerce
hiBatteryThrottlingTemperatures :: Lens' HardwareInfo [Double]
hiBatteryThrottlingTemperatures
= lens _hiBatteryThrottlingTemperatures
(\ s a -> s{_hiBatteryThrottlingTemperatures = a})
. _Default
. _Coerce
hiModel :: Lens' HardwareInfo (Maybe Text)
hiModel = lens _hiModel (\ s a -> s{_hiModel = a})
hiBatteryShutdownTemperatures :: Lens' HardwareInfo [Double]
hiBatteryShutdownTemperatures
= lens _hiBatteryShutdownTemperatures
(\ s a -> s{_hiBatteryShutdownTemperatures = a})
. _Default
. _Coerce
hiSkinThrottlingTemperatures :: Lens' HardwareInfo [Double]
hiSkinThrottlingTemperatures
= lens _hiSkinThrottlingTemperatures
(\ s a -> s{_hiSkinThrottlingTemperatures = a})
. _Default
. _Coerce
hiGpuShutdownTemperatures :: Lens' HardwareInfo [Double]
hiGpuShutdownTemperatures
= lens _hiGpuShutdownTemperatures
(\ s a -> s{_hiGpuShutdownTemperatures = a})
. _Default
. _Coerce
hiGpuThrottlingTemperatures :: Lens' HardwareInfo [Double]
hiGpuThrottlingTemperatures
= lens _hiGpuThrottlingTemperatures
(\ s a -> s{_hiGpuThrottlingTemperatures = a})
. _Default
. _Coerce
hiSkinShutdownTemperatures :: Lens' HardwareInfo [Double]
hiSkinShutdownTemperatures
= lens _hiSkinShutdownTemperatures
(\ s a -> s{_hiSkinShutdownTemperatures = a})
. _Default
. _Coerce
hiSerialNumber :: Lens' HardwareInfo (Maybe Text)
hiSerialNumber
= lens _hiSerialNumber
(\ s a -> s{_hiSerialNumber = a})
hiDeviceBasebandVersion :: Lens' HardwareInfo (Maybe Text)
hiDeviceBasebandVersion
= lens _hiDeviceBasebandVersion
(\ s a -> s{_hiDeviceBasebandVersion = a})
hiHardware :: Lens' HardwareInfo (Maybe Text)
hiHardware
= lens _hiHardware (\ s a -> s{_hiHardware = a})
instance FromJSON HardwareInfo where
parseJSON
= withObject "HardwareInfo"
(\ o ->
HardwareInfo' <$>
(o .:? "cpuThrottlingTemperatures" .!= mempty) <*>
(o .:? "manufacturer")
<*> (o .:? "brand")
<*> (o .:? "cpuShutdownTemperatures" .!= mempty)
<*>
(o .:? "batteryThrottlingTemperatures" .!= mempty)
<*> (o .:? "model")
<*> (o .:? "batteryShutdownTemperatures" .!= mempty)
<*> (o .:? "skinThrottlingTemperatures" .!= mempty)
<*> (o .:? "gpuShutdownTemperatures" .!= mempty)
<*> (o .:? "gpuThrottlingTemperatures" .!= mempty)
<*> (o .:? "skinShutdownTemperatures" .!= mempty)
<*> (o .:? "serialNumber")
<*> (o .:? "deviceBasebandVersion")
<*> (o .:? "hardware"))
instance ToJSON HardwareInfo where
toJSON HardwareInfo'{..}
= object
(catMaybes
[("cpuThrottlingTemperatures" .=) <$>
_hiCPUThrottlingTemperatures,
("manufacturer" .=) <$> _hiManufacturer,
("brand" .=) <$> _hiBrand,
("cpuShutdownTemperatures" .=) <$>
_hiCPUShutdownTemperatures,
("batteryThrottlingTemperatures" .=) <$>
_hiBatteryThrottlingTemperatures,
("model" .=) <$> _hiModel,
("batteryShutdownTemperatures" .=) <$>
_hiBatteryShutdownTemperatures,
("skinThrottlingTemperatures" .=) <$>
_hiSkinThrottlingTemperatures,
("gpuShutdownTemperatures" .=) <$>
_hiGpuShutdownTemperatures,
("gpuThrottlingTemperatures" .=) <$>
_hiGpuThrottlingTemperatures,
("skinShutdownTemperatures" .=) <$>
_hiSkinShutdownTemperatures,
("serialNumber" .=) <$> _hiSerialNumber,
("deviceBasebandVersion" .=) <$>
_hiDeviceBasebandVersion,
("hardware" .=) <$> _hiHardware])
data Device = Device'
{ _devMemoryInfo :: !(Maybe MemoryInfo)
, _devPolicyCompliant :: !(Maybe Bool)
, _devApplicationReports :: !(Maybe [ApplicationReport])
, _devPolicyName :: !(Maybe Text)
, _devState :: !(Maybe DeviceState)
, _devAppliedPolicyName :: !(Maybe Text)
, _devLastStatusReportTime :: !(Maybe DateTime')
, _devDeviceSettings :: !(Maybe DeviceSettings)
, _devEnrollmentTokenName :: !(Maybe Text)
, _devManagementMode :: !(Maybe DeviceManagementMode)
, _devHardwareInfo :: !(Maybe HardwareInfo)
, _devPowerManagementEvents :: !(Maybe [PowerManagementEvent])
, _devUserName :: !(Maybe Text)
, _devMemoryEvents :: !(Maybe [MemoryEvent])
, _devAPILevel :: !(Maybe (Textual Int32))
, _devUser :: !(Maybe User)
, _devDisabledReason :: !(Maybe UserFacingMessage)
, _devLastPolicyComplianceReportTime :: !(Maybe DateTime')
, _devEnrollmentTokenData :: !(Maybe Text)
, _devName :: !(Maybe Text)
, _devAppliedPolicyVersion :: !(Maybe (Textual Int64))
, _devHardwareStatusSamples :: !(Maybe [HardwareStatus])
, _devAppliedState :: !(Maybe DeviceAppliedState)
, _devPreviousDeviceNames :: !(Maybe [Text])
, _devLastPolicySyncTime :: !(Maybe DateTime')
, _devNetworkInfo :: !(Maybe NetworkInfo)
, _devNonComplianceDetails :: !(Maybe [NonComplianceDetail])
, _devSoftwareInfo :: !(Maybe SoftwareInfo)
, _devEnrollmentTime :: !(Maybe DateTime')
, _devDisplays :: !(Maybe [Display])
} deriving (Eq,Show,Data,Typeable,Generic)
device
:: Device
device =
Device'
{ _devMemoryInfo = Nothing
, _devPolicyCompliant = Nothing
, _devApplicationReports = Nothing
, _devPolicyName = Nothing
, _devState = Nothing
, _devAppliedPolicyName = Nothing
, _devLastStatusReportTime = Nothing
, _devDeviceSettings = Nothing
, _devEnrollmentTokenName = Nothing
, _devManagementMode = Nothing
, _devHardwareInfo = Nothing
, _devPowerManagementEvents = Nothing
, _devUserName = Nothing
, _devMemoryEvents = Nothing
, _devAPILevel = Nothing
, _devUser = Nothing
, _devDisabledReason = Nothing
, _devLastPolicyComplianceReportTime = Nothing
, _devEnrollmentTokenData = Nothing
, _devName = Nothing
, _devAppliedPolicyVersion = Nothing
, _devHardwareStatusSamples = Nothing
, _devAppliedState = Nothing
, _devPreviousDeviceNames = Nothing
, _devLastPolicySyncTime = Nothing
, _devNetworkInfo = Nothing
, _devNonComplianceDetails = Nothing
, _devSoftwareInfo = Nothing
, _devEnrollmentTime = Nothing
, _devDisplays = Nothing
}
devMemoryInfo :: Lens' Device (Maybe MemoryInfo)
devMemoryInfo
= lens _devMemoryInfo
(\ s a -> s{_devMemoryInfo = a})
devPolicyCompliant :: Lens' Device (Maybe Bool)
devPolicyCompliant
= lens _devPolicyCompliant
(\ s a -> s{_devPolicyCompliant = a})
devApplicationReports :: Lens' Device [ApplicationReport]
devApplicationReports
= lens _devApplicationReports
(\ s a -> s{_devApplicationReports = a})
. _Default
. _Coerce
devPolicyName :: Lens' Device (Maybe Text)
devPolicyName
= lens _devPolicyName
(\ s a -> s{_devPolicyName = a})
devState :: Lens' Device (Maybe DeviceState)
devState = lens _devState (\ s a -> s{_devState = a})
devAppliedPolicyName :: Lens' Device (Maybe Text)
devAppliedPolicyName
= lens _devAppliedPolicyName
(\ s a -> s{_devAppliedPolicyName = a})
devLastStatusReportTime :: Lens' Device (Maybe UTCTime)
devLastStatusReportTime
= lens _devLastStatusReportTime
(\ s a -> s{_devLastStatusReportTime = a})
. mapping _DateTime
devDeviceSettings :: Lens' Device (Maybe DeviceSettings)
devDeviceSettings
= lens _devDeviceSettings
(\ s a -> s{_devDeviceSettings = a})
devEnrollmentTokenName :: Lens' Device (Maybe Text)
devEnrollmentTokenName
= lens _devEnrollmentTokenName
(\ s a -> s{_devEnrollmentTokenName = a})
devManagementMode :: Lens' Device (Maybe DeviceManagementMode)
devManagementMode
= lens _devManagementMode
(\ s a -> s{_devManagementMode = a})
devHardwareInfo :: Lens' Device (Maybe HardwareInfo)
devHardwareInfo
= lens _devHardwareInfo
(\ s a -> s{_devHardwareInfo = a})
devPowerManagementEvents :: Lens' Device [PowerManagementEvent]
devPowerManagementEvents
= lens _devPowerManagementEvents
(\ s a -> s{_devPowerManagementEvents = a})
. _Default
. _Coerce
devUserName :: Lens' Device (Maybe Text)
devUserName
= lens _devUserName (\ s a -> s{_devUserName = a})
devMemoryEvents :: Lens' Device [MemoryEvent]
devMemoryEvents
= lens _devMemoryEvents
(\ s a -> s{_devMemoryEvents = a})
. _Default
. _Coerce
devAPILevel :: Lens' Device (Maybe Int32)
devAPILevel
= lens _devAPILevel (\ s a -> s{_devAPILevel = a}) .
mapping _Coerce
devUser :: Lens' Device (Maybe User)
devUser = lens _devUser (\ s a -> s{_devUser = a})
devDisabledReason :: Lens' Device (Maybe UserFacingMessage)
devDisabledReason
= lens _devDisabledReason
(\ s a -> s{_devDisabledReason = a})
devLastPolicyComplianceReportTime :: Lens' Device (Maybe UTCTime)
devLastPolicyComplianceReportTime
= lens _devLastPolicyComplianceReportTime
(\ s a -> s{_devLastPolicyComplianceReportTime = a})
. mapping _DateTime
devEnrollmentTokenData :: Lens' Device (Maybe Text)
devEnrollmentTokenData
= lens _devEnrollmentTokenData
(\ s a -> s{_devEnrollmentTokenData = a})
devName :: Lens' Device (Maybe Text)
devName = lens _devName (\ s a -> s{_devName = a})
devAppliedPolicyVersion :: Lens' Device (Maybe Int64)
devAppliedPolicyVersion
= lens _devAppliedPolicyVersion
(\ s a -> s{_devAppliedPolicyVersion = a})
. mapping _Coerce
devHardwareStatusSamples :: Lens' Device [HardwareStatus]
devHardwareStatusSamples
= lens _devHardwareStatusSamples
(\ s a -> s{_devHardwareStatusSamples = a})
. _Default
. _Coerce
devAppliedState :: Lens' Device (Maybe DeviceAppliedState)
devAppliedState
= lens _devAppliedState
(\ s a -> s{_devAppliedState = a})
devPreviousDeviceNames :: Lens' Device [Text]
devPreviousDeviceNames
= lens _devPreviousDeviceNames
(\ s a -> s{_devPreviousDeviceNames = a})
. _Default
. _Coerce
devLastPolicySyncTime :: Lens' Device (Maybe UTCTime)
devLastPolicySyncTime
= lens _devLastPolicySyncTime
(\ s a -> s{_devLastPolicySyncTime = a})
. mapping _DateTime
devNetworkInfo :: Lens' Device (Maybe NetworkInfo)
devNetworkInfo
= lens _devNetworkInfo
(\ s a -> s{_devNetworkInfo = a})
devNonComplianceDetails :: Lens' Device [NonComplianceDetail]
devNonComplianceDetails
= lens _devNonComplianceDetails
(\ s a -> s{_devNonComplianceDetails = a})
. _Default
. _Coerce
devSoftwareInfo :: Lens' Device (Maybe SoftwareInfo)
devSoftwareInfo
= lens _devSoftwareInfo
(\ s a -> s{_devSoftwareInfo = a})
devEnrollmentTime :: Lens' Device (Maybe UTCTime)
devEnrollmentTime
= lens _devEnrollmentTime
(\ s a -> s{_devEnrollmentTime = a})
. mapping _DateTime
devDisplays :: Lens' Device [Display]
devDisplays
= lens _devDisplays (\ s a -> s{_devDisplays = a}) .
_Default
. _Coerce
instance FromJSON Device where
parseJSON
= withObject "Device"
(\ o ->
Device' <$>
(o .:? "memoryInfo") <*> (o .:? "policyCompliant")
<*> (o .:? "applicationReports" .!= mempty)
<*> (o .:? "policyName")
<*> (o .:? "state")
<*> (o .:? "appliedPolicyName")
<*> (o .:? "lastStatusReportTime")
<*> (o .:? "deviceSettings")
<*> (o .:? "enrollmentTokenName")
<*> (o .:? "managementMode")
<*> (o .:? "hardwareInfo")
<*> (o .:? "powerManagementEvents" .!= mempty)
<*> (o .:? "userName")
<*> (o .:? "memoryEvents" .!= mempty)
<*> (o .:? "apiLevel")
<*> (o .:? "user")
<*> (o .:? "disabledReason")
<*> (o .:? "lastPolicyComplianceReportTime")
<*> (o .:? "enrollmentTokenData")
<*> (o .:? "name")
<*> (o .:? "appliedPolicyVersion")
<*> (o .:? "hardwareStatusSamples" .!= mempty)
<*> (o .:? "appliedState")
<*> (o .:? "previousDeviceNames" .!= mempty)
<*> (o .:? "lastPolicySyncTime")
<*> (o .:? "networkInfo")
<*> (o .:? "nonComplianceDetails" .!= mempty)
<*> (o .:? "softwareInfo")
<*> (o .:? "enrollmentTime")
<*> (o .:? "displays" .!= mempty))
instance ToJSON Device where
toJSON Device'{..}
= object
(catMaybes
[("memoryInfo" .=) <$> _devMemoryInfo,
("policyCompliant" .=) <$> _devPolicyCompliant,
("applicationReports" .=) <$> _devApplicationReports,
("policyName" .=) <$> _devPolicyName,
("state" .=) <$> _devState,
("appliedPolicyName" .=) <$> _devAppliedPolicyName,
("lastStatusReportTime" .=) <$>
_devLastStatusReportTime,
("deviceSettings" .=) <$> _devDeviceSettings,
("enrollmentTokenName" .=) <$>
_devEnrollmentTokenName,
("managementMode" .=) <$> _devManagementMode,
("hardwareInfo" .=) <$> _devHardwareInfo,
("powerManagementEvents" .=) <$>
_devPowerManagementEvents,
("userName" .=) <$> _devUserName,
("memoryEvents" .=) <$> _devMemoryEvents,
("apiLevel" .=) <$> _devAPILevel,
("user" .=) <$> _devUser,
("disabledReason" .=) <$> _devDisabledReason,
("lastPolicyComplianceReportTime" .=) <$>
_devLastPolicyComplianceReportTime,
("enrollmentTokenData" .=) <$>
_devEnrollmentTokenData,
("name" .=) <$> _devName,
("appliedPolicyVersion" .=) <$>
_devAppliedPolicyVersion,
("hardwareStatusSamples" .=) <$>
_devHardwareStatusSamples,
("appliedState" .=) <$> _devAppliedState,
("previousDeviceNames" .=) <$>
_devPreviousDeviceNames,
("lastPolicySyncTime" .=) <$> _devLastPolicySyncTime,
("networkInfo" .=) <$> _devNetworkInfo,
("nonComplianceDetails" .=) <$>
_devNonComplianceDetails,
("softwareInfo" .=) <$> _devSoftwareInfo,
("enrollmentTime" .=) <$> _devEnrollmentTime,
("displays" .=) <$> _devDisplays])
newtype StatusDetailsItem = StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem'
{ _sdiAddtional = _Coerce # pSdiAddtional_
}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
data ManagedPropertyEntry = ManagedPropertyEntry'
{ _mpeValue :: !(Maybe Text)
, _mpeName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedPropertyEntry
:: ManagedPropertyEntry
managedPropertyEntry =
ManagedPropertyEntry'
{ _mpeValue = Nothing
, _mpeName = Nothing
}
mpeValue :: Lens' ManagedPropertyEntry (Maybe Text)
mpeValue = lens _mpeValue (\ s a -> s{_mpeValue = a})
mpeName :: Lens' ManagedPropertyEntry (Maybe Text)
mpeName = lens _mpeName (\ s a -> s{_mpeName = a})
instance FromJSON ManagedPropertyEntry where
parseJSON
= withObject "ManagedPropertyEntry"
(\ o ->
ManagedPropertyEntry' <$>
(o .:? "value") <*> (o .:? "name"))
instance ToJSON ManagedPropertyEntry where
toJSON ManagedPropertyEntry'{..}
= object
(catMaybes
[("value" .=) <$> _mpeValue,
("name" .=) <$> _mpeName])
data ChoosePrivateKeyRule = ChoosePrivateKeyRule'
{ _cpkrPrivateKeyAlias :: !(Maybe Text)
, _cpkrURLPattern :: !(Maybe Text)
, _cpkrPackageNames :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
choosePrivateKeyRule
:: ChoosePrivateKeyRule
choosePrivateKeyRule =
ChoosePrivateKeyRule'
{ _cpkrPrivateKeyAlias = Nothing
, _cpkrURLPattern = Nothing
, _cpkrPackageNames = Nothing
}
cpkrPrivateKeyAlias :: Lens' ChoosePrivateKeyRule (Maybe Text)
cpkrPrivateKeyAlias
= lens _cpkrPrivateKeyAlias
(\ s a -> s{_cpkrPrivateKeyAlias = a})
cpkrURLPattern :: Lens' ChoosePrivateKeyRule (Maybe Text)
cpkrURLPattern
= lens _cpkrURLPattern
(\ s a -> s{_cpkrURLPattern = a})
cpkrPackageNames :: Lens' ChoosePrivateKeyRule [Text]
cpkrPackageNames
= lens _cpkrPackageNames
(\ s a -> s{_cpkrPackageNames = a})
. _Default
. _Coerce
instance FromJSON ChoosePrivateKeyRule where
parseJSON
= withObject "ChoosePrivateKeyRule"
(\ o ->
ChoosePrivateKeyRule' <$>
(o .:? "privateKeyAlias") <*> (o .:? "urlPattern")
<*> (o .:? "packageNames" .!= mempty))
instance ToJSON ChoosePrivateKeyRule where
toJSON ChoosePrivateKeyRule'{..}
= object
(catMaybes
[("privateKeyAlias" .=) <$> _cpkrPrivateKeyAlias,
("urlPattern" .=) <$> _cpkrURLPattern,
("packageNames" .=) <$> _cpkrPackageNames])
newtype UserFacingMessageLocalizedMessages = UserFacingMessageLocalizedMessages'
{ _ufmlmAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
userFacingMessageLocalizedMessages
:: HashMap Text Text
-> UserFacingMessageLocalizedMessages
userFacingMessageLocalizedMessages pUfmlmAddtional_ =
UserFacingMessageLocalizedMessages'
{ _ufmlmAddtional = _Coerce # pUfmlmAddtional_
}
ufmlmAddtional :: Lens' UserFacingMessageLocalizedMessages (HashMap Text Text)
ufmlmAddtional
= lens _ufmlmAddtional
(\ s a -> s{_ufmlmAddtional = a})
. _Coerce
instance FromJSON UserFacingMessageLocalizedMessages
where
parseJSON
= withObject "UserFacingMessageLocalizedMessages"
(\ o ->
UserFacingMessageLocalizedMessages' <$>
(parseJSONObject o))
instance ToJSON UserFacingMessageLocalizedMessages
where
toJSON = toJSON . _ufmlmAddtional
newtype User = User'
{ _uAccountIdentifier :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
user
:: User
user =
User'
{ _uAccountIdentifier = Nothing
}
uAccountIdentifier :: Lens' User (Maybe Text)
uAccountIdentifier
= lens _uAccountIdentifier
(\ s a -> s{_uAccountIdentifier = a})
instance FromJSON User where
parseJSON
= withObject "User"
(\ o -> User' <$> (o .:? "accountIdentifier"))
instance ToJSON User where
toJSON User'{..}
= object
(catMaybes
[("accountIdentifier" .=) <$> _uAccountIdentifier])
data SystemUpdate = SystemUpdate'
{ _suEndMinutes :: !(Maybe (Textual Int32))
, _suStartMinutes :: !(Maybe (Textual Int32))
, _suType :: !(Maybe SystemUpdateType)
} deriving (Eq,Show,Data,Typeable,Generic)
systemUpdate
:: SystemUpdate
systemUpdate =
SystemUpdate'
{ _suEndMinutes = Nothing
, _suStartMinutes = Nothing
, _suType = Nothing
}
suEndMinutes :: Lens' SystemUpdate (Maybe Int32)
suEndMinutes
= lens _suEndMinutes (\ s a -> s{_suEndMinutes = a})
. mapping _Coerce
suStartMinutes :: Lens' SystemUpdate (Maybe Int32)
suStartMinutes
= lens _suStartMinutes
(\ s a -> s{_suStartMinutes = a})
. mapping _Coerce
suType :: Lens' SystemUpdate (Maybe SystemUpdateType)
suType = lens _suType (\ s a -> s{_suType = a})
instance FromJSON SystemUpdate where
parseJSON
= withObject "SystemUpdate"
(\ o ->
SystemUpdate' <$>
(o .:? "endMinutes") <*> (o .:? "startMinutes") <*>
(o .:? "type"))
instance ToJSON SystemUpdate where
toJSON SystemUpdate'{..}
= object
(catMaybes
[("endMinutes" .=) <$> _suEndMinutes,
("startMinutes" .=) <$> _suStartMinutes,
("type" .=) <$> _suType])
data ApplicationReport = ApplicationReport'
{ _arVersionCode :: !(Maybe (Textual Int32))
, _arSigningKeyCertFingerprints :: !(Maybe [Text])
, _arState :: !(Maybe ApplicationReportState)
, _arVersionName :: !(Maybe Text)
, _arPackageName :: !(Maybe Text)
, _arPackageSha256Hash :: !(Maybe Text)
, _arApplicationSource :: !(Maybe ApplicationReportApplicationSource)
, _arEvents :: !(Maybe [ApplicationEvent])
, _arDisplayName :: !(Maybe Text)
, _arInstallerPackageName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
applicationReport
:: ApplicationReport
applicationReport =
ApplicationReport'
{ _arVersionCode = Nothing
, _arSigningKeyCertFingerprints = Nothing
, _arState = Nothing
, _arVersionName = Nothing
, _arPackageName = Nothing
, _arPackageSha256Hash = Nothing
, _arApplicationSource = Nothing
, _arEvents = Nothing
, _arDisplayName = Nothing
, _arInstallerPackageName = Nothing
}
arVersionCode :: Lens' ApplicationReport (Maybe Int32)
arVersionCode
= lens _arVersionCode
(\ s a -> s{_arVersionCode = a})
. mapping _Coerce
arSigningKeyCertFingerprints :: Lens' ApplicationReport [Text]
arSigningKeyCertFingerprints
= lens _arSigningKeyCertFingerprints
(\ s a -> s{_arSigningKeyCertFingerprints = a})
. _Default
. _Coerce
arState :: Lens' ApplicationReport (Maybe ApplicationReportState)
arState = lens _arState (\ s a -> s{_arState = a})
arVersionName :: Lens' ApplicationReport (Maybe Text)
arVersionName
= lens _arVersionName
(\ s a -> s{_arVersionName = a})
arPackageName :: Lens' ApplicationReport (Maybe Text)
arPackageName
= lens _arPackageName
(\ s a -> s{_arPackageName = a})
arPackageSha256Hash :: Lens' ApplicationReport (Maybe Text)
arPackageSha256Hash
= lens _arPackageSha256Hash
(\ s a -> s{_arPackageSha256Hash = a})
arApplicationSource :: Lens' ApplicationReport (Maybe ApplicationReportApplicationSource)
arApplicationSource
= lens _arApplicationSource
(\ s a -> s{_arApplicationSource = a})
arEvents :: Lens' ApplicationReport [ApplicationEvent]
arEvents
= lens _arEvents (\ s a -> s{_arEvents = a}) .
_Default
. _Coerce
arDisplayName :: Lens' ApplicationReport (Maybe Text)
arDisplayName
= lens _arDisplayName
(\ s a -> s{_arDisplayName = a})
arInstallerPackageName :: Lens' ApplicationReport (Maybe Text)
arInstallerPackageName
= lens _arInstallerPackageName
(\ s a -> s{_arInstallerPackageName = a})
instance FromJSON ApplicationReport where
parseJSON
= withObject "ApplicationReport"
(\ o ->
ApplicationReport' <$>
(o .:? "versionCode") <*>
(o .:? "signingKeyCertFingerprints" .!= mempty)
<*> (o .:? "state")
<*> (o .:? "versionName")
<*> (o .:? "packageName")
<*> (o .:? "packageSha256Hash")
<*> (o .:? "applicationSource")
<*> (o .:? "events" .!= mempty)
<*> (o .:? "displayName")
<*> (o .:? "installerPackageName"))
instance ToJSON ApplicationReport where
toJSON ApplicationReport'{..}
= object
(catMaybes
[("versionCode" .=) <$> _arVersionCode,
("signingKeyCertFingerprints" .=) <$>
_arSigningKeyCertFingerprints,
("state" .=) <$> _arState,
("versionName" .=) <$> _arVersionName,
("packageName" .=) <$> _arPackageName,
("packageSha256Hash" .=) <$> _arPackageSha256Hash,
("applicationSource" .=) <$> _arApplicationSource,
("events" .=) <$> _arEvents,
("displayName" .=) <$> _arDisplayName,
("installerPackageName" .=) <$>
_arInstallerPackageName])
data EnrollmentToken = EnrollmentToken'
{ _etPolicyName :: !(Maybe Text)
, _etValue :: !(Maybe Text)
, _etQrCode :: !(Maybe Text)
, _etAdditionalData :: !(Maybe Text)
, _etUser :: !(Maybe User)
, _etName :: !(Maybe Text)
, _etOneTimeOnly :: !(Maybe Bool)
, _etExpirationTimestamp :: !(Maybe DateTime')
, _etDuration :: !(Maybe GDuration)
} deriving (Eq,Show,Data,Typeable,Generic)
enrollmentToken
:: EnrollmentToken
enrollmentToken =
EnrollmentToken'
{ _etPolicyName = Nothing
, _etValue = Nothing
, _etQrCode = Nothing
, _etAdditionalData = Nothing
, _etUser = Nothing
, _etName = Nothing
, _etOneTimeOnly = Nothing
, _etExpirationTimestamp = Nothing
, _etDuration = Nothing
}
etPolicyName :: Lens' EnrollmentToken (Maybe Text)
etPolicyName
= lens _etPolicyName (\ s a -> s{_etPolicyName = a})
etValue :: Lens' EnrollmentToken (Maybe Text)
etValue = lens _etValue (\ s a -> s{_etValue = a})
etQrCode :: Lens' EnrollmentToken (Maybe Text)
etQrCode = lens _etQrCode (\ s a -> s{_etQrCode = a})
etAdditionalData :: Lens' EnrollmentToken (Maybe Text)
etAdditionalData
= lens _etAdditionalData
(\ s a -> s{_etAdditionalData = a})
etUser :: Lens' EnrollmentToken (Maybe User)
etUser = lens _etUser (\ s a -> s{_etUser = a})
etName :: Lens' EnrollmentToken (Maybe Text)
etName = lens _etName (\ s a -> s{_etName = a})
etOneTimeOnly :: Lens' EnrollmentToken (Maybe Bool)
etOneTimeOnly
= lens _etOneTimeOnly
(\ s a -> s{_etOneTimeOnly = a})
etExpirationTimestamp :: Lens' EnrollmentToken (Maybe UTCTime)
etExpirationTimestamp
= lens _etExpirationTimestamp
(\ s a -> s{_etExpirationTimestamp = a})
. mapping _DateTime
etDuration :: Lens' EnrollmentToken (Maybe Scientific)
etDuration
= lens _etDuration (\ s a -> s{_etDuration = a}) .
mapping _GDuration
instance FromJSON EnrollmentToken where
parseJSON
= withObject "EnrollmentToken"
(\ o ->
EnrollmentToken' <$>
(o .:? "policyName") <*> (o .:? "value") <*>
(o .:? "qrCode")
<*> (o .:? "additionalData")
<*> (o .:? "user")
<*> (o .:? "name")
<*> (o .:? "oneTimeOnly")
<*> (o .:? "expirationTimestamp")
<*> (o .:? "duration"))
instance ToJSON EnrollmentToken where
toJSON EnrollmentToken'{..}
= object
(catMaybes
[("policyName" .=) <$> _etPolicyName,
("value" .=) <$> _etValue,
("qrCode" .=) <$> _etQrCode,
("additionalData" .=) <$> _etAdditionalData,
("user" .=) <$> _etUser, ("name" .=) <$> _etName,
("oneTimeOnly" .=) <$> _etOneTimeOnly,
("expirationTimestamp" .=) <$>
_etExpirationTimestamp,
("duration" .=) <$> _etDuration])
newtype ApplicationPolicyManagedConfiguration = ApplicationPolicyManagedConfiguration'
{ _apmcAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
applicationPolicyManagedConfiguration
:: HashMap Text JSONValue
-> ApplicationPolicyManagedConfiguration
applicationPolicyManagedConfiguration pApmcAddtional_ =
ApplicationPolicyManagedConfiguration'
{ _apmcAddtional = _Coerce # pApmcAddtional_
}
apmcAddtional :: Lens' ApplicationPolicyManagedConfiguration (HashMap Text JSONValue)
apmcAddtional
= lens _apmcAddtional
(\ s a -> s{_apmcAddtional = a})
. _Coerce
instance FromJSON
ApplicationPolicyManagedConfiguration where
parseJSON
= withObject "ApplicationPolicyManagedConfiguration"
(\ o ->
ApplicationPolicyManagedConfiguration' <$>
(parseJSONObject o))
instance ToJSON ApplicationPolicyManagedConfiguration
where
toJSON = toJSON . _apmcAddtional
data StatusReportingSettings = StatusReportingSettings'
{ _srsSoftwareInfoEnabled :: !(Maybe Bool)
, _srsHardwareStatusEnabled :: !(Maybe Bool)
, _srsPowerManagementEventsEnabled :: !(Maybe Bool)
, _srsDisplayInfoEnabled :: !(Maybe Bool)
, _srsApplicationReportsEnabled :: !(Maybe Bool)
, _srsMemoryInfoEnabled :: !(Maybe Bool)
, _srsNetworkInfoEnabled :: !(Maybe Bool)
, _srsDeviceSettingsEnabled :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
statusReportingSettings
:: StatusReportingSettings
statusReportingSettings =
StatusReportingSettings'
{ _srsSoftwareInfoEnabled = Nothing
, _srsHardwareStatusEnabled = Nothing
, _srsPowerManagementEventsEnabled = Nothing
, _srsDisplayInfoEnabled = Nothing
, _srsApplicationReportsEnabled = Nothing
, _srsMemoryInfoEnabled = Nothing
, _srsNetworkInfoEnabled = Nothing
, _srsDeviceSettingsEnabled = Nothing
}
srsSoftwareInfoEnabled :: Lens' StatusReportingSettings (Maybe Bool)
srsSoftwareInfoEnabled
= lens _srsSoftwareInfoEnabled
(\ s a -> s{_srsSoftwareInfoEnabled = a})
srsHardwareStatusEnabled :: Lens' StatusReportingSettings (Maybe Bool)
srsHardwareStatusEnabled
= lens _srsHardwareStatusEnabled
(\ s a -> s{_srsHardwareStatusEnabled = a})
srsPowerManagementEventsEnabled :: Lens' StatusReportingSettings (Maybe Bool)
srsPowerManagementEventsEnabled
= lens _srsPowerManagementEventsEnabled
(\ s a -> s{_srsPowerManagementEventsEnabled = a})
srsDisplayInfoEnabled :: Lens' StatusReportingSettings (Maybe Bool)
srsDisplayInfoEnabled
= lens _srsDisplayInfoEnabled
(\ s a -> s{_srsDisplayInfoEnabled = a})
srsApplicationReportsEnabled :: Lens' StatusReportingSettings (Maybe Bool)
srsApplicationReportsEnabled
= lens _srsApplicationReportsEnabled
(\ s a -> s{_srsApplicationReportsEnabled = a})
srsMemoryInfoEnabled :: Lens' StatusReportingSettings (Maybe Bool)
srsMemoryInfoEnabled
= lens _srsMemoryInfoEnabled
(\ s a -> s{_srsMemoryInfoEnabled = a})
srsNetworkInfoEnabled :: Lens' StatusReportingSettings (Maybe Bool)
srsNetworkInfoEnabled
= lens _srsNetworkInfoEnabled
(\ s a -> s{_srsNetworkInfoEnabled = a})
srsDeviceSettingsEnabled :: Lens' StatusReportingSettings (Maybe Bool)
srsDeviceSettingsEnabled
= lens _srsDeviceSettingsEnabled
(\ s a -> s{_srsDeviceSettingsEnabled = a})
instance FromJSON StatusReportingSettings where
parseJSON
= withObject "StatusReportingSettings"
(\ o ->
StatusReportingSettings' <$>
(o .:? "softwareInfoEnabled") <*>
(o .:? "hardwareStatusEnabled")
<*> (o .:? "powerManagementEventsEnabled")
<*> (o .:? "displayInfoEnabled")
<*> (o .:? "applicationReportsEnabled")
<*> (o .:? "memoryInfoEnabled")
<*> (o .:? "networkInfoEnabled")
<*> (o .:? "deviceSettingsEnabled"))
instance ToJSON StatusReportingSettings where
toJSON StatusReportingSettings'{..}
= object
(catMaybes
[("softwareInfoEnabled" .=) <$>
_srsSoftwareInfoEnabled,
("hardwareStatusEnabled" .=) <$>
_srsHardwareStatusEnabled,
("powerManagementEventsEnabled" .=) <$>
_srsPowerManagementEventsEnabled,
("displayInfoEnabled" .=) <$> _srsDisplayInfoEnabled,
("applicationReportsEnabled" .=) <$>
_srsApplicationReportsEnabled,
("memoryInfoEnabled" .=) <$> _srsMemoryInfoEnabled,
("networkInfoEnabled" .=) <$> _srsNetworkInfoEnabled,
("deviceSettingsEnabled" .=) <$>
_srsDeviceSettingsEnabled])
data ApplicationPolicy = ApplicationPolicy'
{ _apDelegatedScopes :: !(Maybe [Text])
, _apPackageName :: !(Maybe Text)
, _apManagedConfiguration :: !(Maybe ApplicationPolicyManagedConfiguration)
, _apDefaultPermissionPolicy :: !(Maybe ApplicationPolicyDefaultPermissionPolicy)
, _apDisabled :: !(Maybe Bool)
, _apLockTaskAllowed :: !(Maybe Bool)
, _apPermissionGrants :: !(Maybe [PermissionGrant])
, _apManagedConfigurationTemplate :: !(Maybe ManagedConfigurationTemplate)
, _apMinimumVersionCode :: !(Maybe (Textual Int32))
, _apInstallType :: !(Maybe ApplicationPolicyInstallType)
} deriving (Eq,Show,Data,Typeable,Generic)
applicationPolicy
:: ApplicationPolicy
applicationPolicy =
ApplicationPolicy'
{ _apDelegatedScopes = Nothing
, _apPackageName = Nothing
, _apManagedConfiguration = Nothing
, _apDefaultPermissionPolicy = Nothing
, _apDisabled = Nothing
, _apLockTaskAllowed = Nothing
, _apPermissionGrants = Nothing
, _apManagedConfigurationTemplate = Nothing
, _apMinimumVersionCode = Nothing
, _apInstallType = Nothing
}
apDelegatedScopes :: Lens' ApplicationPolicy [Text]
apDelegatedScopes
= lens _apDelegatedScopes
(\ s a -> s{_apDelegatedScopes = a})
. _Default
. _Coerce
apPackageName :: Lens' ApplicationPolicy (Maybe Text)
apPackageName
= lens _apPackageName
(\ s a -> s{_apPackageName = a})
apManagedConfiguration :: Lens' ApplicationPolicy (Maybe ApplicationPolicyManagedConfiguration)
apManagedConfiguration
= lens _apManagedConfiguration
(\ s a -> s{_apManagedConfiguration = a})
apDefaultPermissionPolicy :: Lens' ApplicationPolicy (Maybe ApplicationPolicyDefaultPermissionPolicy)
apDefaultPermissionPolicy
= lens _apDefaultPermissionPolicy
(\ s a -> s{_apDefaultPermissionPolicy = a})
apDisabled :: Lens' ApplicationPolicy (Maybe Bool)
apDisabled
= lens _apDisabled (\ s a -> s{_apDisabled = a})
apLockTaskAllowed :: Lens' ApplicationPolicy (Maybe Bool)
apLockTaskAllowed
= lens _apLockTaskAllowed
(\ s a -> s{_apLockTaskAllowed = a})
apPermissionGrants :: Lens' ApplicationPolicy [PermissionGrant]
apPermissionGrants
= lens _apPermissionGrants
(\ s a -> s{_apPermissionGrants = a})
. _Default
. _Coerce
apManagedConfigurationTemplate :: Lens' ApplicationPolicy (Maybe ManagedConfigurationTemplate)
apManagedConfigurationTemplate
= lens _apManagedConfigurationTemplate
(\ s a -> s{_apManagedConfigurationTemplate = a})
apMinimumVersionCode :: Lens' ApplicationPolicy (Maybe Int32)
apMinimumVersionCode
= lens _apMinimumVersionCode
(\ s a -> s{_apMinimumVersionCode = a})
. mapping _Coerce
apInstallType :: Lens' ApplicationPolicy (Maybe ApplicationPolicyInstallType)
apInstallType
= lens _apInstallType
(\ s a -> s{_apInstallType = a})
instance FromJSON ApplicationPolicy where
parseJSON
= withObject "ApplicationPolicy"
(\ o ->
ApplicationPolicy' <$>
(o .:? "delegatedScopes" .!= mempty) <*>
(o .:? "packageName")
<*> (o .:? "managedConfiguration")
<*> (o .:? "defaultPermissionPolicy")
<*> (o .:? "disabled")
<*> (o .:? "lockTaskAllowed")
<*> (o .:? "permissionGrants" .!= mempty)
<*> (o .:? "managedConfigurationTemplate")
<*> (o .:? "minimumVersionCode")
<*> (o .:? "installType"))
instance ToJSON ApplicationPolicy where
toJSON ApplicationPolicy'{..}
= object
(catMaybes
[("delegatedScopes" .=) <$> _apDelegatedScopes,
("packageName" .=) <$> _apPackageName,
("managedConfiguration" .=) <$>
_apManagedConfiguration,
("defaultPermissionPolicy" .=) <$>
_apDefaultPermissionPolicy,
("disabled" .=) <$> _apDisabled,
("lockTaskAllowed" .=) <$> _apLockTaskAllowed,
("permissionGrants" .=) <$> _apPermissionGrants,
("managedConfigurationTemplate" .=) <$>
_apManagedConfigurationTemplate,
("minimumVersionCode" .=) <$> _apMinimumVersionCode,
("installType" .=) <$> _apInstallType])
data ListDevicesResponse = ListDevicesResponse'
{ _ldrNextPageToken :: !(Maybe Text)
, _ldrDevices :: !(Maybe [Device])
} deriving (Eq,Show,Data,Typeable,Generic)
listDevicesResponse
:: ListDevicesResponse
listDevicesResponse =
ListDevicesResponse'
{ _ldrNextPageToken = Nothing
, _ldrDevices = Nothing
}
ldrNextPageToken :: Lens' ListDevicesResponse (Maybe Text)
ldrNextPageToken
= lens _ldrNextPageToken
(\ s a -> s{_ldrNextPageToken = a})
ldrDevices :: Lens' ListDevicesResponse [Device]
ldrDevices
= lens _ldrDevices (\ s a -> s{_ldrDevices = a}) .
_Default
. _Coerce
instance FromJSON ListDevicesResponse where
parseJSON
= withObject "ListDevicesResponse"
(\ o ->
ListDevicesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "devices" .!= mempty))
instance ToJSON ListDevicesResponse where
toJSON ListDevicesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _ldrNextPageToken,
("devices" .=) <$> _ldrDevices])
data ManagedConfigurationTemplate = ManagedConfigurationTemplate'
{ _mctTemplateId :: !(Maybe Text)
, _mctConfigurationVariables :: !(Maybe ManagedConfigurationTemplateConfigurationVariables)
} deriving (Eq,Show,Data,Typeable,Generic)
managedConfigurationTemplate
:: ManagedConfigurationTemplate
managedConfigurationTemplate =
ManagedConfigurationTemplate'
{ _mctTemplateId = Nothing
, _mctConfigurationVariables = Nothing
}
mctTemplateId :: Lens' ManagedConfigurationTemplate (Maybe Text)
mctTemplateId
= lens _mctTemplateId
(\ s a -> s{_mctTemplateId = a})
mctConfigurationVariables :: Lens' ManagedConfigurationTemplate (Maybe ManagedConfigurationTemplateConfigurationVariables)
mctConfigurationVariables
= lens _mctConfigurationVariables
(\ s a -> s{_mctConfigurationVariables = a})
instance FromJSON ManagedConfigurationTemplate where
parseJSON
= withObject "ManagedConfigurationTemplate"
(\ o ->
ManagedConfigurationTemplate' <$>
(o .:? "templateId") <*>
(o .:? "configurationVariables"))
instance ToJSON ManagedConfigurationTemplate where
toJSON ManagedConfigurationTemplate'{..}
= object
(catMaybes
[("templateId" .=) <$> _mctTemplateId,
("configurationVariables" .=) <$>
_mctConfigurationVariables])
data Enterprise = Enterprise'
{ _eAppAutoApprovalEnabled :: !(Maybe Bool)
, _eEnabledNotificationTypes :: !(Maybe [Text])
, _eSigninDetails :: !(Maybe [SigninDetail])
, _eName :: !(Maybe Text)
, _ePubsubTopic :: !(Maybe Text)
, _eEnterpriseDisplayName :: !(Maybe Text)
, _eLogo :: !(Maybe ExternalData)
, _eTermsAndConditions :: !(Maybe [TermsAndConditions])
, _ePrimaryColor :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
enterprise
:: Enterprise
enterprise =
Enterprise'
{ _eAppAutoApprovalEnabled = Nothing
, _eEnabledNotificationTypes = Nothing
, _eSigninDetails = Nothing
, _eName = Nothing
, _ePubsubTopic = Nothing
, _eEnterpriseDisplayName = Nothing
, _eLogo = Nothing
, _eTermsAndConditions = Nothing
, _ePrimaryColor = Nothing
}
eAppAutoApprovalEnabled :: Lens' Enterprise (Maybe Bool)
eAppAutoApprovalEnabled
= lens _eAppAutoApprovalEnabled
(\ s a -> s{_eAppAutoApprovalEnabled = a})
eEnabledNotificationTypes :: Lens' Enterprise [Text]
eEnabledNotificationTypes
= lens _eEnabledNotificationTypes
(\ s a -> s{_eEnabledNotificationTypes = a})
. _Default
. _Coerce
eSigninDetails :: Lens' Enterprise [SigninDetail]
eSigninDetails
= lens _eSigninDetails
(\ s a -> s{_eSigninDetails = a})
. _Default
. _Coerce
eName :: Lens' Enterprise (Maybe Text)
eName = lens _eName (\ s a -> s{_eName = a})
ePubsubTopic :: Lens' Enterprise (Maybe Text)
ePubsubTopic
= lens _ePubsubTopic (\ s a -> s{_ePubsubTopic = a})
eEnterpriseDisplayName :: Lens' Enterprise (Maybe Text)
eEnterpriseDisplayName
= lens _eEnterpriseDisplayName
(\ s a -> s{_eEnterpriseDisplayName = a})
eLogo :: Lens' Enterprise (Maybe ExternalData)
eLogo = lens _eLogo (\ s a -> s{_eLogo = a})
eTermsAndConditions :: Lens' Enterprise [TermsAndConditions]
eTermsAndConditions
= lens _eTermsAndConditions
(\ s a -> s{_eTermsAndConditions = a})
. _Default
. _Coerce
ePrimaryColor :: Lens' Enterprise (Maybe Int32)
ePrimaryColor
= lens _ePrimaryColor
(\ s a -> s{_ePrimaryColor = a})
. mapping _Coerce
instance FromJSON Enterprise where
parseJSON
= withObject "Enterprise"
(\ o ->
Enterprise' <$>
(o .:? "appAutoApprovalEnabled") <*>
(o .:? "enabledNotificationTypes" .!= mempty)
<*> (o .:? "signinDetails" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "pubsubTopic")
<*> (o .:? "enterpriseDisplayName")
<*> (o .:? "logo")
<*> (o .:? "termsAndConditions" .!= mempty)
<*> (o .:? "primaryColor"))
instance ToJSON Enterprise where
toJSON Enterprise'{..}
= object
(catMaybes
[("appAutoApprovalEnabled" .=) <$>
_eAppAutoApprovalEnabled,
("enabledNotificationTypes" .=) <$>
_eEnabledNotificationTypes,
("signinDetails" .=) <$> _eSigninDetails,
("name" .=) <$> _eName,
("pubsubTopic" .=) <$> _ePubsubTopic,
("enterpriseDisplayName" .=) <$>
_eEnterpriseDisplayName,
("logo" .=) <$> _eLogo,
("termsAndConditions" .=) <$> _eTermsAndConditions,
("primaryColor" .=) <$> _ePrimaryColor])
data MemoryEvent = MemoryEvent'
{ _meByteCount :: !(Maybe (Textual Int64))
, _meEventType :: !(Maybe MemoryEventEventType)
, _meCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
memoryEvent
:: MemoryEvent
memoryEvent =
MemoryEvent'
{ _meByteCount = Nothing
, _meEventType = Nothing
, _meCreateTime = Nothing
}
meByteCount :: Lens' MemoryEvent (Maybe Int64)
meByteCount
= lens _meByteCount (\ s a -> s{_meByteCount = a}) .
mapping _Coerce
meEventType :: Lens' MemoryEvent (Maybe MemoryEventEventType)
meEventType
= lens _meEventType (\ s a -> s{_meEventType = a})
meCreateTime :: Lens' MemoryEvent (Maybe UTCTime)
meCreateTime
= lens _meCreateTime (\ s a -> s{_meCreateTime = a})
. mapping _DateTime
instance FromJSON MemoryEvent where
parseJSON
= withObject "MemoryEvent"
(\ o ->
MemoryEvent' <$>
(o .:? "byteCount") <*> (o .:? "eventType") <*>
(o .:? "createTime"))
instance ToJSON MemoryEvent where
toJSON MemoryEvent'{..}
= object
(catMaybes
[("byteCount" .=) <$> _meByteCount,
("eventType" .=) <$> _meEventType,
("createTime" .=) <$> _meCreateTime])
data PermissionGrant = PermissionGrant'
{ _pgPolicy :: !(Maybe PermissionGrantPolicy)
, _pgPermission :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
permissionGrant
:: PermissionGrant
permissionGrant =
PermissionGrant'
{ _pgPolicy = Nothing
, _pgPermission = Nothing
}
pgPolicy :: Lens' PermissionGrant (Maybe PermissionGrantPolicy)
pgPolicy = lens _pgPolicy (\ s a -> s{_pgPolicy = a})
pgPermission :: Lens' PermissionGrant (Maybe Text)
pgPermission
= lens _pgPermission (\ s a -> s{_pgPermission = a})
instance FromJSON PermissionGrant where
parseJSON
= withObject "PermissionGrant"
(\ o ->
PermissionGrant' <$>
(o .:? "policy") <*> (o .:? "permission"))
instance ToJSON PermissionGrant where
toJSON PermissionGrant'{..}
= object
(catMaybes
[("policy" .=) <$> _pgPolicy,
("permission" .=) <$> _pgPermission])
data SigninDetail = SigninDetail'
{ _sdSigninURL :: !(Maybe Text)
, _sdQrCode :: !(Maybe Text)
, _sdSigninEnrollmentToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
signinDetail
:: SigninDetail
signinDetail =
SigninDetail'
{ _sdSigninURL = Nothing
, _sdQrCode = Nothing
, _sdSigninEnrollmentToken = Nothing
}
sdSigninURL :: Lens' SigninDetail (Maybe Text)
sdSigninURL
= lens _sdSigninURL (\ s a -> s{_sdSigninURL = a})
sdQrCode :: Lens' SigninDetail (Maybe Text)
sdQrCode = lens _sdQrCode (\ s a -> s{_sdQrCode = a})
sdSigninEnrollmentToken :: Lens' SigninDetail (Maybe Text)
sdSigninEnrollmentToken
= lens _sdSigninEnrollmentToken
(\ s a -> s{_sdSigninEnrollmentToken = a})
instance FromJSON SigninDetail where
parseJSON
= withObject "SigninDetail"
(\ o ->
SigninDetail' <$>
(o .:? "signinUrl") <*> (o .:? "qrCode") <*>
(o .:? "signinEnrollmentToken"))
instance ToJSON SigninDetail where
toJSON SigninDetail'{..}
= object
(catMaybes
[("signinUrl" .=) <$> _sdSigninURL,
("qrCode" .=) <$> _sdQrCode,
("signinEnrollmentToken" .=) <$>
_sdSigninEnrollmentToken])
data SignupURL = SignupURL'
{ _suURL :: !(Maybe Text)
, _suName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
signupURL
:: SignupURL
signupURL =
SignupURL'
{ _suURL = Nothing
, _suName = Nothing
}
suURL :: Lens' SignupURL (Maybe Text)
suURL = lens _suURL (\ s a -> s{_suURL = a})
suName :: Lens' SignupURL (Maybe Text)
suName = lens _suName (\ s a -> s{_suName = a})
instance FromJSON SignupURL where
parseJSON
= withObject "SignupURL"
(\ o ->
SignupURL' <$> (o .:? "url") <*> (o .:? "name"))
instance ToJSON SignupURL where
toJSON SignupURL'{..}
= object
(catMaybes
[("url" .=) <$> _suURL, ("name" .=) <$> _suName])
data NetworkInfo = NetworkInfo'
{ _niNetworkOperatorName :: !(Maybe Text)
, _niMeid :: !(Maybe Text)
, _niImei :: !(Maybe Text)
, _niWifiMACAddress :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
networkInfo
:: NetworkInfo
networkInfo =
NetworkInfo'
{ _niNetworkOperatorName = Nothing
, _niMeid = Nothing
, _niImei = Nothing
, _niWifiMACAddress = Nothing
}
niNetworkOperatorName :: Lens' NetworkInfo (Maybe Text)
niNetworkOperatorName
= lens _niNetworkOperatorName
(\ s a -> s{_niNetworkOperatorName = a})
niMeid :: Lens' NetworkInfo (Maybe Text)
niMeid = lens _niMeid (\ s a -> s{_niMeid = a})
niImei :: Lens' NetworkInfo (Maybe Text)
niImei = lens _niImei (\ s a -> s{_niImei = a})
niWifiMACAddress :: Lens' NetworkInfo (Maybe Text)
niWifiMACAddress
= lens _niWifiMACAddress
(\ s a -> s{_niWifiMACAddress = a})
instance FromJSON NetworkInfo where
parseJSON
= withObject "NetworkInfo"
(\ o ->
NetworkInfo' <$>
(o .:? "networkOperatorName") <*> (o .:? "meid") <*>
(o .:? "imei")
<*> (o .:? "wifiMacAddress"))
instance ToJSON NetworkInfo where
toJSON NetworkInfo'{..}
= object
(catMaybes
[("networkOperatorName" .=) <$>
_niNetworkOperatorName,
("meid" .=) <$> _niMeid, ("imei" .=) <$> _niImei,
("wifiMacAddress" .=) <$> _niWifiMACAddress])
data PowerManagementEvent = PowerManagementEvent'
{ _pmeBatteryLevel :: !(Maybe (Textual Double))
, _pmeEventType :: !(Maybe PowerManagementEventEventType)
, _pmeCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
powerManagementEvent
:: PowerManagementEvent
powerManagementEvent =
PowerManagementEvent'
{ _pmeBatteryLevel = Nothing
, _pmeEventType = Nothing
, _pmeCreateTime = Nothing
}
pmeBatteryLevel :: Lens' PowerManagementEvent (Maybe Double)
pmeBatteryLevel
= lens _pmeBatteryLevel
(\ s a -> s{_pmeBatteryLevel = a})
. mapping _Coerce
pmeEventType :: Lens' PowerManagementEvent (Maybe PowerManagementEventEventType)
pmeEventType
= lens _pmeEventType (\ s a -> s{_pmeEventType = a})
pmeCreateTime :: Lens' PowerManagementEvent (Maybe UTCTime)
pmeCreateTime
= lens _pmeCreateTime
(\ s a -> s{_pmeCreateTime = a})
. mapping _DateTime
instance FromJSON PowerManagementEvent where
parseJSON
= withObject "PowerManagementEvent"
(\ o ->
PowerManagementEvent' <$>
(o .:? "batteryLevel") <*> (o .:? "eventType") <*>
(o .:? "createTime"))
instance ToJSON PowerManagementEvent where
toJSON PowerManagementEvent'{..}
= object
(catMaybes
[("batteryLevel" .=) <$> _pmeBatteryLevel,
("eventType" .=) <$> _pmeEventType,
("createTime" .=) <$> _pmeCreateTime])
data Policy = Policy'
{ _pBluetoothConfigDisabled :: !(Maybe Bool)
, _pUnmuteMicrophoneDisabled :: !(Maybe Bool)
, _pMountPhysicalMediaDisabled :: !(Maybe Bool)
, _pFrpAdminEmails :: !(Maybe [Text])
, _pAppAutoUpdatePolicy :: !(Maybe PolicyAppAutoUpdatePolicy)
, _pEncryptionPolicy :: !(Maybe PolicyEncryptionPolicy)
, _pAndroidDevicePolicyTracks :: !(Maybe [Text])
, _pSafeBootDisabled :: !(Maybe Bool)
, _pAlwaysOnVPNPackage :: !(Maybe AlwaysOnVPNPackage)
, _pChoosePrivateKeyRules :: !(Maybe [ChoosePrivateKeyRule])
, _pCredentialsConfigDisabled :: !(Maybe Bool)
, _pRecommendedGlobalProxy :: !(Maybe ProxyInfo)
, _pKeyguardDisabled :: !(Maybe Bool)
, _pSkipFirstUseHintsEnabled :: !(Maybe Bool)
, _pAdjustVolumeDisabled :: !(Maybe Bool)
, _pDefaultPermissionPolicy :: !(Maybe PolicyDefaultPermissionPolicy)
, _pUninstallAppsDisabled :: !(Maybe Bool)
, _pSetUserIconDisabled :: !(Maybe Bool)
, _pPermittedInputMethods :: !(Maybe PackageNameList)
, _pScreenCaptureDisabled :: !(Maybe Bool)
, _pAddUserDisabled :: !(Maybe Bool)
, _pShareLocationDisabled :: !(Maybe Bool)
, _pAutoTimeRequired :: !(Maybe Bool)
, _pInstallAppsDisabled :: !(Maybe Bool)
, _pCreateWindowsDisabled :: !(Maybe Bool)
, _pNetworkResetDisabled :: !(Maybe Bool)
, _pBluetoothContactSharingDisabled :: !(Maybe Bool)
, _pPermissionGrants :: !(Maybe [PermissionGrant])
, _pShortSupportMessage :: !(Maybe UserFacingMessage)
, _pStayOnPluggedModes :: !(Maybe [Text])
, _pDataRoamingDisabled :: !(Maybe Bool)
, _pDebuggingFeaturesAllowed :: !(Maybe Bool)
, _pKioskCustomLauncherEnabled :: !(Maybe Bool)
, _pWifiConfigsLockdownEnabled :: !(Maybe Bool)
, _pUsbMassStorageEnabled :: !(Maybe Bool)
, _pNetworkEscapeHatchEnabled :: !(Maybe Bool)
, _pSystemUpdate :: !(Maybe SystemUpdate)
, _pInstallUnknownSourcesAllowed :: !(Maybe Bool)
, _pName :: !(Maybe Text)
, _pPrivateKeySelectionEnabled :: !(Maybe Bool)
, _pOutgoingCallsDisabled :: !(Maybe Bool)
, _pStatusReportingSettings :: !(Maybe StatusReportingSettings)
, _pRemoveUserDisabled :: !(Maybe Bool)
, _pMobileNetworksConfigDisabled :: !(Maybe Bool)
, _pVersion :: !(Maybe (Textual Int64))
, _pEnsureVerifyAppsEnabled :: !(Maybe Bool)
, _pSetWallpaperDisabled :: !(Maybe Bool)
, _pVPNConfigDisabled :: !(Maybe Bool)
, _pOpenNetworkConfiguration :: !(Maybe PolicyOpenNetworkConfiguration)
, _pModifyAccountsDisabled :: !(Maybe Bool)
, _pBlockApplicationsEnabled :: !(Maybe Bool)
, _pKeyguardDisabledFeatures :: !(Maybe [Text])
, _pFunDisabled :: !(Maybe Bool)
, _pSmsDisabled :: !(Maybe Bool)
, _pMaximumTimeToLock :: !(Maybe (Textual Int64))
, _pOutgoingBeamDisabled :: !(Maybe Bool)
, _pStatusBarDisabled :: !(Maybe Bool)
, _pCellBroadcastsConfigDisabled :: !(Maybe Bool)
, _pDeviceOwnerLockScreenInfo :: !(Maybe UserFacingMessage)
, _pPlayStoreMode :: !(Maybe PolicyPlayStoreMode)
, _pComplianceRules :: !(Maybe [ComplianceRule])
, _pTetheringConfigDisabled :: !(Maybe Bool)
, _pAccountTypesWithManagementDisabled :: !(Maybe [Text])
, _pWifiConfigDisabled :: !(Maybe Bool)
, _pPersistentPreferredActivities :: !(Maybe [PersistentPreferredActivity])
, _pPasswordRequirements :: !(Maybe PasswordRequirements)
, _pLongSupportMessage :: !(Maybe UserFacingMessage)
, _pLocationMode :: !(Maybe PolicyLocationMode)
, _pBluetoothDisabled :: !(Maybe Bool)
, _pUsbFileTransferDisabled :: !(Maybe Bool)
, _pCameraDisabled :: !(Maybe Bool)
, _pApplications :: !(Maybe [ApplicationPolicy])
, _pPasswordPolicies :: !(Maybe [PasswordRequirements])
, _pFactoryResetDisabled :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
policy
:: Policy
policy =
Policy'
{ _pBluetoothConfigDisabled = Nothing
, _pUnmuteMicrophoneDisabled = Nothing
, _pMountPhysicalMediaDisabled = Nothing
, _pFrpAdminEmails = Nothing
, _pAppAutoUpdatePolicy = Nothing
, _pEncryptionPolicy = Nothing
, _pAndroidDevicePolicyTracks = Nothing
, _pSafeBootDisabled = Nothing
, _pAlwaysOnVPNPackage = Nothing
, _pChoosePrivateKeyRules = Nothing
, _pCredentialsConfigDisabled = Nothing
, _pRecommendedGlobalProxy = Nothing
, _pKeyguardDisabled = Nothing
, _pSkipFirstUseHintsEnabled = Nothing
, _pAdjustVolumeDisabled = Nothing
, _pDefaultPermissionPolicy = Nothing
, _pUninstallAppsDisabled = Nothing
, _pSetUserIconDisabled = Nothing
, _pPermittedInputMethods = Nothing
, _pScreenCaptureDisabled = Nothing
, _pAddUserDisabled = Nothing
, _pShareLocationDisabled = Nothing
, _pAutoTimeRequired = Nothing
, _pInstallAppsDisabled = Nothing
, _pCreateWindowsDisabled = Nothing
, _pNetworkResetDisabled = Nothing
, _pBluetoothContactSharingDisabled = Nothing
, _pPermissionGrants = Nothing
, _pShortSupportMessage = Nothing
, _pStayOnPluggedModes = Nothing
, _pDataRoamingDisabled = Nothing
, _pDebuggingFeaturesAllowed = Nothing
, _pKioskCustomLauncherEnabled = Nothing
, _pWifiConfigsLockdownEnabled = Nothing
, _pUsbMassStorageEnabled = Nothing
, _pNetworkEscapeHatchEnabled = Nothing
, _pSystemUpdate = Nothing
, _pInstallUnknownSourcesAllowed = Nothing
, _pName = Nothing
, _pPrivateKeySelectionEnabled = Nothing
, _pOutgoingCallsDisabled = Nothing
, _pStatusReportingSettings = Nothing
, _pRemoveUserDisabled = Nothing
, _pMobileNetworksConfigDisabled = Nothing
, _pVersion = Nothing
, _pEnsureVerifyAppsEnabled = Nothing
, _pSetWallpaperDisabled = Nothing
, _pVPNConfigDisabled = Nothing
, _pOpenNetworkConfiguration = Nothing
, _pModifyAccountsDisabled = Nothing
, _pBlockApplicationsEnabled = Nothing
, _pKeyguardDisabledFeatures = Nothing
, _pFunDisabled = Nothing
, _pSmsDisabled = Nothing
, _pMaximumTimeToLock = Nothing
, _pOutgoingBeamDisabled = Nothing
, _pStatusBarDisabled = Nothing
, _pCellBroadcastsConfigDisabled = Nothing
, _pDeviceOwnerLockScreenInfo = Nothing
, _pPlayStoreMode = Nothing
, _pComplianceRules = Nothing
, _pTetheringConfigDisabled = Nothing
, _pAccountTypesWithManagementDisabled = Nothing
, _pWifiConfigDisabled = Nothing
, _pPersistentPreferredActivities = Nothing
, _pPasswordRequirements = Nothing
, _pLongSupportMessage = Nothing
, _pLocationMode = Nothing
, _pBluetoothDisabled = Nothing
, _pUsbFileTransferDisabled = Nothing
, _pCameraDisabled = Nothing
, _pApplications = Nothing
, _pPasswordPolicies = Nothing
, _pFactoryResetDisabled = Nothing
}
pBluetoothConfigDisabled :: Lens' Policy (Maybe Bool)
pBluetoothConfigDisabled
= lens _pBluetoothConfigDisabled
(\ s a -> s{_pBluetoothConfigDisabled = a})
pUnmuteMicrophoneDisabled :: Lens' Policy (Maybe Bool)
pUnmuteMicrophoneDisabled
= lens _pUnmuteMicrophoneDisabled
(\ s a -> s{_pUnmuteMicrophoneDisabled = a})
pMountPhysicalMediaDisabled :: Lens' Policy (Maybe Bool)
pMountPhysicalMediaDisabled
= lens _pMountPhysicalMediaDisabled
(\ s a -> s{_pMountPhysicalMediaDisabled = a})
pFrpAdminEmails :: Lens' Policy [Text]
pFrpAdminEmails
= lens _pFrpAdminEmails
(\ s a -> s{_pFrpAdminEmails = a})
. _Default
. _Coerce
pAppAutoUpdatePolicy :: Lens' Policy (Maybe PolicyAppAutoUpdatePolicy)
pAppAutoUpdatePolicy
= lens _pAppAutoUpdatePolicy
(\ s a -> s{_pAppAutoUpdatePolicy = a})
pEncryptionPolicy :: Lens' Policy (Maybe PolicyEncryptionPolicy)
pEncryptionPolicy
= lens _pEncryptionPolicy
(\ s a -> s{_pEncryptionPolicy = a})
pAndroidDevicePolicyTracks :: Lens' Policy [Text]
pAndroidDevicePolicyTracks
= lens _pAndroidDevicePolicyTracks
(\ s a -> s{_pAndroidDevicePolicyTracks = a})
. _Default
. _Coerce
pSafeBootDisabled :: Lens' Policy (Maybe Bool)
pSafeBootDisabled
= lens _pSafeBootDisabled
(\ s a -> s{_pSafeBootDisabled = a})
pAlwaysOnVPNPackage :: Lens' Policy (Maybe AlwaysOnVPNPackage)
pAlwaysOnVPNPackage
= lens _pAlwaysOnVPNPackage
(\ s a -> s{_pAlwaysOnVPNPackage = a})
pChoosePrivateKeyRules :: Lens' Policy [ChoosePrivateKeyRule]
pChoosePrivateKeyRules
= lens _pChoosePrivateKeyRules
(\ s a -> s{_pChoosePrivateKeyRules = a})
. _Default
. _Coerce
pCredentialsConfigDisabled :: Lens' Policy (Maybe Bool)
pCredentialsConfigDisabled
= lens _pCredentialsConfigDisabled
(\ s a -> s{_pCredentialsConfigDisabled = a})
pRecommendedGlobalProxy :: Lens' Policy (Maybe ProxyInfo)
pRecommendedGlobalProxy
= lens _pRecommendedGlobalProxy
(\ s a -> s{_pRecommendedGlobalProxy = a})
pKeyguardDisabled :: Lens' Policy (Maybe Bool)
pKeyguardDisabled
= lens _pKeyguardDisabled
(\ s a -> s{_pKeyguardDisabled = a})
pSkipFirstUseHintsEnabled :: Lens' Policy (Maybe Bool)
pSkipFirstUseHintsEnabled
= lens _pSkipFirstUseHintsEnabled
(\ s a -> s{_pSkipFirstUseHintsEnabled = a})
pAdjustVolumeDisabled :: Lens' Policy (Maybe Bool)
pAdjustVolumeDisabled
= lens _pAdjustVolumeDisabled
(\ s a -> s{_pAdjustVolumeDisabled = a})
pDefaultPermissionPolicy :: Lens' Policy (Maybe PolicyDefaultPermissionPolicy)
pDefaultPermissionPolicy
= lens _pDefaultPermissionPolicy
(\ s a -> s{_pDefaultPermissionPolicy = a})
pUninstallAppsDisabled :: Lens' Policy (Maybe Bool)
pUninstallAppsDisabled
= lens _pUninstallAppsDisabled
(\ s a -> s{_pUninstallAppsDisabled = a})
pSetUserIconDisabled :: Lens' Policy (Maybe Bool)
pSetUserIconDisabled
= lens _pSetUserIconDisabled
(\ s a -> s{_pSetUserIconDisabled = a})
pPermittedInputMethods :: Lens' Policy (Maybe PackageNameList)
pPermittedInputMethods
= lens _pPermittedInputMethods
(\ s a -> s{_pPermittedInputMethods = a})
pScreenCaptureDisabled :: Lens' Policy (Maybe Bool)
pScreenCaptureDisabled
= lens _pScreenCaptureDisabled
(\ s a -> s{_pScreenCaptureDisabled = a})
pAddUserDisabled :: Lens' Policy (Maybe Bool)
pAddUserDisabled
= lens _pAddUserDisabled
(\ s a -> s{_pAddUserDisabled = a})
pShareLocationDisabled :: Lens' Policy (Maybe Bool)
pShareLocationDisabled
= lens _pShareLocationDisabled
(\ s a -> s{_pShareLocationDisabled = a})
pAutoTimeRequired :: Lens' Policy (Maybe Bool)
pAutoTimeRequired
= lens _pAutoTimeRequired
(\ s a -> s{_pAutoTimeRequired = a})
pInstallAppsDisabled :: Lens' Policy (Maybe Bool)
pInstallAppsDisabled
= lens _pInstallAppsDisabled
(\ s a -> s{_pInstallAppsDisabled = a})
pCreateWindowsDisabled :: Lens' Policy (Maybe Bool)
pCreateWindowsDisabled
= lens _pCreateWindowsDisabled
(\ s a -> s{_pCreateWindowsDisabled = a})
pNetworkResetDisabled :: Lens' Policy (Maybe Bool)
pNetworkResetDisabled
= lens _pNetworkResetDisabled
(\ s a -> s{_pNetworkResetDisabled = a})
pBluetoothContactSharingDisabled :: Lens' Policy (Maybe Bool)
pBluetoothContactSharingDisabled
= lens _pBluetoothContactSharingDisabled
(\ s a -> s{_pBluetoothContactSharingDisabled = a})
pPermissionGrants :: Lens' Policy [PermissionGrant]
pPermissionGrants
= lens _pPermissionGrants
(\ s a -> s{_pPermissionGrants = a})
. _Default
. _Coerce
pShortSupportMessage :: Lens' Policy (Maybe UserFacingMessage)
pShortSupportMessage
= lens _pShortSupportMessage
(\ s a -> s{_pShortSupportMessage = a})
pStayOnPluggedModes :: Lens' Policy [Text]
pStayOnPluggedModes
= lens _pStayOnPluggedModes
(\ s a -> s{_pStayOnPluggedModes = a})
. _Default
. _Coerce
pDataRoamingDisabled :: Lens' Policy (Maybe Bool)
pDataRoamingDisabled
= lens _pDataRoamingDisabled
(\ s a -> s{_pDataRoamingDisabled = a})
pDebuggingFeaturesAllowed :: Lens' Policy (Maybe Bool)
pDebuggingFeaturesAllowed
= lens _pDebuggingFeaturesAllowed
(\ s a -> s{_pDebuggingFeaturesAllowed = a})
pKioskCustomLauncherEnabled :: Lens' Policy (Maybe Bool)
pKioskCustomLauncherEnabled
= lens _pKioskCustomLauncherEnabled
(\ s a -> s{_pKioskCustomLauncherEnabled = a})
pWifiConfigsLockdownEnabled :: Lens' Policy (Maybe Bool)
pWifiConfigsLockdownEnabled
= lens _pWifiConfigsLockdownEnabled
(\ s a -> s{_pWifiConfigsLockdownEnabled = a})
pUsbMassStorageEnabled :: Lens' Policy (Maybe Bool)
pUsbMassStorageEnabled
= lens _pUsbMassStorageEnabled
(\ s a -> s{_pUsbMassStorageEnabled = a})
pNetworkEscapeHatchEnabled :: Lens' Policy (Maybe Bool)
pNetworkEscapeHatchEnabled
= lens _pNetworkEscapeHatchEnabled
(\ s a -> s{_pNetworkEscapeHatchEnabled = a})
pSystemUpdate :: Lens' Policy (Maybe SystemUpdate)
pSystemUpdate
= lens _pSystemUpdate
(\ s a -> s{_pSystemUpdate = a})
pInstallUnknownSourcesAllowed :: Lens' Policy (Maybe Bool)
pInstallUnknownSourcesAllowed
= lens _pInstallUnknownSourcesAllowed
(\ s a -> s{_pInstallUnknownSourcesAllowed = a})
pName :: Lens' Policy (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a})
pPrivateKeySelectionEnabled :: Lens' Policy (Maybe Bool)
pPrivateKeySelectionEnabled
= lens _pPrivateKeySelectionEnabled
(\ s a -> s{_pPrivateKeySelectionEnabled = a})
pOutgoingCallsDisabled :: Lens' Policy (Maybe Bool)
pOutgoingCallsDisabled
= lens _pOutgoingCallsDisabled
(\ s a -> s{_pOutgoingCallsDisabled = a})
pStatusReportingSettings :: Lens' Policy (Maybe StatusReportingSettings)
pStatusReportingSettings
= lens _pStatusReportingSettings
(\ s a -> s{_pStatusReportingSettings = a})
pRemoveUserDisabled :: Lens' Policy (Maybe Bool)
pRemoveUserDisabled
= lens _pRemoveUserDisabled
(\ s a -> s{_pRemoveUserDisabled = a})
pMobileNetworksConfigDisabled :: Lens' Policy (Maybe Bool)
pMobileNetworksConfigDisabled
= lens _pMobileNetworksConfigDisabled
(\ s a -> s{_pMobileNetworksConfigDisabled = a})
pVersion :: Lens' Policy (Maybe Int64)
pVersion
= lens _pVersion (\ s a -> s{_pVersion = a}) .
mapping _Coerce
pEnsureVerifyAppsEnabled :: Lens' Policy (Maybe Bool)
pEnsureVerifyAppsEnabled
= lens _pEnsureVerifyAppsEnabled
(\ s a -> s{_pEnsureVerifyAppsEnabled = a})
pSetWallpaperDisabled :: Lens' Policy (Maybe Bool)
pSetWallpaperDisabled
= lens _pSetWallpaperDisabled
(\ s a -> s{_pSetWallpaperDisabled = a})
pVPNConfigDisabled :: Lens' Policy (Maybe Bool)
pVPNConfigDisabled
= lens _pVPNConfigDisabled
(\ s a -> s{_pVPNConfigDisabled = a})
pOpenNetworkConfiguration :: Lens' Policy (Maybe PolicyOpenNetworkConfiguration)
pOpenNetworkConfiguration
= lens _pOpenNetworkConfiguration
(\ s a -> s{_pOpenNetworkConfiguration = a})
pModifyAccountsDisabled :: Lens' Policy (Maybe Bool)
pModifyAccountsDisabled
= lens _pModifyAccountsDisabled
(\ s a -> s{_pModifyAccountsDisabled = a})
pBlockApplicationsEnabled :: Lens' Policy (Maybe Bool)
pBlockApplicationsEnabled
= lens _pBlockApplicationsEnabled
(\ s a -> s{_pBlockApplicationsEnabled = a})
pKeyguardDisabledFeatures :: Lens' Policy [Text]
pKeyguardDisabledFeatures
= lens _pKeyguardDisabledFeatures
(\ s a -> s{_pKeyguardDisabledFeatures = a})
. _Default
. _Coerce
pFunDisabled :: Lens' Policy (Maybe Bool)
pFunDisabled
= lens _pFunDisabled (\ s a -> s{_pFunDisabled = a})
pSmsDisabled :: Lens' Policy (Maybe Bool)
pSmsDisabled
= lens _pSmsDisabled (\ s a -> s{_pSmsDisabled = a})
pMaximumTimeToLock :: Lens' Policy (Maybe Int64)
pMaximumTimeToLock
= lens _pMaximumTimeToLock
(\ s a -> s{_pMaximumTimeToLock = a})
. mapping _Coerce
pOutgoingBeamDisabled :: Lens' Policy (Maybe Bool)
pOutgoingBeamDisabled
= lens _pOutgoingBeamDisabled
(\ s a -> s{_pOutgoingBeamDisabled = a})
pStatusBarDisabled :: Lens' Policy (Maybe Bool)
pStatusBarDisabled
= lens _pStatusBarDisabled
(\ s a -> s{_pStatusBarDisabled = a})
pCellBroadcastsConfigDisabled :: Lens' Policy (Maybe Bool)
pCellBroadcastsConfigDisabled
= lens _pCellBroadcastsConfigDisabled
(\ s a -> s{_pCellBroadcastsConfigDisabled = a})
pDeviceOwnerLockScreenInfo :: Lens' Policy (Maybe UserFacingMessage)
pDeviceOwnerLockScreenInfo
= lens _pDeviceOwnerLockScreenInfo
(\ s a -> s{_pDeviceOwnerLockScreenInfo = a})
pPlayStoreMode :: Lens' Policy (Maybe PolicyPlayStoreMode)
pPlayStoreMode
= lens _pPlayStoreMode
(\ s a -> s{_pPlayStoreMode = a})
pComplianceRules :: Lens' Policy [ComplianceRule]
pComplianceRules
= lens _pComplianceRules
(\ s a -> s{_pComplianceRules = a})
. _Default
. _Coerce
pTetheringConfigDisabled :: Lens' Policy (Maybe Bool)
pTetheringConfigDisabled
= lens _pTetheringConfigDisabled
(\ s a -> s{_pTetheringConfigDisabled = a})
pAccountTypesWithManagementDisabled :: Lens' Policy [Text]
pAccountTypesWithManagementDisabled
= lens _pAccountTypesWithManagementDisabled
(\ s a ->
s{_pAccountTypesWithManagementDisabled = a})
. _Default
. _Coerce
pWifiConfigDisabled :: Lens' Policy (Maybe Bool)
pWifiConfigDisabled
= lens _pWifiConfigDisabled
(\ s a -> s{_pWifiConfigDisabled = a})
pPersistentPreferredActivities :: Lens' Policy [PersistentPreferredActivity]
pPersistentPreferredActivities
= lens _pPersistentPreferredActivities
(\ s a -> s{_pPersistentPreferredActivities = a})
. _Default
. _Coerce
pPasswordRequirements :: Lens' Policy (Maybe PasswordRequirements)
pPasswordRequirements
= lens _pPasswordRequirements
(\ s a -> s{_pPasswordRequirements = a})
pLongSupportMessage :: Lens' Policy (Maybe UserFacingMessage)
pLongSupportMessage
= lens _pLongSupportMessage
(\ s a -> s{_pLongSupportMessage = a})
pLocationMode :: Lens' Policy (Maybe PolicyLocationMode)
pLocationMode
= lens _pLocationMode
(\ s a -> s{_pLocationMode = a})
pBluetoothDisabled :: Lens' Policy (Maybe Bool)
pBluetoothDisabled
= lens _pBluetoothDisabled
(\ s a -> s{_pBluetoothDisabled = a})
pUsbFileTransferDisabled :: Lens' Policy (Maybe Bool)
pUsbFileTransferDisabled
= lens _pUsbFileTransferDisabled
(\ s a -> s{_pUsbFileTransferDisabled = a})
pCameraDisabled :: Lens' Policy (Maybe Bool)
pCameraDisabled
= lens _pCameraDisabled
(\ s a -> s{_pCameraDisabled = a})
pApplications :: Lens' Policy [ApplicationPolicy]
pApplications
= lens _pApplications
(\ s a -> s{_pApplications = a})
. _Default
. _Coerce
pPasswordPolicies :: Lens' Policy [PasswordRequirements]
pPasswordPolicies
= lens _pPasswordPolicies
(\ s a -> s{_pPasswordPolicies = a})
. _Default
. _Coerce
pFactoryResetDisabled :: Lens' Policy (Maybe Bool)
pFactoryResetDisabled
= lens _pFactoryResetDisabled
(\ s a -> s{_pFactoryResetDisabled = a})
instance FromJSON Policy where
parseJSON
= withObject "Policy"
(\ o ->
Policy' <$>
(o .:? "bluetoothConfigDisabled") <*>
(o .:? "unmuteMicrophoneDisabled")
<*> (o .:? "mountPhysicalMediaDisabled")
<*> (o .:? "frpAdminEmails" .!= mempty)
<*> (o .:? "appAutoUpdatePolicy")
<*> (o .:? "encryptionPolicy")
<*> (o .:? "androidDevicePolicyTracks" .!= mempty)
<*> (o .:? "safeBootDisabled")
<*> (o .:? "alwaysOnVpnPackage")
<*> (o .:? "choosePrivateKeyRules" .!= mempty)
<*> (o .:? "credentialsConfigDisabled")
<*> (o .:? "recommendedGlobalProxy")
<*> (o .:? "keyguardDisabled")
<*> (o .:? "skipFirstUseHintsEnabled")
<*> (o .:? "adjustVolumeDisabled")
<*> (o .:? "defaultPermissionPolicy")
<*> (o .:? "uninstallAppsDisabled")
<*> (o .:? "setUserIconDisabled")
<*> (o .:? "permittedInputMethods")
<*> (o .:? "screenCaptureDisabled")
<*> (o .:? "addUserDisabled")
<*> (o .:? "shareLocationDisabled")
<*> (o .:? "autoTimeRequired")
<*> (o .:? "installAppsDisabled")
<*> (o .:? "createWindowsDisabled")
<*> (o .:? "networkResetDisabled")
<*> (o .:? "bluetoothContactSharingDisabled")
<*> (o .:? "permissionGrants" .!= mempty)
<*> (o .:? "shortSupportMessage")
<*> (o .:? "stayOnPluggedModes" .!= mempty)
<*> (o .:? "dataRoamingDisabled")
<*> (o .:? "debuggingFeaturesAllowed")
<*> (o .:? "kioskCustomLauncherEnabled")
<*> (o .:? "wifiConfigsLockdownEnabled")
<*> (o .:? "usbMassStorageEnabled")
<*> (o .:? "networkEscapeHatchEnabled")
<*> (o .:? "systemUpdate")
<*> (o .:? "installUnknownSourcesAllowed")
<*> (o .:? "name")
<*> (o .:? "privateKeySelectionEnabled")
<*> (o .:? "outgoingCallsDisabled")
<*> (o .:? "statusReportingSettings")
<*> (o .:? "removeUserDisabled")
<*> (o .:? "mobileNetworksConfigDisabled")
<*> (o .:? "version")
<*> (o .:? "ensureVerifyAppsEnabled")
<*> (o .:? "setWallpaperDisabled")
<*> (o .:? "vpnConfigDisabled")
<*> (o .:? "openNetworkConfiguration")
<*> (o .:? "modifyAccountsDisabled")
<*> (o .:? "blockApplicationsEnabled")
<*> (o .:? "keyguardDisabledFeatures" .!= mempty)
<*> (o .:? "funDisabled")
<*> (o .:? "smsDisabled")
<*> (o .:? "maximumTimeToLock")
<*> (o .:? "outgoingBeamDisabled")
<*> (o .:? "statusBarDisabled")
<*> (o .:? "cellBroadcastsConfigDisabled")
<*> (o .:? "deviceOwnerLockScreenInfo")
<*> (o .:? "playStoreMode")
<*> (o .:? "complianceRules" .!= mempty)
<*> (o .:? "tetheringConfigDisabled")
<*>
(o .:? "accountTypesWithManagementDisabled" .!=
mempty)
<*> (o .:? "wifiConfigDisabled")
<*>
(o .:? "persistentPreferredActivities" .!= mempty)
<*> (o .:? "passwordRequirements")
<*> (o .:? "longSupportMessage")
<*> (o .:? "locationMode")
<*> (o .:? "bluetoothDisabled")
<*> (o .:? "usbFileTransferDisabled")
<*> (o .:? "cameraDisabled")
<*> (o .:? "applications" .!= mempty)
<*> (o .:? "passwordPolicies" .!= mempty)
<*> (o .:? "factoryResetDisabled"))
instance ToJSON Policy where
toJSON Policy'{..}
= object
(catMaybes
[("bluetoothConfigDisabled" .=) <$>
_pBluetoothConfigDisabled,
("unmuteMicrophoneDisabled" .=) <$>
_pUnmuteMicrophoneDisabled,
("mountPhysicalMediaDisabled" .=) <$>
_pMountPhysicalMediaDisabled,
("frpAdminEmails" .=) <$> _pFrpAdminEmails,
("appAutoUpdatePolicy" .=) <$> _pAppAutoUpdatePolicy,
("encryptionPolicy" .=) <$> _pEncryptionPolicy,
("androidDevicePolicyTracks" .=) <$>
_pAndroidDevicePolicyTracks,
("safeBootDisabled" .=) <$> _pSafeBootDisabled,
("alwaysOnVpnPackage" .=) <$> _pAlwaysOnVPNPackage,
("choosePrivateKeyRules" .=) <$>
_pChoosePrivateKeyRules,
("credentialsConfigDisabled" .=) <$>
_pCredentialsConfigDisabled,
("recommendedGlobalProxy" .=) <$>
_pRecommendedGlobalProxy,
("keyguardDisabled" .=) <$> _pKeyguardDisabled,
("skipFirstUseHintsEnabled" .=) <$>
_pSkipFirstUseHintsEnabled,
("adjustVolumeDisabled" .=) <$>
_pAdjustVolumeDisabled,
("defaultPermissionPolicy" .=) <$>
_pDefaultPermissionPolicy,
("uninstallAppsDisabled" .=) <$>
_pUninstallAppsDisabled,
("setUserIconDisabled" .=) <$> _pSetUserIconDisabled,
("permittedInputMethods" .=) <$>
_pPermittedInputMethods,
("screenCaptureDisabled" .=) <$>
_pScreenCaptureDisabled,
("addUserDisabled" .=) <$> _pAddUserDisabled,
("shareLocationDisabled" .=) <$>
_pShareLocationDisabled,
("autoTimeRequired" .=) <$> _pAutoTimeRequired,
("installAppsDisabled" .=) <$> _pInstallAppsDisabled,
("createWindowsDisabled" .=) <$>
_pCreateWindowsDisabled,
("networkResetDisabled" .=) <$>
_pNetworkResetDisabled,
("bluetoothContactSharingDisabled" .=) <$>
_pBluetoothContactSharingDisabled,
("permissionGrants" .=) <$> _pPermissionGrants,
("shortSupportMessage" .=) <$> _pShortSupportMessage,
("stayOnPluggedModes" .=) <$> _pStayOnPluggedModes,
("dataRoamingDisabled" .=) <$> _pDataRoamingDisabled,
("debuggingFeaturesAllowed" .=) <$>
_pDebuggingFeaturesAllowed,
("kioskCustomLauncherEnabled" .=) <$>
_pKioskCustomLauncherEnabled,
("wifiConfigsLockdownEnabled" .=) <$>
_pWifiConfigsLockdownEnabled,
("usbMassStorageEnabled" .=) <$>
_pUsbMassStorageEnabled,
("networkEscapeHatchEnabled" .=) <$>
_pNetworkEscapeHatchEnabled,
("systemUpdate" .=) <$> _pSystemUpdate,
("installUnknownSourcesAllowed" .=) <$>
_pInstallUnknownSourcesAllowed,
("name" .=) <$> _pName,
("privateKeySelectionEnabled" .=) <$>
_pPrivateKeySelectionEnabled,
("outgoingCallsDisabled" .=) <$>
_pOutgoingCallsDisabled,
("statusReportingSettings" .=) <$>
_pStatusReportingSettings,
("removeUserDisabled" .=) <$> _pRemoveUserDisabled,
("mobileNetworksConfigDisabled" .=) <$>
_pMobileNetworksConfigDisabled,
("version" .=) <$> _pVersion,
("ensureVerifyAppsEnabled" .=) <$>
_pEnsureVerifyAppsEnabled,
("setWallpaperDisabled" .=) <$>
_pSetWallpaperDisabled,
("vpnConfigDisabled" .=) <$> _pVPNConfigDisabled,
("openNetworkConfiguration" .=) <$>
_pOpenNetworkConfiguration,
("modifyAccountsDisabled" .=) <$>
_pModifyAccountsDisabled,
("blockApplicationsEnabled" .=) <$>
_pBlockApplicationsEnabled,
("keyguardDisabledFeatures" .=) <$>
_pKeyguardDisabledFeatures,
("funDisabled" .=) <$> _pFunDisabled,
("smsDisabled" .=) <$> _pSmsDisabled,
("maximumTimeToLock" .=) <$> _pMaximumTimeToLock,
("outgoingBeamDisabled" .=) <$>
_pOutgoingBeamDisabled,
("statusBarDisabled" .=) <$> _pStatusBarDisabled,
("cellBroadcastsConfigDisabled" .=) <$>
_pCellBroadcastsConfigDisabled,
("deviceOwnerLockScreenInfo" .=) <$>
_pDeviceOwnerLockScreenInfo,
("playStoreMode" .=) <$> _pPlayStoreMode,
("complianceRules" .=) <$> _pComplianceRules,
("tetheringConfigDisabled" .=) <$>
_pTetheringConfigDisabled,
("accountTypesWithManagementDisabled" .=) <$>
_pAccountTypesWithManagementDisabled,
("wifiConfigDisabled" .=) <$> _pWifiConfigDisabled,
("persistentPreferredActivities" .=) <$>
_pPersistentPreferredActivities,
("passwordRequirements" .=) <$>
_pPasswordRequirements,
("longSupportMessage" .=) <$> _pLongSupportMessage,
("locationMode" .=) <$> _pLocationMode,
("bluetoothDisabled" .=) <$> _pBluetoothDisabled,
("usbFileTransferDisabled" .=) <$>
_pUsbFileTransferDisabled,
("cameraDisabled" .=) <$> _pCameraDisabled,
("applications" .=) <$> _pApplications,
("passwordPolicies" .=) <$> _pPasswordPolicies,
("factoryResetDisabled" .=) <$>
_pFactoryResetDisabled])
data NonComplianceDetailCondition = NonComplianceDetailCondition'
{ _ncdcPackageName :: !(Maybe Text)
, _ncdcNonComplianceReason :: !(Maybe NonComplianceDetailConditionNonComplianceReason)
, _ncdcSettingName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
nonComplianceDetailCondition
:: NonComplianceDetailCondition
nonComplianceDetailCondition =
NonComplianceDetailCondition'
{ _ncdcPackageName = Nothing
, _ncdcNonComplianceReason = Nothing
, _ncdcSettingName = Nothing
}
ncdcPackageName :: Lens' NonComplianceDetailCondition (Maybe Text)
ncdcPackageName
= lens _ncdcPackageName
(\ s a -> s{_ncdcPackageName = a})
ncdcNonComplianceReason :: Lens' NonComplianceDetailCondition (Maybe NonComplianceDetailConditionNonComplianceReason)
ncdcNonComplianceReason
= lens _ncdcNonComplianceReason
(\ s a -> s{_ncdcNonComplianceReason = a})
ncdcSettingName :: Lens' NonComplianceDetailCondition (Maybe Text)
ncdcSettingName
= lens _ncdcSettingName
(\ s a -> s{_ncdcSettingName = a})
instance FromJSON NonComplianceDetailCondition where
parseJSON
= withObject "NonComplianceDetailCondition"
(\ o ->
NonComplianceDetailCondition' <$>
(o .:? "packageName") <*>
(o .:? "nonComplianceReason")
<*> (o .:? "settingName"))
instance ToJSON NonComplianceDetailCondition where
toJSON NonComplianceDetailCondition'{..}
= object
(catMaybes
[("packageName" .=) <$> _ncdcPackageName,
("nonComplianceReason" .=) <$>
_ncdcNonComplianceReason,
("settingName" .=) <$> _ncdcSettingName])
newtype OperationMetadata = OperationMetadata'
{ _omAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadata
:: HashMap Text JSONValue
-> OperationMetadata
operationMetadata pOmAddtional_ =
OperationMetadata'
{ _omAddtional = _Coerce # pOmAddtional_
}
omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
omAddtional
= lens _omAddtional (\ s a -> s{_omAddtional = a}) .
_Coerce
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o -> OperationMetadata' <$> (parseJSONObject o))
instance ToJSON OperationMetadata where
toJSON = toJSON . _omAddtional
data WebToken = WebToken'
{ _wtParentFrameURL :: !(Maybe Text)
, _wtValue :: !(Maybe Text)
, _wtName :: !(Maybe Text)
, _wtPermissions :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
webToken
:: WebToken
webToken =
WebToken'
{ _wtParentFrameURL = Nothing
, _wtValue = Nothing
, _wtName = Nothing
, _wtPermissions = Nothing
}
wtParentFrameURL :: Lens' WebToken (Maybe Text)
wtParentFrameURL
= lens _wtParentFrameURL
(\ s a -> s{_wtParentFrameURL = a})
wtValue :: Lens' WebToken (Maybe Text)
wtValue = lens _wtValue (\ s a -> s{_wtValue = a})
wtName :: Lens' WebToken (Maybe Text)
wtName = lens _wtName (\ s a -> s{_wtName = a})
wtPermissions :: Lens' WebToken [Text]
wtPermissions
= lens _wtPermissions
(\ s a -> s{_wtPermissions = a})
. _Default
. _Coerce
instance FromJSON WebToken where
parseJSON
= withObject "WebToken"
(\ o ->
WebToken' <$>
(o .:? "parentFrameUrl") <*> (o .:? "value") <*>
(o .:? "name")
<*> (o .:? "permissions" .!= mempty))
instance ToJSON WebToken where
toJSON WebToken'{..}
= object
(catMaybes
[("parentFrameUrl" .=) <$> _wtParentFrameURL,
("value" .=) <$> _wtValue, ("name" .=) <$> _wtName,
("permissions" .=) <$> _wtPermissions])
data ComplianceRule = ComplianceRule'
{ _crAPILevelCondition :: !(Maybe APILevelCondition)
, _crDisableApps :: !(Maybe Bool)
, _crPackageNamesToDisable :: !(Maybe [Text])
, _crNonComplianceDetailCondition :: !(Maybe NonComplianceDetailCondition)
} deriving (Eq,Show,Data,Typeable,Generic)
complianceRule
:: ComplianceRule
complianceRule =
ComplianceRule'
{ _crAPILevelCondition = Nothing
, _crDisableApps = Nothing
, _crPackageNamesToDisable = Nothing
, _crNonComplianceDetailCondition = Nothing
}
crAPILevelCondition :: Lens' ComplianceRule (Maybe APILevelCondition)
crAPILevelCondition
= lens _crAPILevelCondition
(\ s a -> s{_crAPILevelCondition = a})
crDisableApps :: Lens' ComplianceRule (Maybe Bool)
crDisableApps
= lens _crDisableApps
(\ s a -> s{_crDisableApps = a})
crPackageNamesToDisable :: Lens' ComplianceRule [Text]
crPackageNamesToDisable
= lens _crPackageNamesToDisable
(\ s a -> s{_crPackageNamesToDisable = a})
. _Default
. _Coerce
crNonComplianceDetailCondition :: Lens' ComplianceRule (Maybe NonComplianceDetailCondition)
crNonComplianceDetailCondition
= lens _crNonComplianceDetailCondition
(\ s a -> s{_crNonComplianceDetailCondition = a})
instance FromJSON ComplianceRule where
parseJSON
= withObject "ComplianceRule"
(\ o ->
ComplianceRule' <$>
(o .:? "apiLevelCondition") <*> (o .:? "disableApps")
<*> (o .:? "packageNamesToDisable" .!= mempty)
<*> (o .:? "nonComplianceDetailCondition"))
instance ToJSON ComplianceRule where
toJSON ComplianceRule'{..}
= object
(catMaybes
[("apiLevelCondition" .=) <$> _crAPILevelCondition,
("disableApps" .=) <$> _crDisableApps,
("packageNamesToDisable" .=) <$>
_crPackageNamesToDisable,
("nonComplianceDetailCondition" .=) <$>
_crNonComplianceDetailCondition])
data PasswordRequirements = PasswordRequirements'
{ _prPasswordMinimumSymbols :: !(Maybe (Textual Int32))
, _prMaximumFailedPasswordsForWipe :: !(Maybe (Textual Int32))
, _prPasswordExpirationTimeout :: !(Maybe GDuration)
, _prPasswordMinimumNonLetter :: !(Maybe (Textual Int32))
, _prPasswordHistoryLength :: !(Maybe (Textual Int32))
, _prPasswordMinimumLetters :: !(Maybe (Textual Int32))
, _prPasswordMinimumUpperCase :: !(Maybe (Textual Int32))
, _prPasswordMinimumNumeric :: !(Maybe (Textual Int32))
, _prPasswordQuality :: !(Maybe PasswordRequirementsPasswordQuality)
, _prPasswordMinimumLength :: !(Maybe (Textual Int32))
, _prPasswordScope :: !(Maybe PasswordRequirementsPasswordScope)
, _prPasswordMinimumLowerCase :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
passwordRequirements
:: PasswordRequirements
passwordRequirements =
PasswordRequirements'
{ _prPasswordMinimumSymbols = Nothing
, _prMaximumFailedPasswordsForWipe = Nothing
, _prPasswordExpirationTimeout = Nothing
, _prPasswordMinimumNonLetter = Nothing
, _prPasswordHistoryLength = Nothing
, _prPasswordMinimumLetters = Nothing
, _prPasswordMinimumUpperCase = Nothing
, _prPasswordMinimumNumeric = Nothing
, _prPasswordQuality = Nothing
, _prPasswordMinimumLength = Nothing
, _prPasswordScope = Nothing
, _prPasswordMinimumLowerCase = Nothing
}
prPasswordMinimumSymbols :: Lens' PasswordRequirements (Maybe Int32)
prPasswordMinimumSymbols
= lens _prPasswordMinimumSymbols
(\ s a -> s{_prPasswordMinimumSymbols = a})
. mapping _Coerce
prMaximumFailedPasswordsForWipe :: Lens' PasswordRequirements (Maybe Int32)
prMaximumFailedPasswordsForWipe
= lens _prMaximumFailedPasswordsForWipe
(\ s a -> s{_prMaximumFailedPasswordsForWipe = a})
. mapping _Coerce
prPasswordExpirationTimeout :: Lens' PasswordRequirements (Maybe Scientific)
prPasswordExpirationTimeout
= lens _prPasswordExpirationTimeout
(\ s a -> s{_prPasswordExpirationTimeout = a})
. mapping _GDuration
prPasswordMinimumNonLetter :: Lens' PasswordRequirements (Maybe Int32)
prPasswordMinimumNonLetter
= lens _prPasswordMinimumNonLetter
(\ s a -> s{_prPasswordMinimumNonLetter = a})
. mapping _Coerce
prPasswordHistoryLength :: Lens' PasswordRequirements (Maybe Int32)
prPasswordHistoryLength
= lens _prPasswordHistoryLength
(\ s a -> s{_prPasswordHistoryLength = a})
. mapping _Coerce
prPasswordMinimumLetters :: Lens' PasswordRequirements (Maybe Int32)
prPasswordMinimumLetters
= lens _prPasswordMinimumLetters
(\ s a -> s{_prPasswordMinimumLetters = a})
. mapping _Coerce
prPasswordMinimumUpperCase :: Lens' PasswordRequirements (Maybe Int32)
prPasswordMinimumUpperCase
= lens _prPasswordMinimumUpperCase
(\ s a -> s{_prPasswordMinimumUpperCase = a})
. mapping _Coerce
prPasswordMinimumNumeric :: Lens' PasswordRequirements (Maybe Int32)
prPasswordMinimumNumeric
= lens _prPasswordMinimumNumeric
(\ s a -> s{_prPasswordMinimumNumeric = a})
. mapping _Coerce
prPasswordQuality :: Lens' PasswordRequirements (Maybe PasswordRequirementsPasswordQuality)
prPasswordQuality
= lens _prPasswordQuality
(\ s a -> s{_prPasswordQuality = a})
prPasswordMinimumLength :: Lens' PasswordRequirements (Maybe Int32)
prPasswordMinimumLength
= lens _prPasswordMinimumLength
(\ s a -> s{_prPasswordMinimumLength = a})
. mapping _Coerce
prPasswordScope :: Lens' PasswordRequirements (Maybe PasswordRequirementsPasswordScope)
prPasswordScope
= lens _prPasswordScope
(\ s a -> s{_prPasswordScope = a})
prPasswordMinimumLowerCase :: Lens' PasswordRequirements (Maybe Int32)
prPasswordMinimumLowerCase
= lens _prPasswordMinimumLowerCase
(\ s a -> s{_prPasswordMinimumLowerCase = a})
. mapping _Coerce
instance FromJSON PasswordRequirements where
parseJSON
= withObject "PasswordRequirements"
(\ o ->
PasswordRequirements' <$>
(o .:? "passwordMinimumSymbols") <*>
(o .:? "maximumFailedPasswordsForWipe")
<*> (o .:? "passwordExpirationTimeout")
<*> (o .:? "passwordMinimumNonLetter")
<*> (o .:? "passwordHistoryLength")
<*> (o .:? "passwordMinimumLetters")
<*> (o .:? "passwordMinimumUpperCase")
<*> (o .:? "passwordMinimumNumeric")
<*> (o .:? "passwordQuality")
<*> (o .:? "passwordMinimumLength")
<*> (o .:? "passwordScope")
<*> (o .:? "passwordMinimumLowerCase"))
instance ToJSON PasswordRequirements where
toJSON PasswordRequirements'{..}
= object
(catMaybes
[("passwordMinimumSymbols" .=) <$>
_prPasswordMinimumSymbols,
("maximumFailedPasswordsForWipe" .=) <$>
_prMaximumFailedPasswordsForWipe,
("passwordExpirationTimeout" .=) <$>
_prPasswordExpirationTimeout,
("passwordMinimumNonLetter" .=) <$>
_prPasswordMinimumNonLetter,
("passwordHistoryLength" .=) <$>
_prPasswordHistoryLength,
("passwordMinimumLetters" .=) <$>
_prPasswordMinimumLetters,
("passwordMinimumUpperCase" .=) <$>
_prPasswordMinimumUpperCase,
("passwordMinimumNumeric" .=) <$>
_prPasswordMinimumNumeric,
("passwordQuality" .=) <$> _prPasswordQuality,
("passwordMinimumLength" .=) <$>
_prPasswordMinimumLength,
("passwordScope" .=) <$> _prPasswordScope,
("passwordMinimumLowerCase" .=) <$>
_prPasswordMinimumLowerCase])
data NonComplianceDetail = NonComplianceDetail'
{ _ncdFieldPath :: !(Maybe Text)
, _ncdPackageName :: !(Maybe Text)
, _ncdInstallationFailureReason :: !(Maybe NonComplianceDetailInstallationFailureReason)
, _ncdNonComplianceReason :: !(Maybe NonComplianceDetailNonComplianceReason)
, _ncdSettingName :: !(Maybe Text)
, _ncdCurrentValue :: !(Maybe JSONValue)
} deriving (Eq,Show,Data,Typeable,Generic)
nonComplianceDetail
:: NonComplianceDetail
nonComplianceDetail =
NonComplianceDetail'
{ _ncdFieldPath = Nothing
, _ncdPackageName = Nothing
, _ncdInstallationFailureReason = Nothing
, _ncdNonComplianceReason = Nothing
, _ncdSettingName = Nothing
, _ncdCurrentValue = Nothing
}
ncdFieldPath :: Lens' NonComplianceDetail (Maybe Text)
ncdFieldPath
= lens _ncdFieldPath (\ s a -> s{_ncdFieldPath = a})
ncdPackageName :: Lens' NonComplianceDetail (Maybe Text)
ncdPackageName
= lens _ncdPackageName
(\ s a -> s{_ncdPackageName = a})
ncdInstallationFailureReason :: Lens' NonComplianceDetail (Maybe NonComplianceDetailInstallationFailureReason)
ncdInstallationFailureReason
= lens _ncdInstallationFailureReason
(\ s a -> s{_ncdInstallationFailureReason = a})
ncdNonComplianceReason :: Lens' NonComplianceDetail (Maybe NonComplianceDetailNonComplianceReason)
ncdNonComplianceReason
= lens _ncdNonComplianceReason
(\ s a -> s{_ncdNonComplianceReason = a})
ncdSettingName :: Lens' NonComplianceDetail (Maybe Text)
ncdSettingName
= lens _ncdSettingName
(\ s a -> s{_ncdSettingName = a})
ncdCurrentValue :: Lens' NonComplianceDetail (Maybe JSONValue)
ncdCurrentValue
= lens _ncdCurrentValue
(\ s a -> s{_ncdCurrentValue = a})
instance FromJSON NonComplianceDetail where
parseJSON
= withObject "NonComplianceDetail"
(\ o ->
NonComplianceDetail' <$>
(o .:? "fieldPath") <*> (o .:? "packageName") <*>
(o .:? "installationFailureReason")
<*> (o .:? "nonComplianceReason")
<*> (o .:? "settingName")
<*> (o .:? "currentValue"))
instance ToJSON NonComplianceDetail where
toJSON NonComplianceDetail'{..}
= object
(catMaybes
[("fieldPath" .=) <$> _ncdFieldPath,
("packageName" .=) <$> _ncdPackageName,
("installationFailureReason" .=) <$>
_ncdInstallationFailureReason,
("nonComplianceReason" .=) <$>
_ncdNonComplianceReason,
("settingName" .=) <$> _ncdSettingName,
("currentValue" .=) <$> _ncdCurrentValue])
data ApplicationEvent = ApplicationEvent'
{ _aeEventType :: !(Maybe ApplicationEventEventType)
, _aeCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
applicationEvent
:: ApplicationEvent
applicationEvent =
ApplicationEvent'
{ _aeEventType = Nothing
, _aeCreateTime = Nothing
}
aeEventType :: Lens' ApplicationEvent (Maybe ApplicationEventEventType)
aeEventType
= lens _aeEventType (\ s a -> s{_aeEventType = a})
aeCreateTime :: Lens' ApplicationEvent (Maybe UTCTime)
aeCreateTime
= lens _aeCreateTime (\ s a -> s{_aeCreateTime = a})
. mapping _DateTime
instance FromJSON ApplicationEvent where
parseJSON
= withObject "ApplicationEvent"
(\ o ->
ApplicationEvent' <$>
(o .:? "eventType") <*> (o .:? "createTime"))
instance ToJSON ApplicationEvent where
toJSON ApplicationEvent'{..}
= object
(catMaybes
[("eventType" .=) <$> _aeEventType,
("createTime" .=) <$> _aeCreateTime])
data TermsAndConditions = TermsAndConditions'
{ _tacContent :: !(Maybe UserFacingMessage)
, _tacHeader :: !(Maybe UserFacingMessage)
} deriving (Eq,Show,Data,Typeable,Generic)
termsAndConditions
:: TermsAndConditions
termsAndConditions =
TermsAndConditions'
{ _tacContent = Nothing
, _tacHeader = Nothing
}
tacContent :: Lens' TermsAndConditions (Maybe UserFacingMessage)
tacContent
= lens _tacContent (\ s a -> s{_tacContent = a})
tacHeader :: Lens' TermsAndConditions (Maybe UserFacingMessage)
tacHeader
= lens _tacHeader (\ s a -> s{_tacHeader = a})
instance FromJSON TermsAndConditions where
parseJSON
= withObject "TermsAndConditions"
(\ o ->
TermsAndConditions' <$>
(o .:? "content") <*> (o .:? "header"))
instance ToJSON TermsAndConditions where
toJSON TermsAndConditions'{..}
= object
(catMaybes
[("content" .=) <$> _tacContent,
("header" .=) <$> _tacHeader])
newtype OperationResponse = OperationResponse'
{ _orAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationResponse
:: HashMap Text JSONValue
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse'
{ _orAddtional = _Coerce # pOrAddtional_
}
orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
orAddtional
= lens _orAddtional (\ s a -> s{_orAddtional = a}) .
_Coerce
instance FromJSON OperationResponse where
parseJSON
= withObject "OperationResponse"
(\ o -> OperationResponse' <$> (parseJSONObject o))
instance ToJSON OperationResponse where
toJSON = toJSON . _orAddtional
data UserFacingMessage = UserFacingMessage'
{ _ufmLocalizedMessages :: !(Maybe UserFacingMessageLocalizedMessages)
, _ufmDefaultMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userFacingMessage
:: UserFacingMessage
userFacingMessage =
UserFacingMessage'
{ _ufmLocalizedMessages = Nothing
, _ufmDefaultMessage = Nothing
}
ufmLocalizedMessages :: Lens' UserFacingMessage (Maybe UserFacingMessageLocalizedMessages)
ufmLocalizedMessages
= lens _ufmLocalizedMessages
(\ s a -> s{_ufmLocalizedMessages = a})
ufmDefaultMessage :: Lens' UserFacingMessage (Maybe Text)
ufmDefaultMessage
= lens _ufmDefaultMessage
(\ s a -> s{_ufmDefaultMessage = a})
instance FromJSON UserFacingMessage where
parseJSON
= withObject "UserFacingMessage"
(\ o ->
UserFacingMessage' <$>
(o .:? "localizedMessages") <*>
(o .:? "defaultMessage"))
instance ToJSON UserFacingMessage where
toJSON UserFacingMessage'{..}
= object
(catMaybes
[("localizedMessages" .=) <$> _ufmLocalizedMessages,
("defaultMessage" .=) <$> _ufmDefaultMessage])
data SoftwareInfo = SoftwareInfo'
{ _siSecurityPatchLevel :: !(Maybe Text)
, _siAndroidDevicePolicyVersionName :: !(Maybe Text)
, _siDeviceKernelVersion :: !(Maybe Text)
, _siAndroidDevicePolicyVersionCode :: !(Maybe (Textual Int32))
, _siDeviceBuildSignature :: !(Maybe Text)
, _siBootLoaderVersion :: !(Maybe Text)
, _siAndroidBuildTime :: !(Maybe DateTime')
, _siPrimaryLanguageCode :: !(Maybe Text)
, _siAndroidBuildNumber :: !(Maybe Text)
, _siAndroidVersion :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
softwareInfo
:: SoftwareInfo
softwareInfo =
SoftwareInfo'
{ _siSecurityPatchLevel = Nothing
, _siAndroidDevicePolicyVersionName = Nothing
, _siDeviceKernelVersion = Nothing
, _siAndroidDevicePolicyVersionCode = Nothing
, _siDeviceBuildSignature = Nothing
, _siBootLoaderVersion = Nothing
, _siAndroidBuildTime = Nothing
, _siPrimaryLanguageCode = Nothing
, _siAndroidBuildNumber = Nothing
, _siAndroidVersion = Nothing
}
siSecurityPatchLevel :: Lens' SoftwareInfo (Maybe Text)
siSecurityPatchLevel
= lens _siSecurityPatchLevel
(\ s a -> s{_siSecurityPatchLevel = a})
siAndroidDevicePolicyVersionName :: Lens' SoftwareInfo (Maybe Text)
siAndroidDevicePolicyVersionName
= lens _siAndroidDevicePolicyVersionName
(\ s a -> s{_siAndroidDevicePolicyVersionName = a})
siDeviceKernelVersion :: Lens' SoftwareInfo (Maybe Text)
siDeviceKernelVersion
= lens _siDeviceKernelVersion
(\ s a -> s{_siDeviceKernelVersion = a})
siAndroidDevicePolicyVersionCode :: Lens' SoftwareInfo (Maybe Int32)
siAndroidDevicePolicyVersionCode
= lens _siAndroidDevicePolicyVersionCode
(\ s a -> s{_siAndroidDevicePolicyVersionCode = a})
. mapping _Coerce
siDeviceBuildSignature :: Lens' SoftwareInfo (Maybe Text)
siDeviceBuildSignature
= lens _siDeviceBuildSignature
(\ s a -> s{_siDeviceBuildSignature = a})
siBootLoaderVersion :: Lens' SoftwareInfo (Maybe Text)
siBootLoaderVersion
= lens _siBootLoaderVersion
(\ s a -> s{_siBootLoaderVersion = a})
siAndroidBuildTime :: Lens' SoftwareInfo (Maybe UTCTime)
siAndroidBuildTime
= lens _siAndroidBuildTime
(\ s a -> s{_siAndroidBuildTime = a})
. mapping _DateTime
siPrimaryLanguageCode :: Lens' SoftwareInfo (Maybe Text)
siPrimaryLanguageCode
= lens _siPrimaryLanguageCode
(\ s a -> s{_siPrimaryLanguageCode = a})
siAndroidBuildNumber :: Lens' SoftwareInfo (Maybe Text)
siAndroidBuildNumber
= lens _siAndroidBuildNumber
(\ s a -> s{_siAndroidBuildNumber = a})
siAndroidVersion :: Lens' SoftwareInfo (Maybe Text)
siAndroidVersion
= lens _siAndroidVersion
(\ s a -> s{_siAndroidVersion = a})
instance FromJSON SoftwareInfo where
parseJSON
= withObject "SoftwareInfo"
(\ o ->
SoftwareInfo' <$>
(o .:? "securityPatchLevel") <*>
(o .:? "androidDevicePolicyVersionName")
<*> (o .:? "deviceKernelVersion")
<*> (o .:? "androidDevicePolicyVersionCode")
<*> (o .:? "deviceBuildSignature")
<*> (o .:? "bootloaderVersion")
<*> (o .:? "androidBuildTime")
<*> (o .:? "primaryLanguageCode")
<*> (o .:? "androidBuildNumber")
<*> (o .:? "androidVersion"))
instance ToJSON SoftwareInfo where
toJSON SoftwareInfo'{..}
= object
(catMaybes
[("securityPatchLevel" .=) <$> _siSecurityPatchLevel,
("androidDevicePolicyVersionName" .=) <$>
_siAndroidDevicePolicyVersionName,
("deviceKernelVersion" .=) <$>
_siDeviceKernelVersion,
("androidDevicePolicyVersionCode" .=) <$>
_siAndroidDevicePolicyVersionCode,
("deviceBuildSignature" .=) <$>
_siDeviceBuildSignature,
("bootloaderVersion" .=) <$> _siBootLoaderVersion,
("androidBuildTime" .=) <$> _siAndroidBuildTime,
("primaryLanguageCode" .=) <$>
_siPrimaryLanguageCode,
("androidBuildNumber" .=) <$> _siAndroidBuildNumber,
("androidVersion" .=) <$> _siAndroidVersion])
data ApplicationPermission = ApplicationPermission'
{ _apName :: !(Maybe Text)
, _apDescription :: !(Maybe Text)
, _apPermissionId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
applicationPermission
:: ApplicationPermission
applicationPermission =
ApplicationPermission'
{ _apName = Nothing
, _apDescription = Nothing
, _apPermissionId = Nothing
}
apName :: Lens' ApplicationPermission (Maybe Text)
apName = lens _apName (\ s a -> s{_apName = a})
apDescription :: Lens' ApplicationPermission (Maybe Text)
apDescription
= lens _apDescription
(\ s a -> s{_apDescription = a})
apPermissionId :: Lens' ApplicationPermission (Maybe Text)
apPermissionId
= lens _apPermissionId
(\ s a -> s{_apPermissionId = a})
instance FromJSON ApplicationPermission where
parseJSON
= withObject "ApplicationPermission"
(\ o ->
ApplicationPermission' <$>
(o .:? "name") <*> (o .:? "description") <*>
(o .:? "permissionId"))
instance ToJSON ApplicationPermission where
toJSON ApplicationPermission'{..}
= object
(catMaybes
[("name" .=) <$> _apName,
("description" .=) <$> _apDescription,
("permissionId" .=) <$> _apPermissionId])