{-# 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.AndroidEnterprise.Types.Product where
import Network.Google.AndroidEnterprise.Types.Sum
import Network.Google.Prelude
data GroupLicense = GroupLicense'
{ _glKind :: !Text
, _glNumProvisioned :: !(Maybe (Textual Int32))
, _glNumPurchased :: !(Maybe (Textual Int32))
, _glApproval :: !(Maybe Text)
, _glPermissions :: !(Maybe Text)
, _glProductId :: !(Maybe Text)
, _glAcquisitionKind :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
groupLicense
:: GroupLicense
groupLicense =
GroupLicense'
{ _glKind = "androidenterprise#groupLicense"
, _glNumProvisioned = Nothing
, _glNumPurchased = Nothing
, _glApproval = Nothing
, _glPermissions = Nothing
, _glProductId = Nothing
, _glAcquisitionKind = Nothing
}
glKind :: Lens' GroupLicense Text
glKind = lens _glKind (\ s a -> s{_glKind = a})
glNumProvisioned :: Lens' GroupLicense (Maybe Int32)
glNumProvisioned
= lens _glNumProvisioned
(\ s a -> s{_glNumProvisioned = a})
. mapping _Coerce
glNumPurchased :: Lens' GroupLicense (Maybe Int32)
glNumPurchased
= lens _glNumPurchased
(\ s a -> s{_glNumPurchased = a})
. mapping _Coerce
glApproval :: Lens' GroupLicense (Maybe Text)
glApproval
= lens _glApproval (\ s a -> s{_glApproval = a})
glPermissions :: Lens' GroupLicense (Maybe Text)
glPermissions
= lens _glPermissions
(\ s a -> s{_glPermissions = a})
glProductId :: Lens' GroupLicense (Maybe Text)
glProductId
= lens _glProductId (\ s a -> s{_glProductId = a})
glAcquisitionKind :: Lens' GroupLicense (Maybe Text)
glAcquisitionKind
= lens _glAcquisitionKind
(\ s a -> s{_glAcquisitionKind = a})
instance FromJSON GroupLicense where
parseJSON
= withObject "GroupLicense"
(\ o ->
GroupLicense' <$>
(o .:? "kind" .!= "androidenterprise#groupLicense")
<*> (o .:? "numProvisioned")
<*> (o .:? "numPurchased")
<*> (o .:? "approval")
<*> (o .:? "permissions")
<*> (o .:? "productId")
<*> (o .:? "acquisitionKind"))
instance ToJSON GroupLicense where
toJSON GroupLicense'{..}
= object
(catMaybes
[Just ("kind" .= _glKind),
("numProvisioned" .=) <$> _glNumProvisioned,
("numPurchased" .=) <$> _glNumPurchased,
("approval" .=) <$> _glApproval,
("permissions" .=) <$> _glPermissions,
("productId" .=) <$> _glProductId,
("acquisitionKind" .=) <$> _glAcquisitionKind])
data StoreLayoutPagesListResponse = StoreLayoutPagesListResponse'
{ _slplrKind :: !Text
, _slplrPage :: !(Maybe [StorePage])
} deriving (Eq,Show,Data,Typeable,Generic)
storeLayoutPagesListResponse
:: StoreLayoutPagesListResponse
storeLayoutPagesListResponse =
StoreLayoutPagesListResponse'
{ _slplrKind = "androidenterprise#storeLayoutPagesListResponse"
, _slplrPage = Nothing
}
slplrKind :: Lens' StoreLayoutPagesListResponse Text
slplrKind
= lens _slplrKind (\ s a -> s{_slplrKind = a})
slplrPage :: Lens' StoreLayoutPagesListResponse [StorePage]
slplrPage
= lens _slplrPage (\ s a -> s{_slplrPage = a}) .
_Default
. _Coerce
instance FromJSON StoreLayoutPagesListResponse where
parseJSON
= withObject "StoreLayoutPagesListResponse"
(\ o ->
StoreLayoutPagesListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#storeLayoutPagesListResponse")
<*> (o .:? "page" .!= mempty))
instance ToJSON StoreLayoutPagesListResponse where
toJSON StoreLayoutPagesListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _slplrKind),
("page" .=) <$> _slplrPage])
data EnterpriseAccount = EnterpriseAccount'
{ _eaKind :: !Text
, _eaAccountEmail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
enterpriseAccount
:: EnterpriseAccount
enterpriseAccount =
EnterpriseAccount'
{ _eaKind = "androidenterprise#enterpriseAccount"
, _eaAccountEmail = Nothing
}
eaKind :: Lens' EnterpriseAccount Text
eaKind = lens _eaKind (\ s a -> s{_eaKind = a})
eaAccountEmail :: Lens' EnterpriseAccount (Maybe Text)
eaAccountEmail
= lens _eaAccountEmail
(\ s a -> s{_eaAccountEmail = a})
instance FromJSON EnterpriseAccount where
parseJSON
= withObject "EnterpriseAccount"
(\ o ->
EnterpriseAccount' <$>
(o .:? "kind" .!=
"androidenterprise#enterpriseAccount")
<*> (o .:? "accountEmail"))
instance ToJSON EnterpriseAccount where
toJSON EnterpriseAccount'{..}
= object
(catMaybes
[Just ("kind" .= _eaKind),
("accountEmail" .=) <$> _eaAccountEmail])
data AppRestrictionsSchemaRestrictionRestrictionValue = AppRestrictionsSchemaRestrictionRestrictionValue'
{ _arsrrvValueMultiselect :: !(Maybe [Text])
, _arsrrvValueBool :: !(Maybe Bool)
, _arsrrvValueInteger :: !(Maybe (Textual Int32))
, _arsrrvType :: !(Maybe Text)
, _arsrrvValueString :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
appRestrictionsSchemaRestrictionRestrictionValue
:: AppRestrictionsSchemaRestrictionRestrictionValue
appRestrictionsSchemaRestrictionRestrictionValue =
AppRestrictionsSchemaRestrictionRestrictionValue'
{ _arsrrvValueMultiselect = Nothing
, _arsrrvValueBool = Nothing
, _arsrrvValueInteger = Nothing
, _arsrrvType = Nothing
, _arsrrvValueString = Nothing
}
arsrrvValueMultiselect :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue [Text]
arsrrvValueMultiselect
= lens _arsrrvValueMultiselect
(\ s a -> s{_arsrrvValueMultiselect = a})
. _Default
. _Coerce
arsrrvValueBool :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue (Maybe Bool)
arsrrvValueBool
= lens _arsrrvValueBool
(\ s a -> s{_arsrrvValueBool = a})
arsrrvValueInteger :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue (Maybe Int32)
arsrrvValueInteger
= lens _arsrrvValueInteger
(\ s a -> s{_arsrrvValueInteger = a})
. mapping _Coerce
arsrrvType :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue (Maybe Text)
arsrrvType
= lens _arsrrvType (\ s a -> s{_arsrrvType = a})
arsrrvValueString :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue (Maybe Text)
arsrrvValueString
= lens _arsrrvValueString
(\ s a -> s{_arsrrvValueString = a})
instance FromJSON
AppRestrictionsSchemaRestrictionRestrictionValue
where
parseJSON
= withObject
"AppRestrictionsSchemaRestrictionRestrictionValue"
(\ o ->
AppRestrictionsSchemaRestrictionRestrictionValue' <$>
(o .:? "valueMultiselect" .!= mempty) <*>
(o .:? "valueBool")
<*> (o .:? "valueInteger")
<*> (o .:? "type")
<*> (o .:? "valueString"))
instance ToJSON
AppRestrictionsSchemaRestrictionRestrictionValue
where
toJSON
AppRestrictionsSchemaRestrictionRestrictionValue'{..}
= object
(catMaybes
[("valueMultiselect" .=) <$> _arsrrvValueMultiselect,
("valueBool" .=) <$> _arsrrvValueBool,
("valueInteger" .=) <$> _arsrrvValueInteger,
("type" .=) <$> _arsrrvType,
("valueString" .=) <$> _arsrrvValueString])
data AdministratorWebTokenSpecPlaySearch = AdministratorWebTokenSpecPlaySearch'
{ _awtspsEnabled :: !(Maybe Bool)
, _awtspsApproveApps :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
administratorWebTokenSpecPlaySearch
:: AdministratorWebTokenSpecPlaySearch
administratorWebTokenSpecPlaySearch =
AdministratorWebTokenSpecPlaySearch'
{ _awtspsEnabled = Nothing
, _awtspsApproveApps = Nothing
}
awtspsEnabled :: Lens' AdministratorWebTokenSpecPlaySearch (Maybe Bool)
awtspsEnabled
= lens _awtspsEnabled
(\ s a -> s{_awtspsEnabled = a})
awtspsApproveApps :: Lens' AdministratorWebTokenSpecPlaySearch (Maybe Bool)
awtspsApproveApps
= lens _awtspsApproveApps
(\ s a -> s{_awtspsApproveApps = a})
instance FromJSON AdministratorWebTokenSpecPlaySearch
where
parseJSON
= withObject "AdministratorWebTokenSpecPlaySearch"
(\ o ->
AdministratorWebTokenSpecPlaySearch' <$>
(o .:? "enabled") <*> (o .:? "approveApps"))
instance ToJSON AdministratorWebTokenSpecPlaySearch
where
toJSON AdministratorWebTokenSpecPlaySearch'{..}
= object
(catMaybes
[("enabled" .=) <$> _awtspsEnabled,
("approveApps" .=) <$> _awtspsApproveApps])
data DeviceState = DeviceState'
{ _dsKind :: !Text
, _dsAccountState :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
deviceState
:: DeviceState
deviceState =
DeviceState'
{ _dsKind = "androidenterprise#deviceState"
, _dsAccountState = Nothing
}
dsKind :: Lens' DeviceState Text
dsKind = lens _dsKind (\ s a -> s{_dsKind = a})
dsAccountState :: Lens' DeviceState (Maybe Text)
dsAccountState
= lens _dsAccountState
(\ s a -> s{_dsAccountState = a})
instance FromJSON DeviceState where
parseJSON
= withObject "DeviceState"
(\ o ->
DeviceState' <$>
(o .:? "kind" .!= "androidenterprise#deviceState")
<*> (o .:? "accountState"))
instance ToJSON DeviceState where
toJSON DeviceState'{..}
= object
(catMaybes
[Just ("kind" .= _dsKind),
("accountState" .=) <$> _dsAccountState])
data GroupLicenseUsersListResponse = GroupLicenseUsersListResponse'
{ _glulrKind :: !Text
, _glulrUser :: !(Maybe [User])
} deriving (Eq,Show,Data,Typeable,Generic)
groupLicenseUsersListResponse
:: GroupLicenseUsersListResponse
groupLicenseUsersListResponse =
GroupLicenseUsersListResponse'
{ _glulrKind = "androidenterprise#groupLicenseUsersListResponse"
, _glulrUser = Nothing
}
glulrKind :: Lens' GroupLicenseUsersListResponse Text
glulrKind
= lens _glulrKind (\ s a -> s{_glulrKind = a})
glulrUser :: Lens' GroupLicenseUsersListResponse [User]
glulrUser
= lens _glulrUser (\ s a -> s{_glulrUser = a}) .
_Default
. _Coerce
instance FromJSON GroupLicenseUsersListResponse where
parseJSON
= withObject "GroupLicenseUsersListResponse"
(\ o ->
GroupLicenseUsersListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#groupLicenseUsersListResponse")
<*> (o .:? "user" .!= mempty))
instance ToJSON GroupLicenseUsersListResponse where
toJSON GroupLicenseUsersListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _glulrKind),
("user" .=) <$> _glulrUser])
data TokenPagination = TokenPagination'
{ _tpNextPageToken :: !(Maybe Text)
, _tpPreviousPageToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
tokenPagination
:: TokenPagination
tokenPagination =
TokenPagination'
{ _tpNextPageToken = Nothing
, _tpPreviousPageToken = Nothing
}
tpNextPageToken :: Lens' TokenPagination (Maybe Text)
tpNextPageToken
= lens _tpNextPageToken
(\ s a -> s{_tpNextPageToken = a})
tpPreviousPageToken :: Lens' TokenPagination (Maybe Text)
tpPreviousPageToken
= lens _tpPreviousPageToken
(\ s a -> s{_tpPreviousPageToken = a})
instance FromJSON TokenPagination where
parseJSON
= withObject "TokenPagination"
(\ o ->
TokenPagination' <$>
(o .:? "nextPageToken") <*>
(o .:? "previousPageToken"))
instance ToJSON TokenPagination where
toJSON TokenPagination'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _tpNextPageToken,
("previousPageToken" .=) <$> _tpPreviousPageToken])
newtype AdministratorWebTokenSpecWebApps = AdministratorWebTokenSpecWebApps'
{ _awtswaEnabled :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
administratorWebTokenSpecWebApps
:: AdministratorWebTokenSpecWebApps
administratorWebTokenSpecWebApps =
AdministratorWebTokenSpecWebApps'
{ _awtswaEnabled = Nothing
}
awtswaEnabled :: Lens' AdministratorWebTokenSpecWebApps (Maybe Bool)
awtswaEnabled
= lens _awtswaEnabled
(\ s a -> s{_awtswaEnabled = a})
instance FromJSON AdministratorWebTokenSpecWebApps
where
parseJSON
= withObject "AdministratorWebTokenSpecWebApps"
(\ o ->
AdministratorWebTokenSpecWebApps' <$>
(o .:? "enabled"))
instance ToJSON AdministratorWebTokenSpecWebApps
where
toJSON AdministratorWebTokenSpecWebApps'{..}
= object
(catMaybes [("enabled" .=) <$> _awtswaEnabled])
data ApprovalURLInfo = ApprovalURLInfo'
{ _auiApprovalURL :: !(Maybe Text)
, _auiKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
approvalURLInfo
:: ApprovalURLInfo
approvalURLInfo =
ApprovalURLInfo'
{ _auiApprovalURL = Nothing
, _auiKind = "androidenterprise#approvalUrlInfo"
}
auiApprovalURL :: Lens' ApprovalURLInfo (Maybe Text)
auiApprovalURL
= lens _auiApprovalURL
(\ s a -> s{_auiApprovalURL = a})
auiKind :: Lens' ApprovalURLInfo Text
auiKind = lens _auiKind (\ s a -> s{_auiKind = a})
instance FromJSON ApprovalURLInfo where
parseJSON
= withObject "ApprovalURLInfo"
(\ o ->
ApprovalURLInfo' <$>
(o .:? "approvalUrl") <*>
(o .:? "kind" .!=
"androidenterprise#approvalUrlInfo"))
instance ToJSON ApprovalURLInfo where
toJSON ApprovalURLInfo'{..}
= object
(catMaybes
[("approvalUrl" .=) <$> _auiApprovalURL,
Just ("kind" .= _auiKind)])
data ManagedConfigurationsSettingsListResponse = ManagedConfigurationsSettingsListResponse'
{ _mcslrKind :: !Text
, _mcslrManagedConfigurationsSettings :: !(Maybe [ManagedConfigurationsSettings])
} deriving (Eq,Show,Data,Typeable,Generic)
managedConfigurationsSettingsListResponse
:: ManagedConfigurationsSettingsListResponse
managedConfigurationsSettingsListResponse =
ManagedConfigurationsSettingsListResponse'
{ _mcslrKind = "androidenterprise#managedConfigurationsSettingsListResponse"
, _mcslrManagedConfigurationsSettings = Nothing
}
mcslrKind :: Lens' ManagedConfigurationsSettingsListResponse Text
mcslrKind
= lens _mcslrKind (\ s a -> s{_mcslrKind = a})
mcslrManagedConfigurationsSettings :: Lens' ManagedConfigurationsSettingsListResponse [ManagedConfigurationsSettings]
mcslrManagedConfigurationsSettings
= lens _mcslrManagedConfigurationsSettings
(\ s a -> s{_mcslrManagedConfigurationsSettings = a})
. _Default
. _Coerce
instance FromJSON
ManagedConfigurationsSettingsListResponse where
parseJSON
= withObject
"ManagedConfigurationsSettingsListResponse"
(\ o ->
ManagedConfigurationsSettingsListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#managedConfigurationsSettingsListResponse")
<*>
(o .:? "managedConfigurationsSettings" .!= mempty))
instance ToJSON
ManagedConfigurationsSettingsListResponse where
toJSON ManagedConfigurationsSettingsListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _mcslrKind),
("managedConfigurationsSettings" .=) <$>
_mcslrManagedConfigurationsSettings])
data ManagedProperty = ManagedProperty'
{ _mpValueStringArray :: !(Maybe [Text])
, _mpValueBool :: !(Maybe Bool)
, _mpKey :: !(Maybe Text)
, _mpValueBundle :: !(Maybe ManagedPropertyBundle)
, _mpValueInteger :: !(Maybe (Textual Int32))
, _mpValueBundleArray :: !(Maybe [ManagedPropertyBundle])
, _mpValueString :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedProperty
:: ManagedProperty
managedProperty =
ManagedProperty'
{ _mpValueStringArray = Nothing
, _mpValueBool = Nothing
, _mpKey = Nothing
, _mpValueBundle = Nothing
, _mpValueInteger = Nothing
, _mpValueBundleArray = Nothing
, _mpValueString = Nothing
}
mpValueStringArray :: Lens' ManagedProperty [Text]
mpValueStringArray
= lens _mpValueStringArray
(\ s a -> s{_mpValueStringArray = a})
. _Default
. _Coerce
mpValueBool :: Lens' ManagedProperty (Maybe Bool)
mpValueBool
= lens _mpValueBool (\ s a -> s{_mpValueBool = a})
mpKey :: Lens' ManagedProperty (Maybe Text)
mpKey = lens _mpKey (\ s a -> s{_mpKey = a})
mpValueBundle :: Lens' ManagedProperty (Maybe ManagedPropertyBundle)
mpValueBundle
= lens _mpValueBundle
(\ s a -> s{_mpValueBundle = a})
mpValueInteger :: Lens' ManagedProperty (Maybe Int32)
mpValueInteger
= lens _mpValueInteger
(\ s a -> s{_mpValueInteger = a})
. mapping _Coerce
mpValueBundleArray :: Lens' ManagedProperty [ManagedPropertyBundle]
mpValueBundleArray
= lens _mpValueBundleArray
(\ s a -> s{_mpValueBundleArray = a})
. _Default
. _Coerce
mpValueString :: Lens' ManagedProperty (Maybe Text)
mpValueString
= lens _mpValueString
(\ s a -> s{_mpValueString = a})
instance FromJSON ManagedProperty where
parseJSON
= withObject "ManagedProperty"
(\ o ->
ManagedProperty' <$>
(o .:? "valueStringArray" .!= mempty) <*>
(o .:? "valueBool")
<*> (o .:? "key")
<*> (o .:? "valueBundle")
<*> (o .:? "valueInteger")
<*> (o .:? "valueBundleArray" .!= mempty)
<*> (o .:? "valueString"))
instance ToJSON ManagedProperty where
toJSON ManagedProperty'{..}
= object
(catMaybes
[("valueStringArray" .=) <$> _mpValueStringArray,
("valueBool" .=) <$> _mpValueBool,
("key" .=) <$> _mpKey,
("valueBundle" .=) <$> _mpValueBundle,
("valueInteger" .=) <$> _mpValueInteger,
("valueBundleArray" .=) <$> _mpValueBundleArray,
("valueString" .=) <$> _mpValueString])
data StoreLayoutClustersListResponse = StoreLayoutClustersListResponse'
{ _slclrCluster :: !(Maybe [StoreCluster])
, _slclrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
storeLayoutClustersListResponse
:: StoreLayoutClustersListResponse
storeLayoutClustersListResponse =
StoreLayoutClustersListResponse'
{ _slclrCluster = Nothing
, _slclrKind = "androidenterprise#storeLayoutClustersListResponse"
}
slclrCluster :: Lens' StoreLayoutClustersListResponse [StoreCluster]
slclrCluster
= lens _slclrCluster (\ s a -> s{_slclrCluster = a})
. _Default
. _Coerce
slclrKind :: Lens' StoreLayoutClustersListResponse Text
slclrKind
= lens _slclrKind (\ s a -> s{_slclrKind = a})
instance FromJSON StoreLayoutClustersListResponse
where
parseJSON
= withObject "StoreLayoutClustersListResponse"
(\ o ->
StoreLayoutClustersListResponse' <$>
(o .:? "cluster" .!= mempty) <*>
(o .:? "kind" .!=
"androidenterprise#storeLayoutClustersListResponse"))
instance ToJSON StoreLayoutClustersListResponse where
toJSON StoreLayoutClustersListResponse'{..}
= object
(catMaybes
[("cluster" .=) <$> _slclrCluster,
Just ("kind" .= _slclrKind)])
data ManagedConfiguration = ManagedConfiguration'
{ _mcManagedProperty :: !(Maybe [ManagedProperty])
, _mcKind :: !Text
, _mcConfigurationVariables :: !(Maybe ConfigurationVariables)
, _mcProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedConfiguration
:: ManagedConfiguration
managedConfiguration =
ManagedConfiguration'
{ _mcManagedProperty = Nothing
, _mcKind = "androidenterprise#managedConfiguration"
, _mcConfigurationVariables = Nothing
, _mcProductId = Nothing
}
mcManagedProperty :: Lens' ManagedConfiguration [ManagedProperty]
mcManagedProperty
= lens _mcManagedProperty
(\ s a -> s{_mcManagedProperty = a})
. _Default
. _Coerce
mcKind :: Lens' ManagedConfiguration Text
mcKind = lens _mcKind (\ s a -> s{_mcKind = a})
mcConfigurationVariables :: Lens' ManagedConfiguration (Maybe ConfigurationVariables)
mcConfigurationVariables
= lens _mcConfigurationVariables
(\ s a -> s{_mcConfigurationVariables = a})
mcProductId :: Lens' ManagedConfiguration (Maybe Text)
mcProductId
= lens _mcProductId (\ s a -> s{_mcProductId = a})
instance FromJSON ManagedConfiguration where
parseJSON
= withObject "ManagedConfiguration"
(\ o ->
ManagedConfiguration' <$>
(o .:? "managedProperty" .!= mempty) <*>
(o .:? "kind" .!=
"androidenterprise#managedConfiguration")
<*> (o .:? "configurationVariables")
<*> (o .:? "productId"))
instance ToJSON ManagedConfiguration where
toJSON ManagedConfiguration'{..}
= object
(catMaybes
[("managedProperty" .=) <$> _mcManagedProperty,
Just ("kind" .= _mcKind),
("configurationVariables" .=) <$>
_mcConfigurationVariables,
("productId" .=) <$> _mcProductId])
data StoreCluster = StoreCluster'
{ _scKind :: !Text
, _scName :: !(Maybe [LocalizedText])
, _scOrderInPage :: !(Maybe Text)
, _scId :: !(Maybe Text)
, _scProductId :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
storeCluster
:: StoreCluster
storeCluster =
StoreCluster'
{ _scKind = "androidenterprise#storeCluster"
, _scName = Nothing
, _scOrderInPage = Nothing
, _scId = Nothing
, _scProductId = Nothing
}
scKind :: Lens' StoreCluster Text
scKind = lens _scKind (\ s a -> s{_scKind = a})
scName :: Lens' StoreCluster [LocalizedText]
scName
= lens _scName (\ s a -> s{_scName = a}) . _Default .
_Coerce
scOrderInPage :: Lens' StoreCluster (Maybe Text)
scOrderInPage
= lens _scOrderInPage
(\ s a -> s{_scOrderInPage = a})
scId :: Lens' StoreCluster (Maybe Text)
scId = lens _scId (\ s a -> s{_scId = a})
scProductId :: Lens' StoreCluster [Text]
scProductId
= lens _scProductId (\ s a -> s{_scProductId = a}) .
_Default
. _Coerce
instance FromJSON StoreCluster where
parseJSON
= withObject "StoreCluster"
(\ o ->
StoreCluster' <$>
(o .:? "kind" .!= "androidenterprise#storeCluster")
<*> (o .:? "name" .!= mempty)
<*> (o .:? "orderInPage")
<*> (o .:? "id")
<*> (o .:? "productId" .!= mempty))
instance ToJSON StoreCluster where
toJSON StoreCluster'{..}
= object
(catMaybes
[Just ("kind" .= _scKind), ("name" .=) <$> _scName,
("orderInPage" .=) <$> _scOrderInPage,
("id" .=) <$> _scId,
("productId" .=) <$> _scProductId])
data AdministratorWebTokenSpec = AdministratorWebTokenSpec'
{ _awtsParent :: !(Maybe Text)
, _awtsPrivateApps :: !(Maybe AdministratorWebTokenSpecPrivateApps)
, _awtsPlaySearch :: !(Maybe AdministratorWebTokenSpecPlaySearch)
, _awtsKind :: !Text
, _awtsWebApps :: !(Maybe AdministratorWebTokenSpecWebApps)
, _awtsPermission :: !(Maybe [Text])
, _awtsStoreBuilder :: !(Maybe AdministratorWebTokenSpecStoreBuilder)
} deriving (Eq,Show,Data,Typeable,Generic)
administratorWebTokenSpec
:: AdministratorWebTokenSpec
administratorWebTokenSpec =
AdministratorWebTokenSpec'
{ _awtsParent = Nothing
, _awtsPrivateApps = Nothing
, _awtsPlaySearch = Nothing
, _awtsKind = "androidenterprise#administratorWebTokenSpec"
, _awtsWebApps = Nothing
, _awtsPermission = Nothing
, _awtsStoreBuilder = Nothing
}
awtsParent :: Lens' AdministratorWebTokenSpec (Maybe Text)
awtsParent
= lens _awtsParent (\ s a -> s{_awtsParent = a})
awtsPrivateApps :: Lens' AdministratorWebTokenSpec (Maybe AdministratorWebTokenSpecPrivateApps)
awtsPrivateApps
= lens _awtsPrivateApps
(\ s a -> s{_awtsPrivateApps = a})
awtsPlaySearch :: Lens' AdministratorWebTokenSpec (Maybe AdministratorWebTokenSpecPlaySearch)
awtsPlaySearch
= lens _awtsPlaySearch
(\ s a -> s{_awtsPlaySearch = a})
awtsKind :: Lens' AdministratorWebTokenSpec Text
awtsKind = lens _awtsKind (\ s a -> s{_awtsKind = a})
awtsWebApps :: Lens' AdministratorWebTokenSpec (Maybe AdministratorWebTokenSpecWebApps)
awtsWebApps
= lens _awtsWebApps (\ s a -> s{_awtsWebApps = a})
awtsPermission :: Lens' AdministratorWebTokenSpec [Text]
awtsPermission
= lens _awtsPermission
(\ s a -> s{_awtsPermission = a})
. _Default
. _Coerce
awtsStoreBuilder :: Lens' AdministratorWebTokenSpec (Maybe AdministratorWebTokenSpecStoreBuilder)
awtsStoreBuilder
= lens _awtsStoreBuilder
(\ s a -> s{_awtsStoreBuilder = a})
instance FromJSON AdministratorWebTokenSpec where
parseJSON
= withObject "AdministratorWebTokenSpec"
(\ o ->
AdministratorWebTokenSpec' <$>
(o .:? "parent") <*> (o .:? "privateApps") <*>
(o .:? "playSearch")
<*>
(o .:? "kind" .!=
"androidenterprise#administratorWebTokenSpec")
<*> (o .:? "webApps")
<*> (o .:? "permission" .!= mempty)
<*> (o .:? "storeBuilder"))
instance ToJSON AdministratorWebTokenSpec where
toJSON AdministratorWebTokenSpec'{..}
= object
(catMaybes
[("parent" .=) <$> _awtsParent,
("privateApps" .=) <$> _awtsPrivateApps,
("playSearch" .=) <$> _awtsPlaySearch,
Just ("kind" .= _awtsKind),
("webApps" .=) <$> _awtsWebApps,
("permission" .=) <$> _awtsPermission,
("storeBuilder" .=) <$> _awtsStoreBuilder])
data ProductVisibility = ProductVisibility'
{ _pvTracks :: !(Maybe [Text])
, _pvTrackIds :: !(Maybe [Text])
, _pvProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productVisibility
:: ProductVisibility
productVisibility =
ProductVisibility'
{ _pvTracks = Nothing
, _pvTrackIds = Nothing
, _pvProductId = Nothing
}
pvTracks :: Lens' ProductVisibility [Text]
pvTracks
= lens _pvTracks (\ s a -> s{_pvTracks = a}) .
_Default
. _Coerce
pvTrackIds :: Lens' ProductVisibility [Text]
pvTrackIds
= lens _pvTrackIds (\ s a -> s{_pvTrackIds = a}) .
_Default
. _Coerce
pvProductId :: Lens' ProductVisibility (Maybe Text)
pvProductId
= lens _pvProductId (\ s a -> s{_pvProductId = a})
instance FromJSON ProductVisibility where
parseJSON
= withObject "ProductVisibility"
(\ o ->
ProductVisibility' <$>
(o .:? "tracks" .!= mempty) <*>
(o .:? "trackIds" .!= mempty)
<*> (o .:? "productId"))
instance ToJSON ProductVisibility where
toJSON ProductVisibility'{..}
= object
(catMaybes
[("tracks" .=) <$> _pvTracks,
("trackIds" .=) <$> _pvTrackIds,
("productId" .=) <$> _pvProductId])
data Notification = Notification'
{ _nEnterpriseId :: !(Maybe Text)
, _nNewPermissionsEvent :: !(Maybe NewPermissionsEvent)
, _nProductApprovalEvent :: !(Maybe ProductApprovalEvent)
, _nProductAvailabilityChangeEvent :: !(Maybe ProductAvailabilityChangeEvent)
, _nAppUpdateEvent :: !(Maybe AppUpdateEvent)
, _nInstallFailureEvent :: !(Maybe InstallFailureEvent)
, _nNotificationType :: !(Maybe Text)
, _nAppRestrictionsSchemaChangeEvent :: !(Maybe AppRestrictionsSchemaChangeEvent)
, _nNewDeviceEvent :: !(Maybe NewDeviceEvent)
, _nTimestampMillis :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
notification
:: Notification
notification =
Notification'
{ _nEnterpriseId = Nothing
, _nNewPermissionsEvent = Nothing
, _nProductApprovalEvent = Nothing
, _nProductAvailabilityChangeEvent = Nothing
, _nAppUpdateEvent = Nothing
, _nInstallFailureEvent = Nothing
, _nNotificationType = Nothing
, _nAppRestrictionsSchemaChangeEvent = Nothing
, _nNewDeviceEvent = Nothing
, _nTimestampMillis = Nothing
}
nEnterpriseId :: Lens' Notification (Maybe Text)
nEnterpriseId
= lens _nEnterpriseId
(\ s a -> s{_nEnterpriseId = a})
nNewPermissionsEvent :: Lens' Notification (Maybe NewPermissionsEvent)
nNewPermissionsEvent
= lens _nNewPermissionsEvent
(\ s a -> s{_nNewPermissionsEvent = a})
nProductApprovalEvent :: Lens' Notification (Maybe ProductApprovalEvent)
nProductApprovalEvent
= lens _nProductApprovalEvent
(\ s a -> s{_nProductApprovalEvent = a})
nProductAvailabilityChangeEvent :: Lens' Notification (Maybe ProductAvailabilityChangeEvent)
nProductAvailabilityChangeEvent
= lens _nProductAvailabilityChangeEvent
(\ s a -> s{_nProductAvailabilityChangeEvent = a})
nAppUpdateEvent :: Lens' Notification (Maybe AppUpdateEvent)
nAppUpdateEvent
= lens _nAppUpdateEvent
(\ s a -> s{_nAppUpdateEvent = a})
nInstallFailureEvent :: Lens' Notification (Maybe InstallFailureEvent)
nInstallFailureEvent
= lens _nInstallFailureEvent
(\ s a -> s{_nInstallFailureEvent = a})
nNotificationType :: Lens' Notification (Maybe Text)
nNotificationType
= lens _nNotificationType
(\ s a -> s{_nNotificationType = a})
nAppRestrictionsSchemaChangeEvent :: Lens' Notification (Maybe AppRestrictionsSchemaChangeEvent)
nAppRestrictionsSchemaChangeEvent
= lens _nAppRestrictionsSchemaChangeEvent
(\ s a -> s{_nAppRestrictionsSchemaChangeEvent = a})
nNewDeviceEvent :: Lens' Notification (Maybe NewDeviceEvent)
nNewDeviceEvent
= lens _nNewDeviceEvent
(\ s a -> s{_nNewDeviceEvent = a})
nTimestampMillis :: Lens' Notification (Maybe Int64)
nTimestampMillis
= lens _nTimestampMillis
(\ s a -> s{_nTimestampMillis = a})
. mapping _Coerce
instance FromJSON Notification where
parseJSON
= withObject "Notification"
(\ o ->
Notification' <$>
(o .:? "enterpriseId") <*>
(o .:? "newPermissionsEvent")
<*> (o .:? "productApprovalEvent")
<*> (o .:? "productAvailabilityChangeEvent")
<*> (o .:? "appUpdateEvent")
<*> (o .:? "installFailureEvent")
<*> (o .:? "notificationType")
<*> (o .:? "appRestrictionsSchemaChangeEvent")
<*> (o .:? "newDeviceEvent")
<*> (o .:? "timestampMillis"))
instance ToJSON Notification where
toJSON Notification'{..}
= object
(catMaybes
[("enterpriseId" .=) <$> _nEnterpriseId,
("newPermissionsEvent" .=) <$> _nNewPermissionsEvent,
("productApprovalEvent" .=) <$>
_nProductApprovalEvent,
("productAvailabilityChangeEvent" .=) <$>
_nProductAvailabilityChangeEvent,
("appUpdateEvent" .=) <$> _nAppUpdateEvent,
("installFailureEvent" .=) <$> _nInstallFailureEvent,
("notificationType" .=) <$> _nNotificationType,
("appRestrictionsSchemaChangeEvent" .=) <$>
_nAppRestrictionsSchemaChangeEvent,
("newDeviceEvent" .=) <$> _nNewDeviceEvent,
("timestampMillis" .=) <$> _nTimestampMillis])
data PageInfo = PageInfo'
{ _piResultPerPage :: !(Maybe (Textual Int32))
, _piTotalResults :: !(Maybe (Textual Int32))
, _piStartIndex :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
pageInfo
:: PageInfo
pageInfo =
PageInfo'
{ _piResultPerPage = Nothing
, _piTotalResults = Nothing
, _piStartIndex = Nothing
}
piResultPerPage :: Lens' PageInfo (Maybe Int32)
piResultPerPage
= lens _piResultPerPage
(\ s a -> s{_piResultPerPage = a})
. mapping _Coerce
piTotalResults :: Lens' PageInfo (Maybe Int32)
piTotalResults
= lens _piTotalResults
(\ s a -> s{_piTotalResults = a})
. mapping _Coerce
piStartIndex :: Lens' PageInfo (Maybe Int32)
piStartIndex
= lens _piStartIndex (\ s a -> s{_piStartIndex = a})
. mapping _Coerce
instance FromJSON PageInfo where
parseJSON
= withObject "PageInfo"
(\ o ->
PageInfo' <$>
(o .:? "resultPerPage") <*> (o .:? "totalResults")
<*> (o .:? "startIndex"))
instance ToJSON PageInfo where
toJSON PageInfo'{..}
= object
(catMaybes
[("resultPerPage" .=) <$> _piResultPerPage,
("totalResults" .=) <$> _piTotalResults,
("startIndex" .=) <$> _piStartIndex])
data ProductPermission = ProductPermission'
{ _ppState :: !(Maybe Text)
, _ppPermissionId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productPermission
:: ProductPermission
productPermission =
ProductPermission'
{ _ppState = Nothing
, _ppPermissionId = Nothing
}
ppState :: Lens' ProductPermission (Maybe Text)
ppState = lens _ppState (\ s a -> s{_ppState = a})
ppPermissionId :: Lens' ProductPermission (Maybe Text)
ppPermissionId
= lens _ppPermissionId
(\ s a -> s{_ppPermissionId = a})
instance FromJSON ProductPermission where
parseJSON
= withObject "ProductPermission"
(\ o ->
ProductPermission' <$>
(o .:? "state") <*> (o .:? "permissionId"))
instance ToJSON ProductPermission where
toJSON ProductPermission'{..}
= object
(catMaybes
[("state" .=) <$> _ppState,
("permissionId" .=) <$> _ppPermissionId])
data NewPermissionsEvent = NewPermissionsEvent'
{ _npeRequestedPermissions :: !(Maybe [Text])
, _npeApprovedPermissions :: !(Maybe [Text])
, _npeProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
newPermissionsEvent
:: NewPermissionsEvent
newPermissionsEvent =
NewPermissionsEvent'
{ _npeRequestedPermissions = Nothing
, _npeApprovedPermissions = Nothing
, _npeProductId = Nothing
}
npeRequestedPermissions :: Lens' NewPermissionsEvent [Text]
npeRequestedPermissions
= lens _npeRequestedPermissions
(\ s a -> s{_npeRequestedPermissions = a})
. _Default
. _Coerce
npeApprovedPermissions :: Lens' NewPermissionsEvent [Text]
npeApprovedPermissions
= lens _npeApprovedPermissions
(\ s a -> s{_npeApprovedPermissions = a})
. _Default
. _Coerce
npeProductId :: Lens' NewPermissionsEvent (Maybe Text)
npeProductId
= lens _npeProductId (\ s a -> s{_npeProductId = a})
instance FromJSON NewPermissionsEvent where
parseJSON
= withObject "NewPermissionsEvent"
(\ o ->
NewPermissionsEvent' <$>
(o .:? "requestedPermissions" .!= mempty) <*>
(o .:? "approvedPermissions" .!= mempty)
<*> (o .:? "productId"))
instance ToJSON NewPermissionsEvent where
toJSON NewPermissionsEvent'{..}
= object
(catMaybes
[("requestedPermissions" .=) <$>
_npeRequestedPermissions,
("approvedPermissions" .=) <$>
_npeApprovedPermissions,
("productId" .=) <$> _npeProductId])
data ProductAvailabilityChangeEvent = ProductAvailabilityChangeEvent'
{ _paceAvailabilityStatus :: !(Maybe Text)
, _paceProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productAvailabilityChangeEvent
:: ProductAvailabilityChangeEvent
productAvailabilityChangeEvent =
ProductAvailabilityChangeEvent'
{ _paceAvailabilityStatus = Nothing
, _paceProductId = Nothing
}
paceAvailabilityStatus :: Lens' ProductAvailabilityChangeEvent (Maybe Text)
paceAvailabilityStatus
= lens _paceAvailabilityStatus
(\ s a -> s{_paceAvailabilityStatus = a})
paceProductId :: Lens' ProductAvailabilityChangeEvent (Maybe Text)
paceProductId
= lens _paceProductId
(\ s a -> s{_paceProductId = a})
instance FromJSON ProductAvailabilityChangeEvent
where
parseJSON
= withObject "ProductAvailabilityChangeEvent"
(\ o ->
ProductAvailabilityChangeEvent' <$>
(o .:? "availabilityStatus") <*> (o .:? "productId"))
instance ToJSON ProductAvailabilityChangeEvent where
toJSON ProductAvailabilityChangeEvent'{..}
= object
(catMaybes
[("availabilityStatus" .=) <$>
_paceAvailabilityStatus,
("productId" .=) <$> _paceProductId])
data ProductApprovalEvent = ProductApprovalEvent'
{ _paeApproved :: !(Maybe Text)
, _paeProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productApprovalEvent
:: ProductApprovalEvent
productApprovalEvent =
ProductApprovalEvent'
{ _paeApproved = Nothing
, _paeProductId = Nothing
}
paeApproved :: Lens' ProductApprovalEvent (Maybe Text)
paeApproved
= lens _paeApproved (\ s a -> s{_paeApproved = a})
paeProductId :: Lens' ProductApprovalEvent (Maybe Text)
paeProductId
= lens _paeProductId (\ s a -> s{_paeProductId = a})
instance FromJSON ProductApprovalEvent where
parseJSON
= withObject "ProductApprovalEvent"
(\ o ->
ProductApprovalEvent' <$>
(o .:? "approved") <*> (o .:? "productId"))
instance ToJSON ProductApprovalEvent where
toJSON ProductApprovalEvent'{..}
= object
(catMaybes
[("approved" .=) <$> _paeApproved,
("productId" .=) <$> _paeProductId])
data Device = Device'
{ _dKind :: !Text
, _dPolicy :: !(Maybe Policy)
, _dManagementType :: !(Maybe Text)
, _dAndroidId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
device
:: Device
device =
Device'
{ _dKind = "androidenterprise#device"
, _dPolicy = Nothing
, _dManagementType = Nothing
, _dAndroidId = Nothing
}
dKind :: Lens' Device Text
dKind = lens _dKind (\ s a -> s{_dKind = a})
dPolicy :: Lens' Device (Maybe Policy)
dPolicy = lens _dPolicy (\ s a -> s{_dPolicy = a})
dManagementType :: Lens' Device (Maybe Text)
dManagementType
= lens _dManagementType
(\ s a -> s{_dManagementType = a})
dAndroidId :: Lens' Device (Maybe Text)
dAndroidId
= lens _dAndroidId (\ s a -> s{_dAndroidId = a})
instance FromJSON Device where
parseJSON
= withObject "Device"
(\ o ->
Device' <$>
(o .:? "kind" .!= "androidenterprise#device") <*>
(o .:? "policy")
<*> (o .:? "managementType")
<*> (o .:? "androidId"))
instance ToJSON Device where
toJSON Device'{..}
= object
(catMaybes
[Just ("kind" .= _dKind), ("policy" .=) <$> _dPolicy,
("managementType" .=) <$> _dManagementType,
("androidId" .=) <$> _dAndroidId])
data AutoInstallConstraint = AutoInstallConstraint'
{ _aicChargingStateConstraint :: !(Maybe Text)
, _aicDeviceIdleStateConstraint :: !(Maybe Text)
, _aicNetworkTypeConstraint :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
autoInstallConstraint
:: AutoInstallConstraint
autoInstallConstraint =
AutoInstallConstraint'
{ _aicChargingStateConstraint = Nothing
, _aicDeviceIdleStateConstraint = Nothing
, _aicNetworkTypeConstraint = Nothing
}
aicChargingStateConstraint :: Lens' AutoInstallConstraint (Maybe Text)
aicChargingStateConstraint
= lens _aicChargingStateConstraint
(\ s a -> s{_aicChargingStateConstraint = a})
aicDeviceIdleStateConstraint :: Lens' AutoInstallConstraint (Maybe Text)
aicDeviceIdleStateConstraint
= lens _aicDeviceIdleStateConstraint
(\ s a -> s{_aicDeviceIdleStateConstraint = a})
aicNetworkTypeConstraint :: Lens' AutoInstallConstraint (Maybe Text)
aicNetworkTypeConstraint
= lens _aicNetworkTypeConstraint
(\ s a -> s{_aicNetworkTypeConstraint = a})
instance FromJSON AutoInstallConstraint where
parseJSON
= withObject "AutoInstallConstraint"
(\ o ->
AutoInstallConstraint' <$>
(o .:? "chargingStateConstraint") <*>
(o .:? "deviceIdleStateConstraint")
<*> (o .:? "networkTypeConstraint"))
instance ToJSON AutoInstallConstraint where
toJSON AutoInstallConstraint'{..}
= object
(catMaybes
[("chargingStateConstraint" .=) <$>
_aicChargingStateConstraint,
("deviceIdleStateConstraint" .=) <$>
_aicDeviceIdleStateConstraint,
("networkTypeConstraint" .=) <$>
_aicNetworkTypeConstraint])
data ServiceAccountKey = ServiceAccountKey'
{ _sakKind :: !Text
, _sakData :: !(Maybe Text)
, _sakId :: !(Maybe Text)
, _sakType :: !(Maybe Text)
, _sakPublicData :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
serviceAccountKey
:: ServiceAccountKey
serviceAccountKey =
ServiceAccountKey'
{ _sakKind = "androidenterprise#serviceAccountKey"
, _sakData = Nothing
, _sakId = Nothing
, _sakType = Nothing
, _sakPublicData = Nothing
}
sakKind :: Lens' ServiceAccountKey Text
sakKind = lens _sakKind (\ s a -> s{_sakKind = a})
sakData :: Lens' ServiceAccountKey (Maybe Text)
sakData = lens _sakData (\ s a -> s{_sakData = a})
sakId :: Lens' ServiceAccountKey (Maybe Text)
sakId = lens _sakId (\ s a -> s{_sakId = a})
sakType :: Lens' ServiceAccountKey (Maybe Text)
sakType = lens _sakType (\ s a -> s{_sakType = a})
sakPublicData :: Lens' ServiceAccountKey (Maybe Text)
sakPublicData
= lens _sakPublicData
(\ s a -> s{_sakPublicData = a})
instance FromJSON ServiceAccountKey where
parseJSON
= withObject "ServiceAccountKey"
(\ o ->
ServiceAccountKey' <$>
(o .:? "kind" .!=
"androidenterprise#serviceAccountKey")
<*> (o .:? "data")
<*> (o .:? "id")
<*> (o .:? "type")
<*> (o .:? "publicData"))
instance ToJSON ServiceAccountKey where
toJSON ServiceAccountKey'{..}
= object
(catMaybes
[Just ("kind" .= _sakKind), ("data" .=) <$> _sakData,
("id" .=) <$> _sakId, ("type" .=) <$> _sakType,
("publicData" .=) <$> _sakPublicData])
data InstallsListResponse = InstallsListResponse'
{ _ilrKind :: !Text
, _ilrInstall :: !(Maybe [Install])
} deriving (Eq,Show,Data,Typeable,Generic)
installsListResponse
:: InstallsListResponse
installsListResponse =
InstallsListResponse'
{ _ilrKind = "androidenterprise#installsListResponse"
, _ilrInstall = Nothing
}
ilrKind :: Lens' InstallsListResponse Text
ilrKind = lens _ilrKind (\ s a -> s{_ilrKind = a})
ilrInstall :: Lens' InstallsListResponse [Install]
ilrInstall
= lens _ilrInstall (\ s a -> s{_ilrInstall = a}) .
_Default
. _Coerce
instance FromJSON InstallsListResponse where
parseJSON
= withObject "InstallsListResponse"
(\ o ->
InstallsListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#installsListResponse")
<*> (o .:? "install" .!= mempty))
instance ToJSON InstallsListResponse where
toJSON InstallsListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _ilrKind),
("install" .=) <$> _ilrInstall])
data AppRestrictionsSchemaRestriction = AppRestrictionsSchemaRestriction'
{ _arsrRestrictionType :: !(Maybe Text)
, _arsrEntry :: !(Maybe [Text])
, _arsrKey :: !(Maybe Text)
, _arsrEntryValue :: !(Maybe [Text])
, _arsrDefaultValue :: !(Maybe AppRestrictionsSchemaRestrictionRestrictionValue)
, _arsrTitle :: !(Maybe Text)
, _arsrDescription :: !(Maybe Text)
, _arsrNestedRestriction :: !(Maybe [AppRestrictionsSchemaRestriction])
} deriving (Eq,Show,Data,Typeable,Generic)
appRestrictionsSchemaRestriction
:: AppRestrictionsSchemaRestriction
appRestrictionsSchemaRestriction =
AppRestrictionsSchemaRestriction'
{ _arsrRestrictionType = Nothing
, _arsrEntry = Nothing
, _arsrKey = Nothing
, _arsrEntryValue = Nothing
, _arsrDefaultValue = Nothing
, _arsrTitle = Nothing
, _arsrDescription = Nothing
, _arsrNestedRestriction = Nothing
}
arsrRestrictionType :: Lens' AppRestrictionsSchemaRestriction (Maybe Text)
arsrRestrictionType
= lens _arsrRestrictionType
(\ s a -> s{_arsrRestrictionType = a})
arsrEntry :: Lens' AppRestrictionsSchemaRestriction [Text]
arsrEntry
= lens _arsrEntry (\ s a -> s{_arsrEntry = a}) .
_Default
. _Coerce
arsrKey :: Lens' AppRestrictionsSchemaRestriction (Maybe Text)
arsrKey = lens _arsrKey (\ s a -> s{_arsrKey = a})
arsrEntryValue :: Lens' AppRestrictionsSchemaRestriction [Text]
arsrEntryValue
= lens _arsrEntryValue
(\ s a -> s{_arsrEntryValue = a})
. _Default
. _Coerce
arsrDefaultValue :: Lens' AppRestrictionsSchemaRestriction (Maybe AppRestrictionsSchemaRestrictionRestrictionValue)
arsrDefaultValue
= lens _arsrDefaultValue
(\ s a -> s{_arsrDefaultValue = a})
arsrTitle :: Lens' AppRestrictionsSchemaRestriction (Maybe Text)
arsrTitle
= lens _arsrTitle (\ s a -> s{_arsrTitle = a})
arsrDescription :: Lens' AppRestrictionsSchemaRestriction (Maybe Text)
arsrDescription
= lens _arsrDescription
(\ s a -> s{_arsrDescription = a})
arsrNestedRestriction :: Lens' AppRestrictionsSchemaRestriction [AppRestrictionsSchemaRestriction]
arsrNestedRestriction
= lens _arsrNestedRestriction
(\ s a -> s{_arsrNestedRestriction = a})
. _Default
. _Coerce
instance FromJSON AppRestrictionsSchemaRestriction
where
parseJSON
= withObject "AppRestrictionsSchemaRestriction"
(\ o ->
AppRestrictionsSchemaRestriction' <$>
(o .:? "restrictionType") <*>
(o .:? "entry" .!= mempty)
<*> (o .:? "key")
<*> (o .:? "entryValue" .!= mempty)
<*> (o .:? "defaultValue")
<*> (o .:? "title")
<*> (o .:? "description")
<*> (o .:? "nestedRestriction" .!= mempty))
instance ToJSON AppRestrictionsSchemaRestriction
where
toJSON AppRestrictionsSchemaRestriction'{..}
= object
(catMaybes
[("restrictionType" .=) <$> _arsrRestrictionType,
("entry" .=) <$> _arsrEntry, ("key" .=) <$> _arsrKey,
("entryValue" .=) <$> _arsrEntryValue,
("defaultValue" .=) <$> _arsrDefaultValue,
("title" .=) <$> _arsrTitle,
("description" .=) <$> _arsrDescription,
("nestedRestriction" .=) <$> _arsrNestedRestriction])
data ProductPolicy = ProductPolicy'
{ _ppTracks :: !(Maybe [Text])
, _ppTrackIds :: !(Maybe [Text])
, _ppAutoInstallPolicy :: !(Maybe AutoInstallPolicy)
, _ppProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productPolicy
:: ProductPolicy
productPolicy =
ProductPolicy'
{ _ppTracks = Nothing
, _ppTrackIds = Nothing
, _ppAutoInstallPolicy = Nothing
, _ppProductId = Nothing
}
ppTracks :: Lens' ProductPolicy [Text]
ppTracks
= lens _ppTracks (\ s a -> s{_ppTracks = a}) .
_Default
. _Coerce
ppTrackIds :: Lens' ProductPolicy [Text]
ppTrackIds
= lens _ppTrackIds (\ s a -> s{_ppTrackIds = a}) .
_Default
. _Coerce
ppAutoInstallPolicy :: Lens' ProductPolicy (Maybe AutoInstallPolicy)
ppAutoInstallPolicy
= lens _ppAutoInstallPolicy
(\ s a -> s{_ppAutoInstallPolicy = a})
ppProductId :: Lens' ProductPolicy (Maybe Text)
ppProductId
= lens _ppProductId (\ s a -> s{_ppProductId = a})
instance FromJSON ProductPolicy where
parseJSON
= withObject "ProductPolicy"
(\ o ->
ProductPolicy' <$>
(o .:? "tracks" .!= mempty) <*>
(o .:? "trackIds" .!= mempty)
<*> (o .:? "autoInstallPolicy")
<*> (o .:? "productId"))
instance ToJSON ProductPolicy where
toJSON ProductPolicy'{..}
= object
(catMaybes
[("tracks" .=) <$> _ppTracks,
("trackIds" .=) <$> _ppTrackIds,
("autoInstallPolicy" .=) <$> _ppAutoInstallPolicy,
("productId" .=) <$> _ppProductId])
newtype Administrator = Administrator'
{ _aEmail :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
administrator
:: Administrator
administrator =
Administrator'
{ _aEmail = Nothing
}
aEmail :: Lens' Administrator (Maybe Text)
aEmail = lens _aEmail (\ s a -> s{_aEmail = a})
instance FromJSON Administrator where
parseJSON
= withObject "Administrator"
(\ o -> Administrator' <$> (o .:? "email"))
instance ToJSON Administrator where
toJSON Administrator'{..}
= object (catMaybes [("email" .=) <$> _aEmail])
data UsersListResponse = UsersListResponse'
{ _ulrKind :: !Text
, _ulrUser :: !(Maybe [User])
} deriving (Eq,Show,Data,Typeable,Generic)
usersListResponse
:: UsersListResponse
usersListResponse =
UsersListResponse'
{ _ulrKind = "androidenterprise#usersListResponse"
, _ulrUser = Nothing
}
ulrKind :: Lens' UsersListResponse Text
ulrKind = lens _ulrKind (\ s a -> s{_ulrKind = a})
ulrUser :: Lens' UsersListResponse [User]
ulrUser
= lens _ulrUser (\ s a -> s{_ulrUser = a}) . _Default
. _Coerce
instance FromJSON UsersListResponse where
parseJSON
= withObject "UsersListResponse"
(\ o ->
UsersListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#usersListResponse")
<*> (o .:? "user" .!= mempty))
instance ToJSON UsersListResponse where
toJSON UsersListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _ulrKind),
("user" .=) <$> _ulrUser])
newtype AdministratorWebTokenSpecStoreBuilder = AdministratorWebTokenSpecStoreBuilder'
{ _awtssbEnabled :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
administratorWebTokenSpecStoreBuilder
:: AdministratorWebTokenSpecStoreBuilder
administratorWebTokenSpecStoreBuilder =
AdministratorWebTokenSpecStoreBuilder'
{ _awtssbEnabled = Nothing
}
awtssbEnabled :: Lens' AdministratorWebTokenSpecStoreBuilder (Maybe Bool)
awtssbEnabled
= lens _awtssbEnabled
(\ s a -> s{_awtssbEnabled = a})
instance FromJSON
AdministratorWebTokenSpecStoreBuilder where
parseJSON
= withObject "AdministratorWebTokenSpecStoreBuilder"
(\ o ->
AdministratorWebTokenSpecStoreBuilder' <$>
(o .:? "enabled"))
instance ToJSON AdministratorWebTokenSpecStoreBuilder
where
toJSON AdministratorWebTokenSpecStoreBuilder'{..}
= object
(catMaybes [("enabled" .=) <$> _awtssbEnabled])
data AuthenticationToken = AuthenticationToken'
{ _atKind :: !Text
, _atToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
authenticationToken
:: AuthenticationToken
authenticationToken =
AuthenticationToken'
{ _atKind = "androidenterprise#authenticationToken"
, _atToken = Nothing
}
atKind :: Lens' AuthenticationToken Text
atKind = lens _atKind (\ s a -> s{_atKind = a})
atToken :: Lens' AuthenticationToken (Maybe Text)
atToken = lens _atToken (\ s a -> s{_atToken = a})
instance FromJSON AuthenticationToken where
parseJSON
= withObject "AuthenticationToken"
(\ o ->
AuthenticationToken' <$>
(o .:? "kind" .!=
"androidenterprise#authenticationToken")
<*> (o .:? "token"))
instance ToJSON AuthenticationToken where
toJSON AuthenticationToken'{..}
= object
(catMaybes
[Just ("kind" .= _atKind),
("token" .=) <$> _atToken])
data ManagedConfigurationsSettings = ManagedConfigurationsSettings'
{ _mcsLastUpdatedTimestampMillis :: !(Maybe (Textual Int64))
, _mcsManagedProperty :: !(Maybe [ManagedProperty])
, _mcsKind :: !Text
, _mcsMcmId :: !(Maybe Text)
, _mcsName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedConfigurationsSettings
:: ManagedConfigurationsSettings
managedConfigurationsSettings =
ManagedConfigurationsSettings'
{ _mcsLastUpdatedTimestampMillis = Nothing
, _mcsManagedProperty = Nothing
, _mcsKind = "androidenterprise#managedConfigurationsSettings"
, _mcsMcmId = Nothing
, _mcsName = Nothing
}
mcsLastUpdatedTimestampMillis :: Lens' ManagedConfigurationsSettings (Maybe Int64)
mcsLastUpdatedTimestampMillis
= lens _mcsLastUpdatedTimestampMillis
(\ s a -> s{_mcsLastUpdatedTimestampMillis = a})
. mapping _Coerce
mcsManagedProperty :: Lens' ManagedConfigurationsSettings [ManagedProperty]
mcsManagedProperty
= lens _mcsManagedProperty
(\ s a -> s{_mcsManagedProperty = a})
. _Default
. _Coerce
mcsKind :: Lens' ManagedConfigurationsSettings Text
mcsKind = lens _mcsKind (\ s a -> s{_mcsKind = a})
mcsMcmId :: Lens' ManagedConfigurationsSettings (Maybe Text)
mcsMcmId = lens _mcsMcmId (\ s a -> s{_mcsMcmId = a})
mcsName :: Lens' ManagedConfigurationsSettings (Maybe Text)
mcsName = lens _mcsName (\ s a -> s{_mcsName = a})
instance FromJSON ManagedConfigurationsSettings where
parseJSON
= withObject "ManagedConfigurationsSettings"
(\ o ->
ManagedConfigurationsSettings' <$>
(o .:? "lastUpdatedTimestampMillis") <*>
(o .:? "managedProperty" .!= mempty)
<*>
(o .:? "kind" .!=
"androidenterprise#managedConfigurationsSettings")
<*> (o .:? "mcmId")
<*> (o .:? "name"))
instance ToJSON ManagedConfigurationsSettings where
toJSON ManagedConfigurationsSettings'{..}
= object
(catMaybes
[("lastUpdatedTimestampMillis" .=) <$>
_mcsLastUpdatedTimestampMillis,
("managedProperty" .=) <$> _mcsManagedProperty,
Just ("kind" .= _mcsKind),
("mcmId" .=) <$> _mcsMcmId,
("name" .=) <$> _mcsName])
data AppVersion = AppVersion'
{ _avTrack :: !(Maybe Text)
, _avVersionCode :: !(Maybe (Textual Int32))
, _avVersionString :: !(Maybe Text)
, _avTrackId :: !(Maybe [Text])
, _avIsProduction :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
appVersion
:: AppVersion
appVersion =
AppVersion'
{ _avTrack = Nothing
, _avVersionCode = Nothing
, _avVersionString = Nothing
, _avTrackId = Nothing
, _avIsProduction = Nothing
}
avTrack :: Lens' AppVersion (Maybe Text)
avTrack = lens _avTrack (\ s a -> s{_avTrack = a})
avVersionCode :: Lens' AppVersion (Maybe Int32)
avVersionCode
= lens _avVersionCode
(\ s a -> s{_avVersionCode = a})
. mapping _Coerce
avVersionString :: Lens' AppVersion (Maybe Text)
avVersionString
= lens _avVersionString
(\ s a -> s{_avVersionString = a})
avTrackId :: Lens' AppVersion [Text]
avTrackId
= lens _avTrackId (\ s a -> s{_avTrackId = a}) .
_Default
. _Coerce
avIsProduction :: Lens' AppVersion (Maybe Bool)
avIsProduction
= lens _avIsProduction
(\ s a -> s{_avIsProduction = a})
instance FromJSON AppVersion where
parseJSON
= withObject "AppVersion"
(\ o ->
AppVersion' <$>
(o .:? "track") <*> (o .:? "versionCode") <*>
(o .:? "versionString")
<*> (o .:? "trackId" .!= mempty)
<*> (o .:? "isProduction"))
instance ToJSON AppVersion where
toJSON AppVersion'{..}
= object
(catMaybes
[("track" .=) <$> _avTrack,
("versionCode" .=) <$> _avVersionCode,
("versionString" .=) <$> _avVersionString,
("trackId" .=) <$> _avTrackId,
("isProduction" .=) <$> _avIsProduction])
newtype ManagedPropertyBundle = ManagedPropertyBundle'
{ _mpbManagedProperty :: Maybe [ManagedProperty]
} deriving (Eq,Show,Data,Typeable,Generic)
managedPropertyBundle
:: ManagedPropertyBundle
managedPropertyBundle =
ManagedPropertyBundle'
{ _mpbManagedProperty = Nothing
}
mpbManagedProperty :: Lens' ManagedPropertyBundle [ManagedProperty]
mpbManagedProperty
= lens _mpbManagedProperty
(\ s a -> s{_mpbManagedProperty = a})
. _Default
. _Coerce
instance FromJSON ManagedPropertyBundle where
parseJSON
= withObject "ManagedPropertyBundle"
(\ o ->
ManagedPropertyBundle' <$>
(o .:? "managedProperty" .!= mempty))
instance ToJSON ManagedPropertyBundle where
toJSON ManagedPropertyBundle'{..}
= object
(catMaybes
[("managedProperty" .=) <$> _mpbManagedProperty])
data GroupLicensesListResponse = GroupLicensesListResponse'
{ _gllrGroupLicense :: !(Maybe [GroupLicense])
, _gllrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
groupLicensesListResponse
:: GroupLicensesListResponse
groupLicensesListResponse =
GroupLicensesListResponse'
{ _gllrGroupLicense = Nothing
, _gllrKind = "androidenterprise#groupLicensesListResponse"
}
gllrGroupLicense :: Lens' GroupLicensesListResponse [GroupLicense]
gllrGroupLicense
= lens _gllrGroupLicense
(\ s a -> s{_gllrGroupLicense = a})
. _Default
. _Coerce
gllrKind :: Lens' GroupLicensesListResponse Text
gllrKind = lens _gllrKind (\ s a -> s{_gllrKind = a})
instance FromJSON GroupLicensesListResponse where
parseJSON
= withObject "GroupLicensesListResponse"
(\ o ->
GroupLicensesListResponse' <$>
(o .:? "groupLicense" .!= mempty) <*>
(o .:? "kind" .!=
"androidenterprise#groupLicensesListResponse"))
instance ToJSON GroupLicensesListResponse where
toJSON GroupLicensesListResponse'{..}
= object
(catMaybes
[("groupLicense" .=) <$> _gllrGroupLicense,
Just ("kind" .= _gllrKind)])
data AndroidDevicePolicyConfig = AndroidDevicePolicyConfig'
{ _adpcState :: !(Maybe Text)
, _adpcKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
androidDevicePolicyConfig
:: AndroidDevicePolicyConfig
androidDevicePolicyConfig =
AndroidDevicePolicyConfig'
{ _adpcState = Nothing
, _adpcKind = "androidenterprise#androidDevicePolicyConfig"
}
adpcState :: Lens' AndroidDevicePolicyConfig (Maybe Text)
adpcState
= lens _adpcState (\ s a -> s{_adpcState = a})
adpcKind :: Lens' AndroidDevicePolicyConfig Text
adpcKind = lens _adpcKind (\ s a -> s{_adpcKind = a})
instance FromJSON AndroidDevicePolicyConfig where
parseJSON
= withObject "AndroidDevicePolicyConfig"
(\ o ->
AndroidDevicePolicyConfig' <$>
(o .:? "state") <*>
(o .:? "kind" .!=
"androidenterprise#androidDevicePolicyConfig"))
instance ToJSON AndroidDevicePolicyConfig where
toJSON AndroidDevicePolicyConfig'{..}
= object
(catMaybes
[("state" .=) <$> _adpcState,
Just ("kind" .= _adpcKind)])
data ProductSet = ProductSet'
{ _psProductVisibility :: !(Maybe [ProductVisibility])
, _psKind :: !Text
, _psProductSetBehavior :: !(Maybe Text)
, _psProductId :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
productSet
:: ProductSet
productSet =
ProductSet'
{ _psProductVisibility = Nothing
, _psKind = "androidenterprise#productSet"
, _psProductSetBehavior = Nothing
, _psProductId = Nothing
}
psProductVisibility :: Lens' ProductSet [ProductVisibility]
psProductVisibility
= lens _psProductVisibility
(\ s a -> s{_psProductVisibility = a})
. _Default
. _Coerce
psKind :: Lens' ProductSet Text
psKind = lens _psKind (\ s a -> s{_psKind = a})
psProductSetBehavior :: Lens' ProductSet (Maybe Text)
psProductSetBehavior
= lens _psProductSetBehavior
(\ s a -> s{_psProductSetBehavior = a})
psProductId :: Lens' ProductSet [Text]
psProductId
= lens _psProductId (\ s a -> s{_psProductId = a}) .
_Default
. _Coerce
instance FromJSON ProductSet where
parseJSON
= withObject "ProductSet"
(\ o ->
ProductSet' <$>
(o .:? "productVisibility" .!= mempty) <*>
(o .:? "kind" .!= "androidenterprise#productSet")
<*> (o .:? "productSetBehavior")
<*> (o .:? "productId" .!= mempty))
instance ToJSON ProductSet where
toJSON ProductSet'{..}
= object
(catMaybes
[("productVisibility" .=) <$> _psProductVisibility,
Just ("kind" .= _psKind),
("productSetBehavior" .=) <$> _psProductSetBehavior,
("productId" .=) <$> _psProductId])
data Install = Install'
{ _iVersionCode :: !(Maybe (Textual Int32))
, _iKind :: !Text
, _iInstallState :: !(Maybe Text)
, _iProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
install
:: Install
install =
Install'
{ _iVersionCode = Nothing
, _iKind = "androidenterprise#install"
, _iInstallState = Nothing
, _iProductId = Nothing
}
iVersionCode :: Lens' Install (Maybe Int32)
iVersionCode
= lens _iVersionCode (\ s a -> s{_iVersionCode = a})
. mapping _Coerce
iKind :: Lens' Install Text
iKind = lens _iKind (\ s a -> s{_iKind = a})
iInstallState :: Lens' Install (Maybe Text)
iInstallState
= lens _iInstallState
(\ s a -> s{_iInstallState = a})
iProductId :: Lens' Install (Maybe Text)
iProductId
= lens _iProductId (\ s a -> s{_iProductId = a})
instance FromJSON Install where
parseJSON
= withObject "Install"
(\ o ->
Install' <$>
(o .:? "versionCode") <*>
(o .:? "kind" .!= "androidenterprise#install")
<*> (o .:? "installState")
<*> (o .:? "productId"))
instance ToJSON Install where
toJSON Install'{..}
= object
(catMaybes
[("versionCode" .=) <$> _iVersionCode,
Just ("kind" .= _iKind),
("installState" .=) <$> _iInstallState,
("productId" .=) <$> _iProductId])
data MaintenanceWindow = MaintenanceWindow'
{ _mwDurationMs :: !(Maybe (Textual Int64))
, _mwStartTimeAfterMidnightMs :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
maintenanceWindow
:: MaintenanceWindow
maintenanceWindow =
MaintenanceWindow'
{ _mwDurationMs = Nothing
, _mwStartTimeAfterMidnightMs = Nothing
}
mwDurationMs :: Lens' MaintenanceWindow (Maybe Int64)
mwDurationMs
= lens _mwDurationMs (\ s a -> s{_mwDurationMs = a})
. mapping _Coerce
mwStartTimeAfterMidnightMs :: Lens' MaintenanceWindow (Maybe Int64)
mwStartTimeAfterMidnightMs
= lens _mwStartTimeAfterMidnightMs
(\ s a -> s{_mwStartTimeAfterMidnightMs = a})
. mapping _Coerce
instance FromJSON MaintenanceWindow where
parseJSON
= withObject "MaintenanceWindow"
(\ o ->
MaintenanceWindow' <$>
(o .:? "durationMs") <*>
(o .:? "startTimeAfterMidnightMs"))
instance ToJSON MaintenanceWindow where
toJSON MaintenanceWindow'{..}
= object
(catMaybes
[("durationMs" .=) <$> _mwDurationMs,
("startTimeAfterMidnightMs" .=) <$>
_mwStartTimeAfterMidnightMs])
newtype ServiceAccountKeysListResponse = ServiceAccountKeysListResponse'
{ _saklrServiceAccountKey :: Maybe [ServiceAccountKey]
} deriving (Eq,Show,Data,Typeable,Generic)
serviceAccountKeysListResponse
:: ServiceAccountKeysListResponse
serviceAccountKeysListResponse =
ServiceAccountKeysListResponse'
{ _saklrServiceAccountKey = Nothing
}
saklrServiceAccountKey :: Lens' ServiceAccountKeysListResponse [ServiceAccountKey]
saklrServiceAccountKey
= lens _saklrServiceAccountKey
(\ s a -> s{_saklrServiceAccountKey = a})
. _Default
. _Coerce
instance FromJSON ServiceAccountKeysListResponse
where
parseJSON
= withObject "ServiceAccountKeysListResponse"
(\ o ->
ServiceAccountKeysListResponse' <$>
(o .:? "serviceAccountKey" .!= mempty))
instance ToJSON ServiceAccountKeysListResponse where
toJSON ServiceAccountKeysListResponse'{..}
= object
(catMaybes
[("serviceAccountKey" .=) <$>
_saklrServiceAccountKey])
data TrackInfo = TrackInfo'
{ _tiTrackAlias :: !(Maybe Text)
, _tiTrackId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
trackInfo
:: TrackInfo
trackInfo =
TrackInfo'
{ _tiTrackAlias = Nothing
, _tiTrackId = Nothing
}
tiTrackAlias :: Lens' TrackInfo (Maybe Text)
tiTrackAlias
= lens _tiTrackAlias (\ s a -> s{_tiTrackAlias = a})
tiTrackId :: Lens' TrackInfo (Maybe Text)
tiTrackId
= lens _tiTrackId (\ s a -> s{_tiTrackId = a})
instance FromJSON TrackInfo where
parseJSON
= withObject "TrackInfo"
(\ o ->
TrackInfo' <$>
(o .:? "trackAlias") <*> (o .:? "trackId"))
instance ToJSON TrackInfo where
toJSON TrackInfo'{..}
= object
(catMaybes
[("trackAlias" .=) <$> _tiTrackAlias,
("trackId" .=) <$> _tiTrackId])
data User = User'
{ _uAccountIdentifier :: !(Maybe Text)
, _uKind :: !Text
, _uDisplayName :: !(Maybe Text)
, _uId :: !(Maybe Text)
, _uPrimaryEmail :: !(Maybe Text)
, _uManagementType :: !(Maybe Text)
, _uAccountType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
user
:: User
user =
User'
{ _uAccountIdentifier = Nothing
, _uKind = "androidenterprise#user"
, _uDisplayName = Nothing
, _uId = Nothing
, _uPrimaryEmail = Nothing
, _uManagementType = Nothing
, _uAccountType = Nothing
}
uAccountIdentifier :: Lens' User (Maybe Text)
uAccountIdentifier
= lens _uAccountIdentifier
(\ s a -> s{_uAccountIdentifier = a})
uKind :: Lens' User Text
uKind = lens _uKind (\ s a -> s{_uKind = a})
uDisplayName :: Lens' User (Maybe Text)
uDisplayName
= lens _uDisplayName (\ s a -> s{_uDisplayName = a})
uId :: Lens' User (Maybe Text)
uId = lens _uId (\ s a -> s{_uId = a})
uPrimaryEmail :: Lens' User (Maybe Text)
uPrimaryEmail
= lens _uPrimaryEmail
(\ s a -> s{_uPrimaryEmail = a})
uManagementType :: Lens' User (Maybe Text)
uManagementType
= lens _uManagementType
(\ s a -> s{_uManagementType = a})
uAccountType :: Lens' User (Maybe Text)
uAccountType
= lens _uAccountType (\ s a -> s{_uAccountType = a})
instance FromJSON User where
parseJSON
= withObject "User"
(\ o ->
User' <$>
(o .:? "accountIdentifier") <*>
(o .:? "kind" .!= "androidenterprise#user")
<*> (o .:? "displayName")
<*> (o .:? "id")
<*> (o .:? "primaryEmail")
<*> (o .:? "managementType")
<*> (o .:? "accountType"))
instance ToJSON User where
toJSON User'{..}
= object
(catMaybes
[("accountIdentifier" .=) <$> _uAccountIdentifier,
Just ("kind" .= _uKind),
("displayName" .=) <$> _uDisplayName,
("id" .=) <$> _uId,
("primaryEmail" .=) <$> _uPrimaryEmail,
("managementType" .=) <$> _uManagementType,
("accountType" .=) <$> _uAccountType])
data ManagedConfigurationsForDeviceListResponse = ManagedConfigurationsForDeviceListResponse'
{ _mcfdlrKind :: !Text
, _mcfdlrManagedConfigurationForDevice :: !(Maybe [ManagedConfiguration])
} deriving (Eq,Show,Data,Typeable,Generic)
managedConfigurationsForDeviceListResponse
:: ManagedConfigurationsForDeviceListResponse
managedConfigurationsForDeviceListResponse =
ManagedConfigurationsForDeviceListResponse'
{ _mcfdlrKind = "androidenterprise#managedConfigurationsForDeviceListResponse"
, _mcfdlrManagedConfigurationForDevice = Nothing
}
mcfdlrKind :: Lens' ManagedConfigurationsForDeviceListResponse Text
mcfdlrKind
= lens _mcfdlrKind (\ s a -> s{_mcfdlrKind = a})
mcfdlrManagedConfigurationForDevice :: Lens' ManagedConfigurationsForDeviceListResponse [ManagedConfiguration]
mcfdlrManagedConfigurationForDevice
= lens _mcfdlrManagedConfigurationForDevice
(\ s a ->
s{_mcfdlrManagedConfigurationForDevice = a})
. _Default
. _Coerce
instance FromJSON
ManagedConfigurationsForDeviceListResponse where
parseJSON
= withObject
"ManagedConfigurationsForDeviceListResponse"
(\ o ->
ManagedConfigurationsForDeviceListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#managedConfigurationsForDeviceListResponse")
<*>
(o .:? "managedConfigurationForDevice" .!= mempty))
instance ToJSON
ManagedConfigurationsForDeviceListResponse where
toJSON
ManagedConfigurationsForDeviceListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _mcfdlrKind),
("managedConfigurationForDevice" .=) <$>
_mcfdlrManagedConfigurationForDevice])
newtype ProductsGenerateApprovalURLResponse = ProductsGenerateApprovalURLResponse'
{ _pgaurURL :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
productsGenerateApprovalURLResponse
:: ProductsGenerateApprovalURLResponse
productsGenerateApprovalURLResponse =
ProductsGenerateApprovalURLResponse'
{ _pgaurURL = Nothing
}
pgaurURL :: Lens' ProductsGenerateApprovalURLResponse (Maybe Text)
pgaurURL = lens _pgaurURL (\ s a -> s{_pgaurURL = a})
instance FromJSON ProductsGenerateApprovalURLResponse
where
parseJSON
= withObject "ProductsGenerateApprovalURLResponse"
(\ o ->
ProductsGenerateApprovalURLResponse' <$>
(o .:? "url"))
instance ToJSON ProductsGenerateApprovalURLResponse
where
toJSON ProductsGenerateApprovalURLResponse'{..}
= object (catMaybes [("url" .=) <$> _pgaurURL])
data StorePage = StorePage'
{ _spKind :: !Text
, _spLink :: !(Maybe [Text])
, _spName :: !(Maybe [LocalizedText])
, _spId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
storePage
:: StorePage
storePage =
StorePage'
{ _spKind = "androidenterprise#storePage"
, _spLink = Nothing
, _spName = Nothing
, _spId = Nothing
}
spKind :: Lens' StorePage Text
spKind = lens _spKind (\ s a -> s{_spKind = a})
spLink :: Lens' StorePage [Text]
spLink
= lens _spLink (\ s a -> s{_spLink = a}) . _Default .
_Coerce
spName :: Lens' StorePage [LocalizedText]
spName
= lens _spName (\ s a -> s{_spName = a}) . _Default .
_Coerce
spId :: Lens' StorePage (Maybe Text)
spId = lens _spId (\ s a -> s{_spId = a})
instance FromJSON StorePage where
parseJSON
= withObject "StorePage"
(\ o ->
StorePage' <$>
(o .:? "kind" .!= "androidenterprise#storePage") <*>
(o .:? "link" .!= mempty)
<*> (o .:? "name" .!= mempty)
<*> (o .:? "id"))
instance ToJSON StorePage where
toJSON StorePage'{..}
= object
(catMaybes
[Just ("kind" .= _spKind), ("link" .=) <$> _spLink,
("name" .=) <$> _spName, ("id" .=) <$> _spId])
data EnterprisesSendTestPushNotificationResponse = EnterprisesSendTestPushNotificationResponse'
{ _estpnrTopicName :: !(Maybe Text)
, _estpnrMessageId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesSendTestPushNotificationResponse
:: EnterprisesSendTestPushNotificationResponse
enterprisesSendTestPushNotificationResponse =
EnterprisesSendTestPushNotificationResponse'
{ _estpnrTopicName = Nothing
, _estpnrMessageId = Nothing
}
estpnrTopicName :: Lens' EnterprisesSendTestPushNotificationResponse (Maybe Text)
estpnrTopicName
= lens _estpnrTopicName
(\ s a -> s{_estpnrTopicName = a})
estpnrMessageId :: Lens' EnterprisesSendTestPushNotificationResponse (Maybe Text)
estpnrMessageId
= lens _estpnrMessageId
(\ s a -> s{_estpnrMessageId = a})
instance FromJSON
EnterprisesSendTestPushNotificationResponse where
parseJSON
= withObject
"EnterprisesSendTestPushNotificationResponse"
(\ o ->
EnterprisesSendTestPushNotificationResponse' <$>
(o .:? "topicName") <*> (o .:? "messageId"))
instance ToJSON
EnterprisesSendTestPushNotificationResponse where
toJSON
EnterprisesSendTestPushNotificationResponse'{..}
= object
(catMaybes
[("topicName" .=) <$> _estpnrTopicName,
("messageId" .=) <$> _estpnrMessageId])
data ServiceAccount = ServiceAccount'
{ _saKind :: !Text
, _saKey :: !(Maybe ServiceAccountKey)
, _saName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
serviceAccount
:: ServiceAccount
serviceAccount =
ServiceAccount'
{ _saKind = "androidenterprise#serviceAccount"
, _saKey = Nothing
, _saName = Nothing
}
saKind :: Lens' ServiceAccount Text
saKind = lens _saKind (\ s a -> s{_saKind = a})
saKey :: Lens' ServiceAccount (Maybe ServiceAccountKey)
saKey = lens _saKey (\ s a -> s{_saKey = a})
saName :: Lens' ServiceAccount (Maybe Text)
saName = lens _saName (\ s a -> s{_saName = a})
instance FromJSON ServiceAccount where
parseJSON
= withObject "ServiceAccount"
(\ o ->
ServiceAccount' <$>
(o .:? "kind" .!= "androidenterprise#serviceAccount")
<*> (o .:? "key")
<*> (o .:? "name"))
instance ToJSON ServiceAccount where
toJSON ServiceAccount'{..}
= object
(catMaybes
[Just ("kind" .= _saKind), ("key" .=) <$> _saKey,
("name" .=) <$> _saName])
data VariableSet = VariableSet'
{ _vsKind :: !Text
, _vsUserValue :: !(Maybe Text)
, _vsPlaceholder :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
variableSet
:: VariableSet
variableSet =
VariableSet'
{ _vsKind = "androidenterprise#variableSet"
, _vsUserValue = Nothing
, _vsPlaceholder = Nothing
}
vsKind :: Lens' VariableSet Text
vsKind = lens _vsKind (\ s a -> s{_vsKind = a})
vsUserValue :: Lens' VariableSet (Maybe Text)
vsUserValue
= lens _vsUserValue (\ s a -> s{_vsUserValue = a})
vsPlaceholder :: Lens' VariableSet (Maybe Text)
vsPlaceholder
= lens _vsPlaceholder
(\ s a -> s{_vsPlaceholder = a})
instance FromJSON VariableSet where
parseJSON
= withObject "VariableSet"
(\ o ->
VariableSet' <$>
(o .:? "kind" .!= "androidenterprise#variableSet")
<*> (o .:? "userValue")
<*> (o .:? "placeholder"))
instance ToJSON VariableSet where
toJSON VariableSet'{..}
= object
(catMaybes
[Just ("kind" .= _vsKind),
("userValue" .=) <$> _vsUserValue,
("placeholder" .=) <$> _vsPlaceholder])
newtype AppUpdateEvent = AppUpdateEvent'
{ _aueProductId :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
appUpdateEvent
:: AppUpdateEvent
appUpdateEvent =
AppUpdateEvent'
{ _aueProductId = Nothing
}
aueProductId :: Lens' AppUpdateEvent (Maybe Text)
aueProductId
= lens _aueProductId (\ s a -> s{_aueProductId = a})
instance FromJSON AppUpdateEvent where
parseJSON
= withObject "AppUpdateEvent"
(\ o -> AppUpdateEvent' <$> (o .:? "productId"))
instance ToJSON AppUpdateEvent where
toJSON AppUpdateEvent'{..}
= object
(catMaybes [("productId" .=) <$> _aueProductId])
data EnterprisesListResponse = EnterprisesListResponse'
{ _elrKind :: !Text
, _elrEnterprise :: !(Maybe [Enterprise])
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesListResponse
:: EnterprisesListResponse
enterprisesListResponse =
EnterprisesListResponse'
{ _elrKind = "androidenterprise#enterprisesListResponse"
, _elrEnterprise = Nothing
}
elrKind :: Lens' EnterprisesListResponse Text
elrKind = lens _elrKind (\ s a -> s{_elrKind = a})
elrEnterprise :: Lens' EnterprisesListResponse [Enterprise]
elrEnterprise
= lens _elrEnterprise
(\ s a -> s{_elrEnterprise = a})
. _Default
. _Coerce
instance FromJSON EnterprisesListResponse where
parseJSON
= withObject "EnterprisesListResponse"
(\ o ->
EnterprisesListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#enterprisesListResponse")
<*> (o .:? "enterprise" .!= mempty))
instance ToJSON EnterprisesListResponse where
toJSON EnterprisesListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _elrKind),
("enterprise" .=) <$> _elrEnterprise])
data NotificationSet = NotificationSet'
{ _nsNotificationSetId :: !(Maybe Text)
, _nsNotification :: !(Maybe [Notification])
, _nsKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
notificationSet
:: NotificationSet
notificationSet =
NotificationSet'
{ _nsNotificationSetId = Nothing
, _nsNotification = Nothing
, _nsKind = "androidenterprise#notificationSet"
}
nsNotificationSetId :: Lens' NotificationSet (Maybe Text)
nsNotificationSetId
= lens _nsNotificationSetId
(\ s a -> s{_nsNotificationSetId = a})
nsNotification :: Lens' NotificationSet [Notification]
nsNotification
= lens _nsNotification
(\ s a -> s{_nsNotification = a})
. _Default
. _Coerce
nsKind :: Lens' NotificationSet Text
nsKind = lens _nsKind (\ s a -> s{_nsKind = a})
instance FromJSON NotificationSet where
parseJSON
= withObject "NotificationSet"
(\ o ->
NotificationSet' <$>
(o .:? "notificationSetId") <*>
(o .:? "notification" .!= mempty)
<*>
(o .:? "kind" .!=
"androidenterprise#notificationSet"))
instance ToJSON NotificationSet where
toJSON NotificationSet'{..}
= object
(catMaybes
[("notificationSetId" .=) <$> _nsNotificationSetId,
("notification" .=) <$> _nsNotification,
Just ("kind" .= _nsKind)])
data AppRestrictionsSchema = AppRestrictionsSchema'
{ _arsKind :: !Text
, _arsRestrictions :: !(Maybe [AppRestrictionsSchemaRestriction])
} deriving (Eq,Show,Data,Typeable,Generic)
appRestrictionsSchema
:: AppRestrictionsSchema
appRestrictionsSchema =
AppRestrictionsSchema'
{ _arsKind = "androidenterprise#appRestrictionsSchema"
, _arsRestrictions = Nothing
}
arsKind :: Lens' AppRestrictionsSchema Text
arsKind = lens _arsKind (\ s a -> s{_arsKind = a})
arsRestrictions :: Lens' AppRestrictionsSchema [AppRestrictionsSchemaRestriction]
arsRestrictions
= lens _arsRestrictions
(\ s a -> s{_arsRestrictions = a})
. _Default
. _Coerce
instance FromJSON AppRestrictionsSchema where
parseJSON
= withObject "AppRestrictionsSchema"
(\ o ->
AppRestrictionsSchema' <$>
(o .:? "kind" .!=
"androidenterprise#appRestrictionsSchema")
<*> (o .:? "restrictions" .!= mempty))
instance ToJSON AppRestrictionsSchema where
toJSON AppRestrictionsSchema'{..}
= object
(catMaybes
[Just ("kind" .= _arsKind),
("restrictions" .=) <$> _arsRestrictions])
newtype WebAppIcon = WebAppIcon'
{ _waiImageData :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
webAppIcon
:: WebAppIcon
webAppIcon =
WebAppIcon'
{ _waiImageData = Nothing
}
waiImageData :: Lens' WebAppIcon (Maybe Text)
waiImageData
= lens _waiImageData (\ s a -> s{_waiImageData = a})
instance FromJSON WebAppIcon where
parseJSON
= withObject "WebAppIcon"
(\ o -> WebAppIcon' <$> (o .:? "imageData"))
instance ToJSON WebAppIcon where
toJSON WebAppIcon'{..}
= object
(catMaybes [("imageData" .=) <$> _waiImageData])
data LocalizedText = LocalizedText'
{ _ltText :: !(Maybe Text)
, _ltLocale :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
localizedText
:: LocalizedText
localizedText =
LocalizedText'
{ _ltText = Nothing
, _ltLocale = Nothing
}
ltText :: Lens' LocalizedText (Maybe Text)
ltText = lens _ltText (\ s a -> s{_ltText = a})
ltLocale :: Lens' LocalizedText (Maybe Text)
ltLocale = lens _ltLocale (\ s a -> s{_ltLocale = a})
instance FromJSON LocalizedText where
parseJSON
= withObject "LocalizedText"
(\ o ->
LocalizedText' <$>
(o .:? "text") <*> (o .:? "locale"))
instance ToJSON LocalizedText where
toJSON LocalizedText'{..}
= object
(catMaybes
[("text" .=) <$> _ltText,
("locale" .=) <$> _ltLocale])
data UserToken = UserToken'
{ _utKind :: !Text
, _utToken :: !(Maybe Text)
, _utUserId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userToken
:: UserToken
userToken =
UserToken'
{ _utKind = "androidenterprise#userToken"
, _utToken = Nothing
, _utUserId = Nothing
}
utKind :: Lens' UserToken Text
utKind = lens _utKind (\ s a -> s{_utKind = a})
utToken :: Lens' UserToken (Maybe Text)
utToken = lens _utToken (\ s a -> s{_utToken = a})
utUserId :: Lens' UserToken (Maybe Text)
utUserId = lens _utUserId (\ s a -> s{_utUserId = a})
instance FromJSON UserToken where
parseJSON
= withObject "UserToken"
(\ o ->
UserToken' <$>
(o .:? "kind" .!= "androidenterprise#userToken") <*>
(o .:? "token")
<*> (o .:? "userId"))
instance ToJSON UserToken where
toJSON UserToken'{..}
= object
(catMaybes
[Just ("kind" .= _utKind), ("token" .=) <$> _utToken,
("userId" .=) <$> _utUserId])
newtype AdministratorWebTokenSpecPrivateApps = AdministratorWebTokenSpecPrivateApps'
{ _awtspaEnabled :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
administratorWebTokenSpecPrivateApps
:: AdministratorWebTokenSpecPrivateApps
administratorWebTokenSpecPrivateApps =
AdministratorWebTokenSpecPrivateApps'
{ _awtspaEnabled = Nothing
}
awtspaEnabled :: Lens' AdministratorWebTokenSpecPrivateApps (Maybe Bool)
awtspaEnabled
= lens _awtspaEnabled
(\ s a -> s{_awtspaEnabled = a})
instance FromJSON
AdministratorWebTokenSpecPrivateApps where
parseJSON
= withObject "AdministratorWebTokenSpecPrivateApps"
(\ o ->
AdministratorWebTokenSpecPrivateApps' <$>
(o .:? "enabled"))
instance ToJSON AdministratorWebTokenSpecPrivateApps
where
toJSON AdministratorWebTokenSpecPrivateApps'{..}
= object
(catMaybes [("enabled" .=) <$> _awtspaEnabled])
data DevicesListResponse = DevicesListResponse'
{ _dlrKind :: !Text
, _dlrDevice :: !(Maybe [Device])
} deriving (Eq,Show,Data,Typeable,Generic)
devicesListResponse
:: DevicesListResponse
devicesListResponse =
DevicesListResponse'
{ _dlrKind = "androidenterprise#devicesListResponse"
, _dlrDevice = Nothing
}
dlrKind :: Lens' DevicesListResponse Text
dlrKind = lens _dlrKind (\ s a -> s{_dlrKind = a})
dlrDevice :: Lens' DevicesListResponse [Device]
dlrDevice
= lens _dlrDevice (\ s a -> s{_dlrDevice = a}) .
_Default
. _Coerce
instance FromJSON DevicesListResponse where
parseJSON
= withObject "DevicesListResponse"
(\ o ->
DevicesListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#devicesListResponse")
<*> (o .:? "device" .!= mempty))
instance ToJSON DevicesListResponse where
toJSON DevicesListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _dlrKind),
("device" .=) <$> _dlrDevice])
data ProductSigningCertificate = ProductSigningCertificate'
{ _pscCertificateHashSha256 :: !(Maybe Text)
, _pscCertificateHashSha1 :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productSigningCertificate
:: ProductSigningCertificate
productSigningCertificate =
ProductSigningCertificate'
{ _pscCertificateHashSha256 = Nothing
, _pscCertificateHashSha1 = Nothing
}
pscCertificateHashSha256 :: Lens' ProductSigningCertificate (Maybe Text)
pscCertificateHashSha256
= lens _pscCertificateHashSha256
(\ s a -> s{_pscCertificateHashSha256 = a})
pscCertificateHashSha1 :: Lens' ProductSigningCertificate (Maybe Text)
pscCertificateHashSha1
= lens _pscCertificateHashSha1
(\ s a -> s{_pscCertificateHashSha1 = a})
instance FromJSON ProductSigningCertificate where
parseJSON
= withObject "ProductSigningCertificate"
(\ o ->
ProductSigningCertificate' <$>
(o .:? "certificateHashSha256") <*>
(o .:? "certificateHashSha1"))
instance ToJSON ProductSigningCertificate where
toJSON ProductSigningCertificate'{..}
= object
(catMaybes
[("certificateHashSha256" .=) <$>
_pscCertificateHashSha256,
("certificateHashSha1" .=) <$>
_pscCertificateHashSha1])
data Enterprise = Enterprise'
{ _eKind :: !Text
, _eAdministrator :: !(Maybe [Administrator])
, _ePrimaryDomain :: !(Maybe Text)
, _eName :: !(Maybe Text)
, _eId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
enterprise
:: Enterprise
enterprise =
Enterprise'
{ _eKind = "androidenterprise#enterprise"
, _eAdministrator = Nothing
, _ePrimaryDomain = Nothing
, _eName = Nothing
, _eId = Nothing
}
eKind :: Lens' Enterprise Text
eKind = lens _eKind (\ s a -> s{_eKind = a})
eAdministrator :: Lens' Enterprise [Administrator]
eAdministrator
= lens _eAdministrator
(\ s a -> s{_eAdministrator = a})
. _Default
. _Coerce
ePrimaryDomain :: Lens' Enterprise (Maybe Text)
ePrimaryDomain
= lens _ePrimaryDomain
(\ s a -> s{_ePrimaryDomain = a})
eName :: Lens' Enterprise (Maybe Text)
eName = lens _eName (\ s a -> s{_eName = a})
eId :: Lens' Enterprise (Maybe Text)
eId = lens _eId (\ s a -> s{_eId = a})
instance FromJSON Enterprise where
parseJSON
= withObject "Enterprise"
(\ o ->
Enterprise' <$>
(o .:? "kind" .!= "androidenterprise#enterprise") <*>
(o .:? "administrator" .!= mempty)
<*> (o .:? "primaryDomain")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON Enterprise where
toJSON Enterprise'{..}
= object
(catMaybes
[Just ("kind" .= _eKind),
("administrator" .=) <$> _eAdministrator,
("primaryDomain" .=) <$> _ePrimaryDomain,
("name" .=) <$> _eName, ("id" .=) <$> _eId])
data InstallFailureEvent = InstallFailureEvent'
{ _ifeFailureReason :: !(Maybe Text)
, _ifeFailureDetails :: !(Maybe Text)
, _ifeUserId :: !(Maybe Text)
, _ifeDeviceId :: !(Maybe Text)
, _ifeProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
installFailureEvent
:: InstallFailureEvent
installFailureEvent =
InstallFailureEvent'
{ _ifeFailureReason = Nothing
, _ifeFailureDetails = Nothing
, _ifeUserId = Nothing
, _ifeDeviceId = Nothing
, _ifeProductId = Nothing
}
ifeFailureReason :: Lens' InstallFailureEvent (Maybe Text)
ifeFailureReason
= lens _ifeFailureReason
(\ s a -> s{_ifeFailureReason = a})
ifeFailureDetails :: Lens' InstallFailureEvent (Maybe Text)
ifeFailureDetails
= lens _ifeFailureDetails
(\ s a -> s{_ifeFailureDetails = a})
ifeUserId :: Lens' InstallFailureEvent (Maybe Text)
ifeUserId
= lens _ifeUserId (\ s a -> s{_ifeUserId = a})
ifeDeviceId :: Lens' InstallFailureEvent (Maybe Text)
ifeDeviceId
= lens _ifeDeviceId (\ s a -> s{_ifeDeviceId = a})
ifeProductId :: Lens' InstallFailureEvent (Maybe Text)
ifeProductId
= lens _ifeProductId (\ s a -> s{_ifeProductId = a})
instance FromJSON InstallFailureEvent where
parseJSON
= withObject "InstallFailureEvent"
(\ o ->
InstallFailureEvent' <$>
(o .:? "failureReason") <*> (o .:? "failureDetails")
<*> (o .:? "userId")
<*> (o .:? "deviceId")
<*> (o .:? "productId"))
instance ToJSON InstallFailureEvent where
toJSON InstallFailureEvent'{..}
= object
(catMaybes
[("failureReason" .=) <$> _ifeFailureReason,
("failureDetails" .=) <$> _ifeFailureDetails,
("userId" .=) <$> _ifeUserId,
("deviceId" .=) <$> _ifeDeviceId,
("productId" .=) <$> _ifeProductId])
data ManagedConfigurationsForUserListResponse = ManagedConfigurationsForUserListResponse'
{ _mcfulrManagedConfigurationForUser :: !(Maybe [ManagedConfiguration])
, _mcfulrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managedConfigurationsForUserListResponse
:: ManagedConfigurationsForUserListResponse
managedConfigurationsForUserListResponse =
ManagedConfigurationsForUserListResponse'
{ _mcfulrManagedConfigurationForUser = Nothing
, _mcfulrKind = "androidenterprise#managedConfigurationsForUserListResponse"
}
mcfulrManagedConfigurationForUser :: Lens' ManagedConfigurationsForUserListResponse [ManagedConfiguration]
mcfulrManagedConfigurationForUser
= lens _mcfulrManagedConfigurationForUser
(\ s a -> s{_mcfulrManagedConfigurationForUser = a})
. _Default
. _Coerce
mcfulrKind :: Lens' ManagedConfigurationsForUserListResponse Text
mcfulrKind
= lens _mcfulrKind (\ s a -> s{_mcfulrKind = a})
instance FromJSON
ManagedConfigurationsForUserListResponse where
parseJSON
= withObject
"ManagedConfigurationsForUserListResponse"
(\ o ->
ManagedConfigurationsForUserListResponse' <$>
(o .:? "managedConfigurationForUser" .!= mempty) <*>
(o .:? "kind" .!=
"androidenterprise#managedConfigurationsForUserListResponse"))
instance ToJSON
ManagedConfigurationsForUserListResponse where
toJSON ManagedConfigurationsForUserListResponse'{..}
= object
(catMaybes
[("managedConfigurationForUser" .=) <$>
_mcfulrManagedConfigurationForUser,
Just ("kind" .= _mcfulrKind)])
data ConfigurationVariables = ConfigurationVariables'
{ _cvKind :: !Text
, _cvMcmId :: !(Maybe Text)
, _cvVariableSet :: !(Maybe [VariableSet])
} deriving (Eq,Show,Data,Typeable,Generic)
configurationVariables
:: ConfigurationVariables
configurationVariables =
ConfigurationVariables'
{ _cvKind = "androidenterprise#configurationVariables"
, _cvMcmId = Nothing
, _cvVariableSet = Nothing
}
cvKind :: Lens' ConfigurationVariables Text
cvKind = lens _cvKind (\ s a -> s{_cvKind = a})
cvMcmId :: Lens' ConfigurationVariables (Maybe Text)
cvMcmId = lens _cvMcmId (\ s a -> s{_cvMcmId = a})
cvVariableSet :: Lens' ConfigurationVariables [VariableSet]
cvVariableSet
= lens _cvVariableSet
(\ s a -> s{_cvVariableSet = a})
. _Default
. _Coerce
instance FromJSON ConfigurationVariables where
parseJSON
= withObject "ConfigurationVariables"
(\ o ->
ConfigurationVariables' <$>
(o .:? "kind" .!=
"androidenterprise#configurationVariables")
<*> (o .:? "mcmId")
<*> (o .:? "variableSet" .!= mempty))
instance ToJSON ConfigurationVariables where
toJSON ConfigurationVariables'{..}
= object
(catMaybes
[Just ("kind" .= _cvKind), ("mcmId" .=) <$> _cvMcmId,
("variableSet" .=) <$> _cvVariableSet])
data StoreLayout = StoreLayout'
{ _slStoreLayoutType :: !(Maybe Text)
, _slKind :: !Text
, _slHomepageId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
storeLayout
:: StoreLayout
storeLayout =
StoreLayout'
{ _slStoreLayoutType = Nothing
, _slKind = "androidenterprise#storeLayout"
, _slHomepageId = Nothing
}
slStoreLayoutType :: Lens' StoreLayout (Maybe Text)
slStoreLayoutType
= lens _slStoreLayoutType
(\ s a -> s{_slStoreLayoutType = a})
slKind :: Lens' StoreLayout Text
slKind = lens _slKind (\ s a -> s{_slKind = a})
slHomepageId :: Lens' StoreLayout (Maybe Text)
slHomepageId
= lens _slHomepageId (\ s a -> s{_slHomepageId = a})
instance FromJSON StoreLayout where
parseJSON
= withObject "StoreLayout"
(\ o ->
StoreLayout' <$>
(o .:? "storeLayoutType") <*>
(o .:? "kind" .!= "androidenterprise#storeLayout")
<*> (o .:? "homepageId"))
instance ToJSON StoreLayout where
toJSON StoreLayout'{..}
= object
(catMaybes
[("storeLayoutType" .=) <$> _slStoreLayoutType,
Just ("kind" .= _slKind),
("homepageId" .=) <$> _slHomepageId])
newtype AppRestrictionsSchemaChangeEvent = AppRestrictionsSchemaChangeEvent'
{ _arsceProductId :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
appRestrictionsSchemaChangeEvent
:: AppRestrictionsSchemaChangeEvent
appRestrictionsSchemaChangeEvent =
AppRestrictionsSchemaChangeEvent'
{ _arsceProductId = Nothing
}
arsceProductId :: Lens' AppRestrictionsSchemaChangeEvent (Maybe Text)
arsceProductId
= lens _arsceProductId
(\ s a -> s{_arsceProductId = a})
instance FromJSON AppRestrictionsSchemaChangeEvent
where
parseJSON
= withObject "AppRestrictionsSchemaChangeEvent"
(\ o ->
AppRestrictionsSchemaChangeEvent' <$>
(o .:? "productId"))
instance ToJSON AppRestrictionsSchemaChangeEvent
where
toJSON AppRestrictionsSchemaChangeEvent'{..}
= object
(catMaybes [("productId" .=) <$> _arsceProductId])
data NewDeviceEvent = NewDeviceEvent'
{ _ndeUserId :: !(Maybe Text)
, _ndeDpcPackageName :: !(Maybe Text)
, _ndeDeviceId :: !(Maybe Text)
, _ndeManagementType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
newDeviceEvent
:: NewDeviceEvent
newDeviceEvent =
NewDeviceEvent'
{ _ndeUserId = Nothing
, _ndeDpcPackageName = Nothing
, _ndeDeviceId = Nothing
, _ndeManagementType = Nothing
}
ndeUserId :: Lens' NewDeviceEvent (Maybe Text)
ndeUserId
= lens _ndeUserId (\ s a -> s{_ndeUserId = a})
ndeDpcPackageName :: Lens' NewDeviceEvent (Maybe Text)
ndeDpcPackageName
= lens _ndeDpcPackageName
(\ s a -> s{_ndeDpcPackageName = a})
ndeDeviceId :: Lens' NewDeviceEvent (Maybe Text)
ndeDeviceId
= lens _ndeDeviceId (\ s a -> s{_ndeDeviceId = a})
ndeManagementType :: Lens' NewDeviceEvent (Maybe Text)
ndeManagementType
= lens _ndeManagementType
(\ s a -> s{_ndeManagementType = a})
instance FromJSON NewDeviceEvent where
parseJSON
= withObject "NewDeviceEvent"
(\ o ->
NewDeviceEvent' <$>
(o .:? "userId") <*> (o .:? "dpcPackageName") <*>
(o .:? "deviceId")
<*> (o .:? "managementType"))
instance ToJSON NewDeviceEvent where
toJSON NewDeviceEvent'{..}
= object
(catMaybes
[("userId" .=) <$> _ndeUserId,
("dpcPackageName" .=) <$> _ndeDpcPackageName,
("deviceId" .=) <$> _ndeDeviceId,
("managementType" .=) <$> _ndeManagementType])
data Policy = Policy'
{ _pProductAvailabilityPolicy :: !(Maybe Text)
, _pProductPolicy :: !(Maybe [ProductPolicy])
, _pMaintenanceWindow :: !(Maybe MaintenanceWindow)
, _pAutoUpdatePolicy :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
policy
:: Policy
policy =
Policy'
{ _pProductAvailabilityPolicy = Nothing
, _pProductPolicy = Nothing
, _pMaintenanceWindow = Nothing
, _pAutoUpdatePolicy = Nothing
}
pProductAvailabilityPolicy :: Lens' Policy (Maybe Text)
pProductAvailabilityPolicy
= lens _pProductAvailabilityPolicy
(\ s a -> s{_pProductAvailabilityPolicy = a})
pProductPolicy :: Lens' Policy [ProductPolicy]
pProductPolicy
= lens _pProductPolicy
(\ s a -> s{_pProductPolicy = a})
. _Default
. _Coerce
pMaintenanceWindow :: Lens' Policy (Maybe MaintenanceWindow)
pMaintenanceWindow
= lens _pMaintenanceWindow
(\ s a -> s{_pMaintenanceWindow = a})
pAutoUpdatePolicy :: Lens' Policy (Maybe Text)
pAutoUpdatePolicy
= lens _pAutoUpdatePolicy
(\ s a -> s{_pAutoUpdatePolicy = a})
instance FromJSON Policy where
parseJSON
= withObject "Policy"
(\ o ->
Policy' <$>
(o .:? "productAvailabilityPolicy") <*>
(o .:? "productPolicy" .!= mempty)
<*> (o .:? "maintenanceWindow")
<*> (o .:? "autoUpdatePolicy"))
instance ToJSON Policy where
toJSON Policy'{..}
= object
(catMaybes
[("productAvailabilityPolicy" .=) <$>
_pProductAvailabilityPolicy,
("productPolicy" .=) <$> _pProductPolicy,
("maintenanceWindow" .=) <$> _pMaintenanceWindow,
("autoUpdatePolicy" .=) <$> _pAutoUpdatePolicy])
data AdministratorWebToken = AdministratorWebToken'
{ _awtKind :: !Text
, _awtToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
administratorWebToken
:: AdministratorWebToken
administratorWebToken =
AdministratorWebToken'
{ _awtKind = "androidenterprise#administratorWebToken"
, _awtToken = Nothing
}
awtKind :: Lens' AdministratorWebToken Text
awtKind = lens _awtKind (\ s a -> s{_awtKind = a})
awtToken :: Lens' AdministratorWebToken (Maybe Text)
awtToken = lens _awtToken (\ s a -> s{_awtToken = a})
instance FromJSON AdministratorWebToken where
parseJSON
= withObject "AdministratorWebToken"
(\ o ->
AdministratorWebToken' <$>
(o .:? "kind" .!=
"androidenterprise#administratorWebToken")
<*> (o .:? "token"))
instance ToJSON AdministratorWebToken where
toJSON AdministratorWebToken'{..}
= object
(catMaybes
[Just ("kind" .= _awtKind),
("token" .=) <$> _awtToken])
data SignupInfo = SignupInfo'
{ _siCompletionToken :: !(Maybe Text)
, _siKind :: !Text
, _siURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
signupInfo
:: SignupInfo
signupInfo =
SignupInfo'
{ _siCompletionToken = Nothing
, _siKind = "androidenterprise#signupInfo"
, _siURL = Nothing
}
siCompletionToken :: Lens' SignupInfo (Maybe Text)
siCompletionToken
= lens _siCompletionToken
(\ s a -> s{_siCompletionToken = a})
siKind :: Lens' SignupInfo Text
siKind = lens _siKind (\ s a -> s{_siKind = a})
siURL :: Lens' SignupInfo (Maybe Text)
siURL = lens _siURL (\ s a -> s{_siURL = a})
instance FromJSON SignupInfo where
parseJSON
= withObject "SignupInfo"
(\ o ->
SignupInfo' <$>
(o .:? "completionToken") <*>
(o .:? "kind" .!= "androidenterprise#signupInfo")
<*> (o .:? "url"))
instance ToJSON SignupInfo where
toJSON SignupInfo'{..}
= object
(catMaybes
[("completionToken" .=) <$> _siCompletionToken,
Just ("kind" .= _siKind), ("url" .=) <$> _siURL])
data Product = Product'
{ _pScreenshotURLs :: !(Maybe [Text])
, _pLastUpdatedTimestampMillis :: !(Maybe (Textual Int64))
, _pSmallIconURL :: !(Maybe Text)
, _pAuthorName :: !(Maybe Text)
, _pAppTracks :: !(Maybe [TrackInfo])
, _pKind :: !Text
, _pWorkDetailsURL :: !(Maybe Text)
, _pRequiresContainerApp :: !(Maybe Bool)
, _pCategory :: !(Maybe Text)
, _pAppVersion :: !(Maybe [AppVersion])
, _pProductPricing :: !(Maybe Text)
, _pDistributionChannel :: !(Maybe Text)
, _pMinAndroidSdkVersion :: !(Maybe (Textual Int32))
, _pAvailableCountries :: !(Maybe [Text])
, _pAvailableTracks :: !(Maybe [Text])
, _pIconURL :: !(Maybe Text)
, _pPermissions :: !(Maybe [ProductPermission])
, _pTitle :: !(Maybe Text)
, _pSigningCertificate :: !(Maybe ProductSigningCertificate)
, _pContentRating :: !(Maybe Text)
, _pProductId :: !(Maybe Text)
, _pRecentChanges :: !(Maybe Text)
, _pDescription :: !(Maybe Text)
, _pDetailsURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
product
:: Product
product =
Product'
{ _pScreenshotURLs = Nothing
, _pLastUpdatedTimestampMillis = Nothing
, _pSmallIconURL = Nothing
, _pAuthorName = Nothing
, _pAppTracks = Nothing
, _pKind = "androidenterprise#product"
, _pWorkDetailsURL = Nothing
, _pRequiresContainerApp = Nothing
, _pCategory = Nothing
, _pAppVersion = Nothing
, _pProductPricing = Nothing
, _pDistributionChannel = Nothing
, _pMinAndroidSdkVersion = Nothing
, _pAvailableCountries = Nothing
, _pAvailableTracks = Nothing
, _pIconURL = Nothing
, _pPermissions = Nothing
, _pTitle = Nothing
, _pSigningCertificate = Nothing
, _pContentRating = Nothing
, _pProductId = Nothing
, _pRecentChanges = Nothing
, _pDescription = Nothing
, _pDetailsURL = Nothing
}
pScreenshotURLs :: Lens' Product [Text]
pScreenshotURLs
= lens _pScreenshotURLs
(\ s a -> s{_pScreenshotURLs = a})
. _Default
. _Coerce
pLastUpdatedTimestampMillis :: Lens' Product (Maybe Int64)
pLastUpdatedTimestampMillis
= lens _pLastUpdatedTimestampMillis
(\ s a -> s{_pLastUpdatedTimestampMillis = a})
. mapping _Coerce
pSmallIconURL :: Lens' Product (Maybe Text)
pSmallIconURL
= lens _pSmallIconURL
(\ s a -> s{_pSmallIconURL = a})
pAuthorName :: Lens' Product (Maybe Text)
pAuthorName
= lens _pAuthorName (\ s a -> s{_pAuthorName = a})
pAppTracks :: Lens' Product [TrackInfo]
pAppTracks
= lens _pAppTracks (\ s a -> s{_pAppTracks = a}) .
_Default
. _Coerce
pKind :: Lens' Product Text
pKind = lens _pKind (\ s a -> s{_pKind = a})
pWorkDetailsURL :: Lens' Product (Maybe Text)
pWorkDetailsURL
= lens _pWorkDetailsURL
(\ s a -> s{_pWorkDetailsURL = a})
pRequiresContainerApp :: Lens' Product (Maybe Bool)
pRequiresContainerApp
= lens _pRequiresContainerApp
(\ s a -> s{_pRequiresContainerApp = a})
pCategory :: Lens' Product (Maybe Text)
pCategory
= lens _pCategory (\ s a -> s{_pCategory = a})
pAppVersion :: Lens' Product [AppVersion]
pAppVersion
= lens _pAppVersion (\ s a -> s{_pAppVersion = a}) .
_Default
. _Coerce
pProductPricing :: Lens' Product (Maybe Text)
pProductPricing
= lens _pProductPricing
(\ s a -> s{_pProductPricing = a})
pDistributionChannel :: Lens' Product (Maybe Text)
pDistributionChannel
= lens _pDistributionChannel
(\ s a -> s{_pDistributionChannel = a})
pMinAndroidSdkVersion :: Lens' Product (Maybe Int32)
pMinAndroidSdkVersion
= lens _pMinAndroidSdkVersion
(\ s a -> s{_pMinAndroidSdkVersion = a})
. mapping _Coerce
pAvailableCountries :: Lens' Product [Text]
pAvailableCountries
= lens _pAvailableCountries
(\ s a -> s{_pAvailableCountries = a})
. _Default
. _Coerce
pAvailableTracks :: Lens' Product [Text]
pAvailableTracks
= lens _pAvailableTracks
(\ s a -> s{_pAvailableTracks = a})
. _Default
. _Coerce
pIconURL :: Lens' Product (Maybe Text)
pIconURL = lens _pIconURL (\ s a -> s{_pIconURL = a})
pPermissions :: Lens' Product [ProductPermission]
pPermissions
= lens _pPermissions (\ s a -> s{_pPermissions = a})
. _Default
. _Coerce
pTitle :: Lens' Product (Maybe Text)
pTitle = lens _pTitle (\ s a -> s{_pTitle = a})
pSigningCertificate :: Lens' Product (Maybe ProductSigningCertificate)
pSigningCertificate
= lens _pSigningCertificate
(\ s a -> s{_pSigningCertificate = a})
pContentRating :: Lens' Product (Maybe Text)
pContentRating
= lens _pContentRating
(\ s a -> s{_pContentRating = a})
pProductId :: Lens' Product (Maybe Text)
pProductId
= lens _pProductId (\ s a -> s{_pProductId = a})
pRecentChanges :: Lens' Product (Maybe Text)
pRecentChanges
= lens _pRecentChanges
(\ s a -> s{_pRecentChanges = a})
pDescription :: Lens' Product (Maybe Text)
pDescription
= lens _pDescription (\ s a -> s{_pDescription = a})
pDetailsURL :: Lens' Product (Maybe Text)
pDetailsURL
= lens _pDetailsURL (\ s a -> s{_pDetailsURL = a})
instance FromJSON Product where
parseJSON
= withObject "Product"
(\ o ->
Product' <$>
(o .:? "screenshotUrls" .!= mempty) <*>
(o .:? "lastUpdatedTimestampMillis")
<*> (o .:? "smallIconUrl")
<*> (o .:? "authorName")
<*> (o .:? "appTracks" .!= mempty)
<*> (o .:? "kind" .!= "androidenterprise#product")
<*> (o .:? "workDetailsUrl")
<*> (o .:? "requiresContainerApp")
<*> (o .:? "category")
<*> (o .:? "appVersion" .!= mempty)
<*> (o .:? "productPricing")
<*> (o .:? "distributionChannel")
<*> (o .:? "minAndroidSdkVersion")
<*> (o .:? "availableCountries" .!= mempty)
<*> (o .:? "availableTracks" .!= mempty)
<*> (o .:? "iconUrl")
<*> (o .:? "permissions" .!= mempty)
<*> (o .:? "title")
<*> (o .:? "signingCertificate")
<*> (o .:? "contentRating")
<*> (o .:? "productId")
<*> (o .:? "recentChanges")
<*> (o .:? "description")
<*> (o .:? "detailsUrl"))
instance ToJSON Product where
toJSON Product'{..}
= object
(catMaybes
[("screenshotUrls" .=) <$> _pScreenshotURLs,
("lastUpdatedTimestampMillis" .=) <$>
_pLastUpdatedTimestampMillis,
("smallIconUrl" .=) <$> _pSmallIconURL,
("authorName" .=) <$> _pAuthorName,
("appTracks" .=) <$> _pAppTracks,
Just ("kind" .= _pKind),
("workDetailsUrl" .=) <$> _pWorkDetailsURL,
("requiresContainerApp" .=) <$>
_pRequiresContainerApp,
("category" .=) <$> _pCategory,
("appVersion" .=) <$> _pAppVersion,
("productPricing" .=) <$> _pProductPricing,
("distributionChannel" .=) <$> _pDistributionChannel,
("minAndroidSdkVersion" .=) <$>
_pMinAndroidSdkVersion,
("availableCountries" .=) <$> _pAvailableCountries,
("availableTracks" .=) <$> _pAvailableTracks,
("iconUrl" .=) <$> _pIconURL,
("permissions" .=) <$> _pPermissions,
("title" .=) <$> _pTitle,
("signingCertificate" .=) <$> _pSigningCertificate,
("contentRating" .=) <$> _pContentRating,
("productId" .=) <$> _pProductId,
("recentChanges" .=) <$> _pRecentChanges,
("description" .=) <$> _pDescription,
("detailsUrl" .=) <$> _pDetailsURL])
data EntitlementsListResponse = EntitlementsListResponse'
{ _entKind :: !Text
, _entEntitlement :: !(Maybe [Entitlement])
} deriving (Eq,Show,Data,Typeable,Generic)
entitlementsListResponse
:: EntitlementsListResponse
entitlementsListResponse =
EntitlementsListResponse'
{ _entKind = "androidenterprise#entitlementsListResponse"
, _entEntitlement = Nothing
}
entKind :: Lens' EntitlementsListResponse Text
entKind = lens _entKind (\ s a -> s{_entKind = a})
entEntitlement :: Lens' EntitlementsListResponse [Entitlement]
entEntitlement
= lens _entEntitlement
(\ s a -> s{_entEntitlement = a})
. _Default
. _Coerce
instance FromJSON EntitlementsListResponse where
parseJSON
= withObject "EntitlementsListResponse"
(\ o ->
EntitlementsListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#entitlementsListResponse")
<*> (o .:? "entitlement" .!= mempty))
instance ToJSON EntitlementsListResponse where
toJSON EntitlementsListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _entKind),
("entitlement" .=) <$> _entEntitlement])
data ProductPermissions = ProductPermissions'
{ _ppsKind :: !Text
, _ppsPermission :: !(Maybe [ProductPermission])
, _ppsProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productPermissions
:: ProductPermissions
productPermissions =
ProductPermissions'
{ _ppsKind = "androidenterprise#productPermissions"
, _ppsPermission = Nothing
, _ppsProductId = Nothing
}
ppsKind :: Lens' ProductPermissions Text
ppsKind = lens _ppsKind (\ s a -> s{_ppsKind = a})
ppsPermission :: Lens' ProductPermissions [ProductPermission]
ppsPermission
= lens _ppsPermission
(\ s a -> s{_ppsPermission = a})
. _Default
. _Coerce
ppsProductId :: Lens' ProductPermissions (Maybe Text)
ppsProductId
= lens _ppsProductId (\ s a -> s{_ppsProductId = a})
instance FromJSON ProductPermissions where
parseJSON
= withObject "ProductPermissions"
(\ o ->
ProductPermissions' <$>
(o .:? "kind" .!=
"androidenterprise#productPermissions")
<*> (o .:? "permission" .!= mempty)
<*> (o .:? "productId"))
instance ToJSON ProductPermissions where
toJSON ProductPermissions'{..}
= object
(catMaybes
[Just ("kind" .= _ppsKind),
("permission" .=) <$> _ppsPermission,
("productId" .=) <$> _ppsProductId])
data Permission = Permission'
{ _perKind :: !Text
, _perName :: !(Maybe Text)
, _perDescription :: !(Maybe Text)
, _perPermissionId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
permission
:: Permission
permission =
Permission'
{ _perKind = "androidenterprise#permission"
, _perName = Nothing
, _perDescription = Nothing
, _perPermissionId = Nothing
}
perKind :: Lens' Permission Text
perKind = lens _perKind (\ s a -> s{_perKind = a})
perName :: Lens' Permission (Maybe Text)
perName = lens _perName (\ s a -> s{_perName = a})
perDescription :: Lens' Permission (Maybe Text)
perDescription
= lens _perDescription
(\ s a -> s{_perDescription = a})
perPermissionId :: Lens' Permission (Maybe Text)
perPermissionId
= lens _perPermissionId
(\ s a -> s{_perPermissionId = a})
instance FromJSON Permission where
parseJSON
= withObject "Permission"
(\ o ->
Permission' <$>
(o .:? "kind" .!= "androidenterprise#permission") <*>
(o .:? "name")
<*> (o .:? "description")
<*> (o .:? "permissionId"))
instance ToJSON Permission where
toJSON Permission'{..}
= object
(catMaybes
[Just ("kind" .= _perKind), ("name" .=) <$> _perName,
("description" .=) <$> _perDescription,
("permissionId" .=) <$> _perPermissionId])
data WebAppsListResponse = WebAppsListResponse'
{ _walrKind :: !Text
, _walrWebApp :: !(Maybe [WebApp])
} deriving (Eq,Show,Data,Typeable,Generic)
webAppsListResponse
:: WebAppsListResponse
webAppsListResponse =
WebAppsListResponse'
{ _walrKind = "androidenterprise#webAppsListResponse"
, _walrWebApp = Nothing
}
walrKind :: Lens' WebAppsListResponse Text
walrKind = lens _walrKind (\ s a -> s{_walrKind = a})
walrWebApp :: Lens' WebAppsListResponse [WebApp]
walrWebApp
= lens _walrWebApp (\ s a -> s{_walrWebApp = a}) .
_Default
. _Coerce
instance FromJSON WebAppsListResponse where
parseJSON
= withObject "WebAppsListResponse"
(\ o ->
WebAppsListResponse' <$>
(o .:? "kind" .!=
"androidenterprise#webAppsListResponse")
<*> (o .:? "webApp" .!= mempty))
instance ToJSON WebAppsListResponse where
toJSON WebAppsListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _walrKind),
("webApp" .=) <$> _walrWebApp])
data ProductsApproveRequest = ProductsApproveRequest'
{ _parApprovalURLInfo :: !(Maybe ApprovalURLInfo)
, _parApprovedPermissions :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productsApproveRequest
:: ProductsApproveRequest
productsApproveRequest =
ProductsApproveRequest'
{ _parApprovalURLInfo = Nothing
, _parApprovedPermissions = Nothing
}
parApprovalURLInfo :: Lens' ProductsApproveRequest (Maybe ApprovalURLInfo)
parApprovalURLInfo
= lens _parApprovalURLInfo
(\ s a -> s{_parApprovalURLInfo = a})
parApprovedPermissions :: Lens' ProductsApproveRequest (Maybe Text)
parApprovedPermissions
= lens _parApprovedPermissions
(\ s a -> s{_parApprovedPermissions = a})
instance FromJSON ProductsApproveRequest where
parseJSON
= withObject "ProductsApproveRequest"
(\ o ->
ProductsApproveRequest' <$>
(o .:? "approvalUrlInfo") <*>
(o .:? "approvedPermissions"))
instance ToJSON ProductsApproveRequest where
toJSON ProductsApproveRequest'{..}
= object
(catMaybes
[("approvalUrlInfo" .=) <$> _parApprovalURLInfo,
("approvedPermissions" .=) <$>
_parApprovedPermissions])
data AutoInstallPolicy = AutoInstallPolicy'
{ _aipAutoInstallConstraint :: !(Maybe [AutoInstallConstraint])
, _aipAutoInstallPriority :: !(Maybe (Textual Int32))
, _aipAutoInstallMode :: !(Maybe Text)
, _aipMinimumVersionCode :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
autoInstallPolicy
:: AutoInstallPolicy
autoInstallPolicy =
AutoInstallPolicy'
{ _aipAutoInstallConstraint = Nothing
, _aipAutoInstallPriority = Nothing
, _aipAutoInstallMode = Nothing
, _aipMinimumVersionCode = Nothing
}
aipAutoInstallConstraint :: Lens' AutoInstallPolicy [AutoInstallConstraint]
aipAutoInstallConstraint
= lens _aipAutoInstallConstraint
(\ s a -> s{_aipAutoInstallConstraint = a})
. _Default
. _Coerce
aipAutoInstallPriority :: Lens' AutoInstallPolicy (Maybe Int32)
aipAutoInstallPriority
= lens _aipAutoInstallPriority
(\ s a -> s{_aipAutoInstallPriority = a})
. mapping _Coerce
aipAutoInstallMode :: Lens' AutoInstallPolicy (Maybe Text)
aipAutoInstallMode
= lens _aipAutoInstallMode
(\ s a -> s{_aipAutoInstallMode = a})
aipMinimumVersionCode :: Lens' AutoInstallPolicy (Maybe Int32)
aipMinimumVersionCode
= lens _aipMinimumVersionCode
(\ s a -> s{_aipMinimumVersionCode = a})
. mapping _Coerce
instance FromJSON AutoInstallPolicy where
parseJSON
= withObject "AutoInstallPolicy"
(\ o ->
AutoInstallPolicy' <$>
(o .:? "autoInstallConstraint" .!= mempty) <*>
(o .:? "autoInstallPriority")
<*> (o .:? "autoInstallMode")
<*> (o .:? "minimumVersionCode"))
instance ToJSON AutoInstallPolicy where
toJSON AutoInstallPolicy'{..}
= object
(catMaybes
[("autoInstallConstraint" .=) <$>
_aipAutoInstallConstraint,
("autoInstallPriority" .=) <$>
_aipAutoInstallPriority,
("autoInstallMode" .=) <$> _aipAutoInstallMode,
("minimumVersionCode" .=) <$>
_aipMinimumVersionCode])
data Entitlement = Entitlement'
{ _eeKind :: !Text
, _eeReason :: !(Maybe Text)
, _eeProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
entitlement
:: Entitlement
entitlement =
Entitlement'
{ _eeKind = "androidenterprise#entitlement"
, _eeReason = Nothing
, _eeProductId = Nothing
}
eeKind :: Lens' Entitlement Text
eeKind = lens _eeKind (\ s a -> s{_eeKind = a})
eeReason :: Lens' Entitlement (Maybe Text)
eeReason = lens _eeReason (\ s a -> s{_eeReason = a})
eeProductId :: Lens' Entitlement (Maybe Text)
eeProductId
= lens _eeProductId (\ s a -> s{_eeProductId = a})
instance FromJSON Entitlement where
parseJSON
= withObject "Entitlement"
(\ o ->
Entitlement' <$>
(o .:? "kind" .!= "androidenterprise#entitlement")
<*> (o .:? "reason")
<*> (o .:? "productId"))
instance ToJSON Entitlement where
toJSON Entitlement'{..}
= object
(catMaybes
[Just ("kind" .= _eeKind),
("reason" .=) <$> _eeReason,
("productId" .=) <$> _eeProductId])
data ProductsListResponse = ProductsListResponse'
{ _plrTokenPagination :: !(Maybe TokenPagination)
, _plrPageInfo :: !(Maybe PageInfo)
, _plrKind :: !Text
, _plrProduct :: !(Maybe [Product])
} deriving (Eq,Show,Data,Typeable,Generic)
productsListResponse
:: ProductsListResponse
productsListResponse =
ProductsListResponse'
{ _plrTokenPagination = Nothing
, _plrPageInfo = Nothing
, _plrKind = "androidenterprise#productsListResponse"
, _plrProduct = Nothing
}
plrTokenPagination :: Lens' ProductsListResponse (Maybe TokenPagination)
plrTokenPagination
= lens _plrTokenPagination
(\ s a -> s{_plrTokenPagination = a})
plrPageInfo :: Lens' ProductsListResponse (Maybe PageInfo)
plrPageInfo
= lens _plrPageInfo (\ s a -> s{_plrPageInfo = a})
plrKind :: Lens' ProductsListResponse Text
plrKind = lens _plrKind (\ s a -> s{_plrKind = a})
plrProduct :: Lens' ProductsListResponse [Product]
plrProduct
= lens _plrProduct (\ s a -> s{_plrProduct = a}) .
_Default
. _Coerce
instance FromJSON ProductsListResponse where
parseJSON
= withObject "ProductsListResponse"
(\ o ->
ProductsListResponse' <$>
(o .:? "tokenPagination") <*> (o .:? "pageInfo") <*>
(o .:? "kind" .!=
"androidenterprise#productsListResponse")
<*> (o .:? "product" .!= mempty))
instance ToJSON ProductsListResponse where
toJSON ProductsListResponse'{..}
= object
(catMaybes
[("tokenPagination" .=) <$> _plrTokenPagination,
("pageInfo" .=) <$> _plrPageInfo,
Just ("kind" .= _plrKind),
("product" .=) <$> _plrProduct])
data WebApp = WebApp'
{ _waWebAppId :: !(Maybe Text)
, _waVersionCode :: !(Maybe (Textual Int64))
, _waIcons :: !(Maybe [WebAppIcon])
, _waStartURL :: !(Maybe Text)
, _waDisplayMode :: !(Maybe Text)
, _waIsPublished :: !(Maybe Bool)
, _waTitle :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
webApp
:: WebApp
webApp =
WebApp'
{ _waWebAppId = Nothing
, _waVersionCode = Nothing
, _waIcons = Nothing
, _waStartURL = Nothing
, _waDisplayMode = Nothing
, _waIsPublished = Nothing
, _waTitle = Nothing
}
waWebAppId :: Lens' WebApp (Maybe Text)
waWebAppId
= lens _waWebAppId (\ s a -> s{_waWebAppId = a})
waVersionCode :: Lens' WebApp (Maybe Int64)
waVersionCode
= lens _waVersionCode
(\ s a -> s{_waVersionCode = a})
. mapping _Coerce
waIcons :: Lens' WebApp [WebAppIcon]
waIcons
= lens _waIcons (\ s a -> s{_waIcons = a}) . _Default
. _Coerce
waStartURL :: Lens' WebApp (Maybe Text)
waStartURL
= lens _waStartURL (\ s a -> s{_waStartURL = a})
waDisplayMode :: Lens' WebApp (Maybe Text)
waDisplayMode
= lens _waDisplayMode
(\ s a -> s{_waDisplayMode = a})
waIsPublished :: Lens' WebApp (Maybe Bool)
waIsPublished
= lens _waIsPublished
(\ s a -> s{_waIsPublished = a})
waTitle :: Lens' WebApp (Maybe Text)
waTitle = lens _waTitle (\ s a -> s{_waTitle = a})
instance FromJSON WebApp where
parseJSON
= withObject "WebApp"
(\ o ->
WebApp' <$>
(o .:? "webAppId") <*> (o .:? "versionCode") <*>
(o .:? "icons" .!= mempty)
<*> (o .:? "startUrl")
<*> (o .:? "displayMode")
<*> (o .:? "isPublished")
<*> (o .:? "title"))
instance ToJSON WebApp where
toJSON WebApp'{..}
= object
(catMaybes
[("webAppId" .=) <$> _waWebAppId,
("versionCode" .=) <$> _waVersionCode,
("icons" .=) <$> _waIcons,
("startUrl" .=) <$> _waStartURL,
("displayMode" .=) <$> _waDisplayMode,
("isPublished" .=) <$> _waIsPublished,
("title" .=) <$> _waTitle])