@@ -600,6 +600,127 @@ instance ToJSON ApprovalURLInfo where
600 [("approvalUrl" .=) <$> _auiApprovalURL,
600 [("approvalUrl" .=) <$> _auiApprovalURL,
601 Just ("kind" .= _auiKind)])
601 Just ("kind" .= _auiKind)])
603+-- | A managed property of a managed configuration. The property must match
604+-- one of the properties in the app restrictions schema of the product.
605+-- Exactly one of the value fields must be populated, and it must match the
606+-- property\'s type in the app restrictions schema.
608+-- /See:/ 'managedProperty' smart constructor.
609+data ManagedProperty = ManagedProperty'
610+ { _mpValueStringArray :: !(Maybe [Text])
611+ , _mpValueBool :: !(Maybe Bool)
612+ , _mpKey :: !(Maybe Text)
613+ , _mpValueBundle :: !(Maybe ManagedPropertyBundle)
614+ , _mpValueInteger :: !(Maybe (Textual Int32))
615+ , _mpValueBundleArray :: !(Maybe [ManagedPropertyBundle])
616+ , _mpValueString :: !(Maybe Text)
617+ } deriving (Eq,Show,Data,Typeable,Generic)
619+-- | Creates a value of 'ManagedProperty' with the minimum fields required to make a request.
621+-- Use one of the following lenses to modify other fields as desired:
623+-- * 'mpValueStringArray'
631+-- * 'mpValueInteger'
633+-- * 'mpValueBundleArray'
640+ { _mpValueStringArray = Nothing
641+ , _mpValueBool = Nothing
643+ , _mpValueBundle = Nothing
644+ , _mpValueInteger = Nothing
645+ , _mpValueBundleArray = Nothing
646+ , _mpValueString = Nothing
649+-- | The list of string values - this will only be present if type of the
650+-- property is multiselect.
651+mpValueStringArray :: Lens' ManagedProperty [Text]
653+ = lens _mpValueStringArray
654+ (\ s a -> s{_mpValueStringArray = a})
658+-- | The boolean value - this will only be present if type of the property is
660+mpValueBool :: Lens' ManagedProperty (Maybe Bool)
662+ = lens _mpValueBool (\ s a -> s{_mpValueBool = a})
664+-- | The unique key that identifies the property.
665+mpKey :: Lens' ManagedProperty (Maybe Text)
666+mpKey = lens _mpKey (\ s a -> s{_mpKey = a})
668+-- | The bundle of managed properties - this will only be present if type of
669+-- the property is bundle.
670+mpValueBundle :: Lens' ManagedProperty (Maybe ManagedPropertyBundle)
672+ = lens _mpValueBundle
673+ (\ s a -> s{_mpValueBundle = a})
675+-- | The integer value - this will only be present if type of the property is
677+mpValueInteger :: Lens' ManagedProperty (Maybe Int32)
679+ = lens _mpValueInteger
680+ (\ s a -> s{_mpValueInteger = a})
683+-- | The list of bundles of properties - this will only be present if type of
684+-- the property is bundle_array.
685+mpValueBundleArray :: Lens' ManagedProperty [ManagedPropertyBundle]
687+ = lens _mpValueBundleArray
688+ (\ s a -> s{_mpValueBundleArray = a})
692+-- | The string value - this will only be present if type of the property is
693+-- string, choice or hidden.
694+mpValueString :: Lens' ManagedProperty (Maybe Text)
696+ = lens _mpValueString
697+ (\ s a -> s{_mpValueString = a})
699+instance FromJSON ManagedProperty where
701+ = withObject "ManagedProperty"
703+ ManagedProperty' <$>
704+ (o .:? "valueStringArray" .!= mempty) <*>
707+ <*> (o .:? "valueBundle")
708+ <*> (o .:? "valueInteger")
709+ <*> (o .:? "valueBundleArray" .!= mempty)
710+ <*> (o .:? "valueString"))
712+instance ToJSON ManagedProperty where
713+ toJSON ManagedProperty'{..}
716+ [("valueStringArray" .=) <$> _mpValueStringArray,
717+ ("valueBool" .=) <$> _mpValueBool,
718+ ("key" .=) <$> _mpKey,
719+ ("valueBundle" .=) <$> _mpValueBundle,
720+ ("valueInteger" .=) <$> _mpValueInteger,
721+ ("valueBundleArray" .=) <$> _mpValueBundleArray,
722+ ("valueString" .=) <$> _mpValueString])
603-- | The store page resources for the enterprise.
724-- | The store page resources for the enterprise.
605-- /See:/ 'storeLayoutClustersListResponse' smart constructor.
726-- /See:/ 'storeLayoutClustersListResponse' smart constructor.
@@ -653,6 +774,73 @@ instance ToJSON StoreLayoutClustersListResponse where
653 [("cluster" .=) <$> _slclrCluster,
774 [("cluster" .=) <$> _slclrCluster,
654 Just ("kind" .= _slclrKind)])
775 Just ("kind" .= _slclrKind)])
777+-- | A managed configuration resource contains the set of managed properties
778+-- that have been configured for an Android app. The app\'s developer would
779+-- have defined configurable properties in the managed configurations
782+-- /See:/ 'managedConfiguration' smart constructor.
783+data ManagedConfiguration = ManagedConfiguration'
784+ { _mcManagedProperty :: !(Maybe [ManagedProperty])
786+ , _mcProductId :: !(Maybe Text)
787+ } deriving (Eq,Show,Data,Typeable,Generic)
789+-- | Creates a value of 'ManagedConfiguration' with the minimum fields required to make a request.
791+-- Use one of the following lenses to modify other fields as desired:
793+-- * 'mcManagedProperty'
799+ :: ManagedConfiguration
800+managedConfiguration =
801+ ManagedConfiguration'
802+ { _mcManagedProperty = Nothing
803+ , _mcKind = "androidenterprise#managedConfiguration"
804+ , _mcProductId = Nothing
807+-- | The set of managed properties for this configuration.
808+mcManagedProperty :: Lens' ManagedConfiguration [ManagedProperty]
810+ = lens _mcManagedProperty
811+ (\ s a -> s{_mcManagedProperty = a})
815+-- | Identifies what kind of resource this is. Value: the fixed string
816+-- \"androidenterprise#managedConfiguration\".
817+mcKind :: Lens' ManagedConfiguration Text
818+mcKind = lens _mcKind (\ s a -> s{_mcKind = a})
820+-- | The ID of the product that the managed configuration is for, e.g.
821+-- \"app:com.google.android.gm\".
822+mcProductId :: Lens' ManagedConfiguration (Maybe Text)
824+ = lens _mcProductId (\ s a -> s{_mcProductId = a})
826+instance FromJSON ManagedConfiguration where
828+ = withObject "ManagedConfiguration"
830+ ManagedConfiguration' <$>
831+ (o .:? "managedProperty" .!= mempty) <*>
833+ "androidenterprise#managedConfiguration")
834+ <*> (o .:? "productId"))
836+instance ToJSON ManagedConfiguration where
837+ toJSON ManagedConfiguration'{..}
840+ [("managedProperty" .=) <$> _mcManagedProperty,
841+ Just ("kind" .= _mcKind),
842+ ("productId" .=) <$> _mcProductId])
656-- | Definition of a Google Play for Work store cluster, a list of products
844-- | Definition of a Google Play for Work store cluster, a list of products
657-- displayed as part of a store page.
845-- displayed as part of a store page.
@@ -746,6 +934,202 @@ instance ToJSON StoreCluster where
746 ("id" .=) <$> _scId,
934 ("id" .=) <$> _scId,
747 ("productId" .=) <$> _scProductId])
935 ("productId" .=) <$> _scProductId])
937+-- | Specification for a token used to generate iframes. The token specifies
938+-- what data the admin is allowed to modify and the URI the iframe is
939+-- allowed to communiate with.
941+-- /See:/ 'administratorWebTokenSpec' smart constructor.
942+data AdministratorWebTokenSpec = AdministratorWebTokenSpec'
943+ { _awtsParent :: !(Maybe Text)
944+ , _awtsKind :: !Text
945+ , _awtsPermission :: !(Maybe [Text])
946+ } deriving (Eq,Show,Data,Typeable,Generic)
948+-- | Creates a value of 'AdministratorWebTokenSpec' with the minimum fields required to make a request.
950+-- Use one of the following lenses to modify other fields as desired:
956+-- * 'awtsPermission'
957+administratorWebTokenSpec
958+ :: AdministratorWebTokenSpec
959+administratorWebTokenSpec =
960+ AdministratorWebTokenSpec'
961+ { _awtsParent = Nothing
962+ , _awtsKind = "androidenterprise#administratorWebTokenSpec"
963+ , _awtsPermission = Nothing
966+-- | The URI of the parent frame hosting the iframe. To prevent XSS, the
967+-- iframe may not be hosted at other URIs. This URI must be https.
968+awtsParent :: Lens' AdministratorWebTokenSpec (Maybe Text)
970+ = lens _awtsParent (\ s a -> s{_awtsParent = a})
972+-- | Identifies what kind of resource this is. Value: the fixed string
973+-- \"androidenterprise#administratorWebTokenSpec\".
974+awtsKind :: Lens' AdministratorWebTokenSpec Text
975+awtsKind = lens _awtsKind (\ s a -> s{_awtsKind = a})
977+-- | The list of permissions the admin is granted within the iframe. The
978+-- admin will only be allowed to view an iframe if they have all of the
979+-- permissions associated with it.
980+awtsPermission :: Lens' AdministratorWebTokenSpec [Text]
982+ = lens _awtsPermission
983+ (\ s a -> s{_awtsPermission = a})
987+instance FromJSON AdministratorWebTokenSpec where
989+ = withObject "AdministratorWebTokenSpec"
991+ AdministratorWebTokenSpec' <$>
992+ (o .:? "parent") <*>
994+ "androidenterprise#administratorWebTokenSpec")
995+ <*> (o .:? "permission" .!= mempty))
997+instance ToJSON AdministratorWebTokenSpec where
998+ toJSON AdministratorWebTokenSpec'{..}
1001+ [("parent" .=) <$> _awtsParent,
1002+ Just ("kind" .= _awtsKind),
1003+ ("permission" .=) <$> _awtsPermission])
1005+-- | A notification of one event relating to an enterprise.
1007+-- /See:/ 'notification' smart constructor.
1008+data Notification = Notification'
1009+ { _nEnterpriseId :: !(Maybe Text)
1010+ , _nNewPermissionsEvent :: !(Maybe NewPermissionsEvent)
1011+ , _nProductApprovalEvent :: !(Maybe ProductApprovalEvent)
1012+ , _nProductAvailabilityChangeEvent :: !(Maybe ProductAvailabilityChangeEvent)
1013+ , _nAppUpdateEvent :: !(Maybe AppUpdateEvent)
1014+ , _nInstallFailureEvent :: !(Maybe InstallFailureEvent)
1015+ , _nAppRestrictionsSchemaChangeEvent :: !(Maybe AppRestrictionsSchemaChangeEvent)
1016+ , _nTimestampMillis :: !(Maybe (Textual Int64))
1017+ } deriving (Eq,Show,Data,Typeable,Generic)
1019+-- | Creates a value of 'Notification' with the minimum fields required to make a request.
1021+-- Use one of the following lenses to modify other fields as desired:
1023+-- * 'nEnterpriseId'
1025+-- * 'nNewPermissionsEvent'
1027+-- * 'nProductApprovalEvent'
1029+-- * 'nProductAvailabilityChangeEvent'
1031+-- * 'nAppUpdateEvent'
1033+-- * 'nInstallFailureEvent'
1035+-- * 'nAppRestrictionsSchemaChangeEvent'
1037+-- * 'nTimestampMillis'
1042+ { _nEnterpriseId = Nothing
1043+ , _nNewPermissionsEvent = Nothing
1044+ , _nProductApprovalEvent = Nothing
1045+ , _nProductAvailabilityChangeEvent = Nothing
1046+ , _nAppUpdateEvent = Nothing
1047+ , _nInstallFailureEvent = Nothing
1048+ , _nAppRestrictionsSchemaChangeEvent = Nothing
1049+ , _nTimestampMillis = Nothing
1052+-- | The ID of the enterprise for which the notification is sent. This will
1053+-- always be present.
1054+nEnterpriseId :: Lens' Notification (Maybe Text)
1056+ = lens _nEnterpriseId
1057+ (\ s a -> s{_nEnterpriseId = a})
1059+-- | Notifications about new app permissions.
1060+nNewPermissionsEvent :: Lens' Notification (Maybe NewPermissionsEvent)
1061+nNewPermissionsEvent
1062+ = lens _nNewPermissionsEvent
1063+ (\ s a -> s{_nNewPermissionsEvent = a})
1065+-- | Notifications about changes to a product\'s approval status.
1066+nProductApprovalEvent :: Lens' Notification (Maybe ProductApprovalEvent)
1067+nProductApprovalEvent
1068+ = lens _nProductApprovalEvent
1069+ (\ s a -> s{_nProductApprovalEvent = a})
1071+-- | Notifications about product availability changes.
1072+nProductAvailabilityChangeEvent :: Lens' Notification (Maybe ProductAvailabilityChangeEvent)
1073+nProductAvailabilityChangeEvent
1074+ = lens _nProductAvailabilityChangeEvent
1075+ (\ s a -> s{_nProductAvailabilityChangeEvent = a})
1077+-- | Notifications about app updates.
1078+nAppUpdateEvent :: Lens' Notification (Maybe AppUpdateEvent)
1080+ = lens _nAppUpdateEvent
1081+ (\ s a -> s{_nAppUpdateEvent = a})
1083+-- | Notifications about an app installation failure.
1084+nInstallFailureEvent :: Lens' Notification (Maybe InstallFailureEvent)
1085+nInstallFailureEvent
1086+ = lens _nInstallFailureEvent
1087+ (\ s a -> s{_nInstallFailureEvent = a})
1089+-- | Notifications about new app restrictions schema changes.
1090+nAppRestrictionsSchemaChangeEvent :: Lens' Notification (Maybe AppRestrictionsSchemaChangeEvent)
1091+nAppRestrictionsSchemaChangeEvent
1092+ = lens _nAppRestrictionsSchemaChangeEvent
1093+ (\ s a -> s{_nAppRestrictionsSchemaChangeEvent = a})
1095+-- | The time when the notification was published in milliseconds since
1096+-- 1970-01-01T00:00:00Z. This will always be present.
1097+nTimestampMillis :: Lens' Notification (Maybe Int64)
1099+ = lens _nTimestampMillis
1100+ (\ s a -> s{_nTimestampMillis = a})
1103+instance FromJSON Notification where
1105+ = withObject "Notification"
1108+ (o .:? "enterpriseId") <*>
1109+ (o .:? "newPermissionsEvent")
1110+ <*> (o .:? "productApprovalEvent")
1111+ <*> (o .:? "productAvailabilityChangeEvent")
1112+ <*> (o .:? "appUpdateEvent")
1113+ <*> (o .:? "installFailureEvent")
1114+ <*> (o .:? "appRestrictionsSchemaChangeEvent")
1115+ <*> (o .:? "timestampMillis"))
1117+instance ToJSON Notification where
1118+ toJSON Notification'{..}
1121+ [("enterpriseId" .=) <$> _nEnterpriseId,
1122+ ("newPermissionsEvent" .=) <$> _nNewPermissionsEvent,
1123+ ("productApprovalEvent" .=) <$>
1124+ _nProductApprovalEvent,
1125+ ("productAvailabilityChangeEvent" .=) <$>
1126+ _nProductAvailabilityChangeEvent,
1127+ ("appUpdateEvent" .=) <$> _nAppUpdateEvent,
1128+ ("installFailureEvent" .=) <$> _nInstallFailureEvent,
1129+ ("appRestrictionsSchemaChangeEvent" .=) <$>
1130+ _nAppRestrictionsSchemaChangeEvent,
1131+ ("timestampMillis" .=) <$> _nTimestampMillis])
750-- /See:/ 'pageInfo' smart constructor.
1134-- /See:/ 'pageInfo' smart constructor.
751data PageInfo = PageInfo'
1135data PageInfo = PageInfo'
@@ -856,6 +1240,179 @@ instance ToJSON ProductPermission where
856 [("state" .=) <$> _ppState,
1240 [("state" .=) <$> _ppState,
857 ("permissionId" .=) <$> _ppPermissionId])
1241 ("permissionId" .=) <$> _ppPermissionId])
1243+-- | An event generated when new permissions are added to an app.
1245+-- /See:/ 'newPermissionsEvent' smart constructor.
1246+data NewPermissionsEvent = NewPermissionsEvent'
1247+ { _npeRequestedPermissions :: !(Maybe [Text])
1248+ , _npeApprovedPermissions :: !(Maybe [Text])
1249+ , _npeProductId :: !(Maybe Text)
1250+ } deriving (Eq,Show,Data,Typeable,Generic)
1252+-- | Creates a value of 'NewPermissionsEvent' with the minimum fields required to make a request.
1254+-- Use one of the following lenses to modify other fields as desired:
1256+-- * 'npeRequestedPermissions'
1258+-- * 'npeApprovedPermissions'
1262+ :: NewPermissionsEvent
1263+newPermissionsEvent =
1264+ NewPermissionsEvent'
1265+ { _npeRequestedPermissions = Nothing
1266+ , _npeApprovedPermissions = Nothing
1267+ , _npeProductId = Nothing
1270+-- | The set of permissions that the app is currently requesting. Use
1271+-- Permissions.Get on the EMM API to retrieve details about these
1273+npeRequestedPermissions :: Lens' NewPermissionsEvent [Text]
1274+npeRequestedPermissions
1275+ = lens _npeRequestedPermissions
1276+ (\ s a -> s{_npeRequestedPermissions = a})
1280+-- | The set of permissions that the enterprise admin has already approved
1281+-- for this application. Use Permissions.Get on the EMM API to retrieve
1282+-- details about these permissions.
1283+npeApprovedPermissions :: Lens' NewPermissionsEvent [Text]
1284+npeApprovedPermissions
1285+ = lens _npeApprovedPermissions
1286+ (\ s a -> s{_npeApprovedPermissions = a})
1290+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which new
1291+-- permissions were added. This field will always be present.
1292+npeProductId :: Lens' NewPermissionsEvent (Maybe Text)
1294+ = lens _npeProductId (\ s a -> s{_npeProductId = a})
1296+instance FromJSON NewPermissionsEvent where
1298+ = withObject "NewPermissionsEvent"
1300+ NewPermissionsEvent' <$>
1301+ (o .:? "requestedPermissions" .!= mempty) <*>
1302+ (o .:? "approvedPermissions" .!= mempty)
1303+ <*> (o .:? "productId"))
1305+instance ToJSON NewPermissionsEvent where
1306+ toJSON NewPermissionsEvent'{..}
1309+ [("requestedPermissions" .=) <$>
1310+ _npeRequestedPermissions,
1311+ ("approvedPermissions" .=) <$>
1312+ _npeApprovedPermissions,
1313+ ("productId" .=) <$> _npeProductId])
1315+-- | An event generated whenever a product\'s availability changes.
1317+-- /See:/ 'productAvailabilityChangeEvent' smart constructor.
1318+data ProductAvailabilityChangeEvent = ProductAvailabilityChangeEvent'
1319+ { _paceAvailabilityStatus :: !(Maybe Text)
1320+ , _paceProductId :: !(Maybe Text)
1321+ } deriving (Eq,Show,Data,Typeable,Generic)
1323+-- | Creates a value of 'ProductAvailabilityChangeEvent' with the minimum fields required to make a request.
1325+-- Use one of the following lenses to modify other fields as desired:
1327+-- * 'paceAvailabilityStatus'
1329+-- * 'paceProductId'
1330+productAvailabilityChangeEvent
1331+ :: ProductAvailabilityChangeEvent
1332+productAvailabilityChangeEvent =
1333+ ProductAvailabilityChangeEvent'
1334+ { _paceAvailabilityStatus = Nothing
1335+ , _paceProductId = Nothing
1338+-- | The new state of the product. This field will always be present.
1339+paceAvailabilityStatus :: Lens' ProductAvailabilityChangeEvent (Maybe Text)
1340+paceAvailabilityStatus
1341+ = lens _paceAvailabilityStatus
1342+ (\ s a -> s{_paceAvailabilityStatus = a})
1344+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which the
1345+-- product availability changed. This field will always be present.
1346+paceProductId :: Lens' ProductAvailabilityChangeEvent (Maybe Text)
1348+ = lens _paceProductId
1349+ (\ s a -> s{_paceProductId = a})
1351+instance FromJSON ProductAvailabilityChangeEvent
1354+ = withObject "ProductAvailabilityChangeEvent"
1356+ ProductAvailabilityChangeEvent' <$>
1357+ (o .:? "availabilityStatus") <*> (o .:? "productId"))
1359+instance ToJSON ProductAvailabilityChangeEvent where
1360+ toJSON ProductAvailabilityChangeEvent'{..}
1363+ [("availabilityStatus" .=) <$>
1364+ _paceAvailabilityStatus,
1365+ ("productId" .=) <$> _paceProductId])
1367+-- | An event generated when a product\'s approval status is changed.
1369+-- /See:/ 'productApprovalEvent' smart constructor.
1370+data ProductApprovalEvent = ProductApprovalEvent'
1371+ { _paeApproved :: !(Maybe Text)
1372+ , _paeProductId :: !(Maybe Text)
1373+ } deriving (Eq,Show,Data,Typeable,Generic)
1375+-- | Creates a value of 'ProductApprovalEvent' with the minimum fields required to make a request.
1377+-- Use one of the following lenses to modify other fields as desired:
1382+productApprovalEvent
1383+ :: ProductApprovalEvent
1384+productApprovalEvent =
1385+ ProductApprovalEvent'
1386+ { _paeApproved = Nothing
1387+ , _paeProductId = Nothing
1390+-- | Whether the product was approved or unapproved. This field will always
1392+paeApproved :: Lens' ProductApprovalEvent (Maybe Text)
1394+ = lens _paeApproved (\ s a -> s{_paeApproved = a})
1396+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which the
1397+-- approval status has changed. This field will always be present.
1398+paeProductId :: Lens' ProductApprovalEvent (Maybe Text)
1400+ = lens _paeProductId (\ s a -> s{_paeProductId = a})
1402+instance FromJSON ProductApprovalEvent where
1404+ = withObject "ProductApprovalEvent"
1406+ ProductApprovalEvent' <$>
1407+ (o .:? "approved") <*> (o .:? "productId"))
1409+instance ToJSON ProductApprovalEvent where
1410+ toJSON ProductApprovalEvent'{..}
1413+ [("approved" .=) <$> _paeApproved,
1414+ ("productId" .=) <$> _paeProductId])
859-- | A device resource represents a mobile device managed by the EMM and
1416-- | A device resource represents a mobile device managed by the EMM and
860-- belonging to a specific enterprise user. This collection cannot be
1417-- belonging to a specific enterprise user. This collection cannot be
861-- modified via the API; it is automatically populated as devices are set
1418-- modified via the API; it is automatically populated as devices are set
@@ -891,13 +1448,17 @@ device =
891dKind :: Lens' Device Text
1448dKind :: Lens' Device Text
892dKind = lens _dKind (\ s a -> s{_dKind = a})
1449dKind = lens _dKind (\ s a -> s{_dKind = a})
894−-- | The mechanism by which this device is managed by the EMM.
1451+-- | Identifies the extent to which the device is controlled by an Android
1452+-- for Work EMM in various deployment configurations. Possible values
895−-- \"managedDevice\" means that the EMM\'s app is a device owner.
1453+-- include: - \"managedDevice\", a device that has the EMM\'s device policy
896−-- \"managedProfile\" means that the EMM\'s app is the profile owner (and
1454+-- controller (DPC) as the device owner, - \"managedProfile\", a device
1455+-- that has a work profile managed by the DPC (DPC is profile owner) in
897−-- there is a separate personal profile which is not managed).
1456+-- addition to a separate, personal profile that is unavailable to the DPC,
898−-- \"containerApp\" means that the EMM\'s app is managing the Android for
1457+-- - \"containerApp\", a device running the Android for Work App. The
899−-- Work container app on the device. ?unmanagedProfile? means that the
1458+-- Android for Work App is managed by the DPC, - \"unmanagedProfile\", a
900−-- EMM?s app is managing a managed user on an unmanaged device
1459+-- device that has been allowed (by the domain\'s admin, using the Admin
1460+-- Console to enable the privilege) to use Android for Work apps or Google
1461+-- Apps for Work, but the profile is itself not owned by a DPC.
901dManagementType :: Lens' Device (Maybe Text)
1462dManagementType :: Lens' Device (Maybe Text)
902dManagementType
1463dManagementType
903 = lens _dManagementType
1464 = lens _dManagementType
@@ -926,6 +1487,75 @@ instance ToJSON Device where
926 ("managementType" .=) <$> _dManagementType,
1487 ("managementType" .=) <$> _dManagementType,
927 ("androidId" .=) <$> _dAndroidId])
1488 ("androidId" .=) <$> _dAndroidId])
1490+-- | Credentials that can be used to authenticate as a service account.
1492+-- /See:/ 'serviceAccountKey' smart constructor.
1493+data ServiceAccountKey = ServiceAccountKey'
1494+ { _sakKind :: !Text
1495+ , _sakData :: !(Maybe Text)
1496+ , _sakId :: !(Maybe Text)
1497+ , _sakType :: !(Maybe Text)
1498+ } deriving (Eq,Show,Data,Typeable,Generic)
1500+-- | Creates a value of 'ServiceAccountKey' with the minimum fields required to make a request.
1502+-- Use one of the following lenses to modify other fields as desired:
1512+ :: ServiceAccountKey
1515+ { _sakKind = "androidenterprise#serviceAccountKey"
1516+ , _sakData = Nothing
1518+ , _sakType = Nothing
1521+-- | Identifies what kind of resource this is. Value: the fixed string
1522+-- \"androidenterprise#serviceAccountKey\".
1523+sakKind :: Lens' ServiceAccountKey Text
1524+sakKind = lens _sakKind (\ s a -> s{_sakKind = a})
1526+-- | The body of the private key credentials file, in string format. This is
1527+-- only populated when the ServiceAccountKey is created, and is not stored
1529+sakData :: Lens' ServiceAccountKey (Maybe Text)
1530+sakData = lens _sakData (\ s a -> s{_sakData = a})
1532+-- | An opaque, unique identifier for this ServiceAccountKey. Assigned by the
1534+sakId :: Lens' ServiceAccountKey (Maybe Text)
1535+sakId = lens _sakId (\ s a -> s{_sakId = a})
1537+-- | The file format of the generated key data.
1538+sakType :: Lens' ServiceAccountKey (Maybe Text)
1539+sakType = lens _sakType (\ s a -> s{_sakType = a})
1541+instance FromJSON ServiceAccountKey where
1543+ = withObject "ServiceAccountKey"
1545+ ServiceAccountKey' <$>
1547+ "androidenterprise#serviceAccountKey")
1550+ <*> (o .:? "type"))
1552+instance ToJSON ServiceAccountKey where
1553+ toJSON ServiceAccountKey'{..}
1556+ [Just ("kind" .= _sakKind), ("data" .=) <$> _sakData,
1557+ ("id" .=) <$> _sakId, ("type" .=) <$> _sakType])
929-- | The install resources for the device.
1559-- | The install resources for the device.
931-- /See:/ 'installsListResponse' smart constructor.
1561-- /See:/ 'installsListResponse' smart constructor.
@@ -983,13 +1613,14 @@ instance ToJSON InstallsListResponse where
984-- /See:/ 'appRestrictionsSchemaRestriction' smart constructor.
1614-- /See:/ 'appRestrictionsSchemaRestriction' smart constructor.
985data AppRestrictionsSchemaRestriction = AppRestrictionsSchemaRestriction'
1615data AppRestrictionsSchemaRestriction = AppRestrictionsSchemaRestriction'
986− { _arsrRestrictionType :: !(Maybe Text)
1616+ { _arsrRestrictionType :: !(Maybe Text)
987− , _arsrEntry :: !(Maybe [Text])
1617+ , _arsrEntry :: !(Maybe [Text])
988− , _arsrKey :: !(Maybe Text)
1618+ , _arsrKey :: !(Maybe Text)
989− , _arsrEntryValue :: !(Maybe [Text])
1619+ , _arsrEntryValue :: !(Maybe [Text])
990− , _arsrDefaultValue :: !(Maybe AppRestrictionsSchemaRestrictionRestrictionValue)
1620+ , _arsrDefaultValue :: !(Maybe AppRestrictionsSchemaRestrictionRestrictionValue)
991− , _arsrTitle :: !(Maybe Text)
1621+ , _arsrTitle :: !(Maybe Text)
992− , _arsrDescription :: !(Maybe Text)
1622+ , _arsrDescription :: !(Maybe Text)
1623+ , _arsrNestedRestriction :: !(Maybe [AppRestrictionsSchemaRestriction])
993 } deriving (Eq,Show,Data,Typeable,Generic)
1624 } deriving (Eq,Show,Data,Typeable,Generic)
995-- | Creates a value of 'AppRestrictionsSchemaRestriction' with the minimum fields required to make a request.
1626-- | Creates a value of 'AppRestrictionsSchemaRestriction' with the minimum fields required to make a request.
@@ -1009,6 +1640,8 @@ data AppRestrictionsSchemaRestriction = AppRestrictionsSchemaRestriction'
1009-- * 'arsrTitle'
1640-- * 'arsrTitle'
1011-- * 'arsrDescription'
1642-- * 'arsrDescription'
1644+-- * 'arsrNestedRestriction'
1012appRestrictionsSchemaRestriction
1645appRestrictionsSchemaRestriction
1013 :: AppRestrictionsSchemaRestriction
1646 :: AppRestrictionsSchemaRestriction
1014appRestrictionsSchemaRestriction =
1647appRestrictionsSchemaRestriction =
@@ -1020,6 +1653,7 @@ appRestrictionsSchemaRestriction =
1020 , _arsrDefaultValue = Nothing
1653 , _arsrDefaultValue = Nothing
1021 , _arsrTitle = Nothing
1654 , _arsrTitle = Nothing
1022 , _arsrDescription = Nothing
1655 , _arsrDescription = Nothing
1656+ , _arsrNestedRestriction = Nothing
1025-- | The type of the restriction.
1659-- | The type of the restriction.
@@ -1042,7 +1676,9 @@ arsrKey :: Lens' AppRestrictionsSchemaRestriction (Maybe Text)
1042arsrKey = lens _arsrKey (\ s a -> s{_arsrKey = a})
1676arsrKey = lens _arsrKey (\ s a -> s{_arsrKey = a})
1044-- | For choice or multiselect restrictions, the list of possible entries\'
1678-- | For choice or multiselect restrictions, the list of possible entries\'
1045−-- machine-readable values.
1679+-- machine-readable values. These values should be used in the
1680+-- configuration, either as a single string value for a choice restriction
1681+-- or in a stringArray for a multiselect restriction.
1046arsrEntryValue :: Lens' AppRestrictionsSchemaRestriction [Text]
1682arsrEntryValue :: Lens' AppRestrictionsSchemaRestriction [Text]
1047arsrEntryValue
1683arsrEntryValue
1048 = lens _arsrEntryValue
1684 = lens _arsrEntryValue
@@ -1050,7 +1686,8 @@ arsrEntryValue
1050 . _Default
1686 . _Default
1051 . _Coerce
1687 . _Coerce
1053−-- | The default value of the restriction.
1689+-- | The default value of the restriction. bundle and bundleArray
1690+-- restrictions never have a default value.
1054arsrDefaultValue :: Lens' AppRestrictionsSchemaRestriction (Maybe AppRestrictionsSchemaRestrictionRestrictionValue)
1691arsrDefaultValue :: Lens' AppRestrictionsSchemaRestriction (Maybe AppRestrictionsSchemaRestrictionRestrictionValue)
1055arsrDefaultValue
1692arsrDefaultValue
1056 = lens _arsrDefaultValue
1693 = lens _arsrDefaultValue
@@ -1068,6 +1705,16 @@ arsrDescription
1068 = lens _arsrDescription
1705 = lens _arsrDescription
1069 (\ s a -> s{_arsrDescription = a})
1706 (\ s a -> s{_arsrDescription = a})
1708+-- | For bundle or bundleArray restrictions, the list of nested restrictions.
1709+-- A bundle restriction is always nested within a bundleArray restriction,
1710+-- and a bundleArray restriction is at most two levels deep.
1711+arsrNestedRestriction :: Lens' AppRestrictionsSchemaRestriction [AppRestrictionsSchemaRestriction]
1712+arsrNestedRestriction
1713+ = lens _arsrNestedRestriction
1714+ (\ s a -> s{_arsrNestedRestriction = a})
1071instance FromJSON AppRestrictionsSchemaRestriction
1718instance FromJSON AppRestrictionsSchemaRestriction
1073 parseJSON
1720 parseJSON
@@ -1080,7 +1727,8 @@ instance FromJSON AppRestrictionsSchemaRestriction
1080 <*> (o .:? "entryValue" .!= mempty)
1727 <*> (o .:? "entryValue" .!= mempty)
1081 <*> (o .:? "defaultValue")
1728 <*> (o .:? "defaultValue")
1082 <*> (o .:? "title")
1729 <*> (o .:? "title")
1083− <*> (o .:? "description"))
1730+ <*> (o .:? "description")
1731+ <*> (o .:? "nestedRestriction" .!= mempty))
1085instance ToJSON AppRestrictionsSchemaRestriction
1733instance ToJSON AppRestrictionsSchemaRestriction
@@ -1092,7 +1740,41 @@ instance ToJSON AppRestrictionsSchemaRestriction
1092 ("entryValue" .=) <$> _arsrEntryValue,
1740 ("entryValue" .=) <$> _arsrEntryValue,
1093 ("defaultValue" .=) <$> _arsrDefaultValue,
1741 ("defaultValue" .=) <$> _arsrDefaultValue,
1094 ("title" .=) <$> _arsrTitle,
1742 ("title" .=) <$> _arsrTitle,
1095− ("description" .=) <$> _arsrDescription])
1743+ ("description" .=) <$> _arsrDescription,
1744+ ("nestedRestriction" .=) <$> _arsrNestedRestriction])
1746+-- | This represents an enterprise administrator who can manage the
1747+-- enterprise in the Google Play for Work Store.
1749+-- /See:/ 'administrator' smart constructor.
1750+newtype Administrator = Administrator'
1751+ { _aEmail :: Maybe Text
1752+ } deriving (Eq,Show,Data,Typeable,Generic)
1754+-- | Creates a value of 'Administrator' with the minimum fields required to make a request.
1756+-- Use one of the following lenses to modify other fields as desired:
1763+ { _aEmail = Nothing
1766+-- | The administrator\'s email address.
1767+aEmail :: Lens' Administrator (Maybe Text)
1768+aEmail = lens _aEmail (\ s a -> s{_aEmail = a})
1770+instance FromJSON Administrator where
1772+ = withObject "Administrator"
1773+ (\ o -> Administrator' <$> (o .:? "email"))
1775+instance ToJSON Administrator where
1776+ toJSON Administrator'{..}
1777+ = object (catMaybes [("email" .=) <$> _aEmail])
1097-- | The matching user resources.
1779-- | The matching user resources.
@@ -1144,6 +1826,57 @@ instance ToJSON UsersListResponse where
1144 [Just ("kind" .= _ulrKind),
1826 [Just ("kind" .= _ulrKind),
1145 ("user" .=) <$> _ulrUser])
1827 ("user" .=) <$> _ulrUser])
1829+-- | An AuthenticationToken is used by the EMM\'s device policy client on a
1830+-- device to provision the given EMM-managed user on that device.
1832+-- /See:/ 'authenticationToken' smart constructor.
1833+data AuthenticationToken = AuthenticationToken'
1835+ , _atToken :: !(Maybe Text)
1836+ } deriving (Eq,Show,Data,Typeable,Generic)
1838+-- | Creates a value of 'AuthenticationToken' with the minimum fields required to make a request.
1840+-- Use one of the following lenses to modify other fields as desired:
1846+ :: AuthenticationToken
1847+authenticationToken =
1848+ AuthenticationToken'
1849+ { _atKind = "androidenterprise#authenticationToken"
1850+ , _atToken = Nothing
1853+-- | Identifies what kind of resource this is. Value: the fixed string
1854+-- \"androidenterprise#authenticationToken\".
1855+atKind :: Lens' AuthenticationToken Text
1856+atKind = lens _atKind (\ s a -> s{_atKind = a})
1858+-- | The authentication token to be passed to the device policy client on the
1859+-- device where it can be used to provision the account for which this
1860+-- token was generated.
1861+atToken :: Lens' AuthenticationToken (Maybe Text)
1862+atToken = lens _atToken (\ s a -> s{_atToken = a})
1864+instance FromJSON AuthenticationToken where
1866+ = withObject "AuthenticationToken"
1868+ AuthenticationToken' <$>
1870+ "androidenterprise#authenticationToken")
1871+ <*> (o .:? "token"))
1873+instance ToJSON AuthenticationToken where
1874+ toJSON AuthenticationToken'{..}
1877+ [Just ("kind" .= _atKind),
1878+ ("token" .=) <$> _atToken])
1147-- | This represents a single version of the app.
1880-- | This represents a single version of the app.
1149-- /See:/ 'appVersion' smart constructor.
1882-- /See:/ 'appVersion' smart constructor.
@@ -1196,6 +1929,46 @@ instance ToJSON AppVersion where
1196 [("versionCode" .=) <$> _avVersionCode,
1929 [("versionCode" .=) <$> _avVersionCode,
1197 ("versionString" .=) <$> _avVersionString])
1930 ("versionString" .=) <$> _avVersionString])
1932+-- | A bundle of managed properties.
1934+-- /See:/ 'managedPropertyBundle' smart constructor.
1935+newtype ManagedPropertyBundle = ManagedPropertyBundle'
1936+ { _mpbManagedProperty :: Maybe [ManagedProperty]
1937+ } deriving (Eq,Show,Data,Typeable,Generic)
1939+-- | Creates a value of 'ManagedPropertyBundle' with the minimum fields required to make a request.
1941+-- Use one of the following lenses to modify other fields as desired:
1943+-- * 'mpbManagedProperty'
1944+managedPropertyBundle
1945+ :: ManagedPropertyBundle
1946+managedPropertyBundle =
1947+ ManagedPropertyBundle'
1948+ { _mpbManagedProperty = Nothing
1951+-- | The list of managed properties.
1952+mpbManagedProperty :: Lens' ManagedPropertyBundle [ManagedProperty]
1954+ = lens _mpbManagedProperty
1955+ (\ s a -> s{_mpbManagedProperty = a})
1959+instance FromJSON ManagedPropertyBundle where
1961+ = withObject "ManagedPropertyBundle"
1963+ ManagedPropertyBundle' <$>
1964+ (o .:? "managedProperty" .!= mempty))
1966+instance ToJSON ManagedPropertyBundle where
1967+ toJSON ManagedPropertyBundle'{..}
1970+ [("managedProperty" .=) <$> _mpbManagedProperty])
1199-- | The grouplicense resources for the enterprise.
1972-- | The grouplicense resources for the enterprise.
1201-- /See:/ 'groupLicensesListResponse' smart constructor.
1974-- /See:/ 'groupLicensesListResponse' smart constructor.
@@ -1353,8 +2126,9 @@ instance ToJSON Collection where
1354-- /See:/ 'productSet' smart constructor.
2127-- /See:/ 'productSet' smart constructor.
1355data ProductSet = ProductSet'
2128data ProductSet = ProductSet'
1356− { _psKind :: !Text
2129+ { _psKind :: !Text
2130+ , _psProductSetBehavior :: !(Maybe Text)
1357− , _psProductId :: !(Maybe [Text])
2131+ , _psProductId :: !(Maybe [Text])
1358 } deriving (Eq,Show,Data,Typeable,Generic)
2132 } deriving (Eq,Show,Data,Typeable,Generic)
1360-- | Creates a value of 'ProductSet' with the minimum fields required to make a request.
2134-- | Creates a value of 'ProductSet' with the minimum fields required to make a request.
@@ -1363,12 +2137,15 @@ data ProductSet = ProductSet'
1364-- * 'psKind'
2138-- * 'psKind'
2140+-- * 'psProductSetBehavior'
1366-- * 'psProductId'
2142-- * 'psProductId'
1367productSet
2143productSet
1368 :: ProductSet
2144 :: ProductSet
1369productSet =
2145productSet =
1370 ProductSet'
2146 ProductSet'
1371 { _psKind = "androidenterprise#productSet"
2147 { _psKind = "androidenterprise#productSet"
2148+ , _psProductSetBehavior = Nothing
1372 , _psProductId = Nothing
2149 , _psProductId = Nothing
@@ -1377,6 +2154,17 @@ productSet =
1377psKind :: Lens' ProductSet Text
2154psKind :: Lens' ProductSet Text
1378psKind = lens _psKind (\ s a -> s{_psKind = a})
2155psKind = lens _psKind (\ s a -> s{_psKind = a})
2157+-- | The interpretation of this product set. \"unknown\" should never be sent
2158+-- and ignored if received. \"whitelist\" means that this product set
2159+-- constitutes a whitelist. \"includeAll\" means that all products are
2160+-- accessible (the value of the productId field is therefore ignored). If a
2161+-- value is not supplied, it is interpreted to be \"whitelist\" for
2162+-- backwards compatibility.
2163+psProductSetBehavior :: Lens' ProductSet (Maybe Text)
2164+psProductSetBehavior
2165+ = lens _psProductSetBehavior
2166+ (\ s a -> s{_psProductSetBehavior = a})
1380-- | The list of product IDs making up the set of products.
2168-- | The list of product IDs making up the set of products.
1381psProductId :: Lens' ProductSet [Text]
2169psProductId :: Lens' ProductSet [Text]
1382psProductId
2170psProductId
@@ -1390,13 +2178,15 @@ instance FromJSON ProductSet where
1391 ProductSet' <$>
2179 ProductSet' <$>
1392 (o .:? "kind" .!= "androidenterprise#productSet") <*>
2180 (o .:? "kind" .!= "androidenterprise#productSet") <*>
2181+ (o .:? "productSetBehavior")
1393− (o .:? "productId" .!= mempty))
2182+ <*> (o .:? "productId" .!= mempty))
1395instance ToJSON ProductSet where
2184instance ToJSON ProductSet where
1396 toJSON ProductSet'{..}
2185 toJSON ProductSet'{..}
1397 = object
2186 = object
1398 (catMaybes
2187 (catMaybes
1399 [Just ("kind" .= _psKind),
2188 [Just ("kind" .= _psKind),
2189+ ("productSetBehavior" .=) <$> _psProductSetBehavior,
1400 ("productId" .=) <$> _psProductId])
2190 ("productId" .=) <$> _psProductId])
1402-- | The existence of an install resource indicates that an app is installed
2192-- | The existence of an install resource indicates that an app is installed
@@ -1494,71 +2284,233 @@ instance ToJSON Install where
1494 ("installState" .=) <$> _iInstallState,
2284 ("installState" .=) <$> _iInstallState,
1495 ("productId" .=) <$> _iProductId])
2285 ("productId" .=) <$> _iProductId])
1497−-- | A user resource represents an individual user within the enterprise\'s
2287+--
1498−-- domain. Note that each user is associated with a Google account based on
2288+-- /See:/ 'serviceAccountKeysListResponse' smart constructor.
1499−-- the user\'s corporate email address (which must be in one of the
2289+newtype ServiceAccountKeysListResponse = ServiceAccountKeysListResponse'
1500−-- enterprise\'s domains). As part of installing the EMM\'s DPC app to
2290+ { _saklrServiceAccountKey :: Maybe [ServiceAccountKey]
1501−-- manage a device the Google account must be provisioned to the device,
2291+ } deriving (Eq,Show,Data,Typeable,Generic)
1502−-- and so the user resource must be created before that. This can be done
2292+
1503−-- using the Google Admin SDK Directory API. The ID for a user is an opaque
2293+-- | Creates a value of 'ServiceAccountKeysListResponse' with the minimum fields required to make a request.
1504−-- string. It can be retrieved using the list method queried by the user\'s
2294+--
1505−-- primary email address.
2295+-- Use one of the following lenses to modify other fields as desired:
2297+-- * 'saklrServiceAccountKey'
2298+serviceAccountKeysListResponse
2299+ :: ServiceAccountKeysListResponse
2300+serviceAccountKeysListResponse =
2301+ ServiceAccountKeysListResponse'
2302+ { _saklrServiceAccountKey = Nothing
2305+-- | The service account credentials.
2306+saklrServiceAccountKey :: Lens' ServiceAccountKeysListResponse [ServiceAccountKey]
2307+saklrServiceAccountKey
2308+ = lens _saklrServiceAccountKey
2309+ (\ s a -> s{_saklrServiceAccountKey = a})
2313+instance FromJSON ServiceAccountKeysListResponse
2316+ = withObject "ServiceAccountKeysListResponse"
2318+ ServiceAccountKeysListResponse' <$>
2319+ (o .:? "serviceAccountKey" .!= mempty))
2321+instance ToJSON ServiceAccountKeysListResponse where
2322+ toJSON ServiceAccountKeysListResponse'{..}
2325+ [("serviceAccountKey" .=) <$>
2326+ _saklrServiceAccountKey])
2328+-- | A Users resource represents an account associated with an enterprise.
2329+-- The account may be specific to a device or to an individual user (who
2330+-- can then use the account across multiple devices). The account may
2331+-- provide access to Google Play for Work only, or to other Google
2332+-- services, depending on the identity model: - Google managed domain
2333+-- identity model requires synchronization to Google account sources (via
2334+-- primaryEmail). - Android for Work Accounts identity model provides a
2335+-- dynamic means for enterprises to create user or device accounts as
2336+-- needed. These accounts provide access to Google Play for Work only.
1507-- /See:/ 'user' smart constructor.
2338-- /See:/ 'user' smart constructor.
1508data User = User'
2339data User = User'
2340+ { _uAccountIdentifier :: !(Maybe Text)
1509− { _uKind :: !Text
2341+ , _uKind :: !Text
2342+ , _uDisplayName :: !(Maybe Text)
1510− , _uId :: !(Maybe Text)
2343+ , _uId :: !(Maybe Text)
1511− , _uPrimaryEmail :: !(Maybe Text)
2344+ , _uPrimaryEmail :: !(Maybe Text)
2345+ , _uManagementType :: !(Maybe Text)
2346+ , _uAccountType :: !(Maybe Text)
1512 } deriving (Eq,Show,Data,Typeable,Generic)
2347 } deriving (Eq,Show,Data,Typeable,Generic)
1514-- | Creates a value of 'User' with the minimum fields required to make a request.
2349-- | Creates a value of 'User' with the minimum fields required to make a request.
1516-- Use one of the following lenses to modify other fields as desired:
2351-- Use one of the following lenses to modify other fields as desired:
2353+-- * 'uAccountIdentifier'
1518-- * 'uKind'
2355-- * 'uKind'
1520-- * 'uId'
2359-- * 'uId'
1522-- * 'uPrimaryEmail'
2361-- * 'uPrimaryEmail'
2363+-- * 'uManagementType'
2370+ { _uAccountIdentifier = Nothing
1527− { _uKind = "androidenterprise#user"
2371+ , _uKind = "androidenterprise#user"
2372+ , _uDisplayName = Nothing
1528 , _uId = Nothing
2373 , _uId = Nothing
1529 , _uPrimaryEmail = Nothing
2374 , _uPrimaryEmail = Nothing
2375+ , _uManagementType = Nothing
2376+ , _uAccountType = Nothing
2379+-- | A unique identifier you create for this user, such as \"user342\" or
2380+-- \"asset#44418\". Do not use personally identifiable information (PII)
2381+-- for this property. Must always be set for EMM-managed users. Not set for
2382+-- Google-managed users.
2383+uAccountIdentifier :: Lens' User (Maybe Text)
2385+ = lens _uAccountIdentifier
2386+ (\ s a -> s{_uAccountIdentifier = a})
1532-- | Identifies what kind of resource this is. Value: the fixed string
2388-- | Identifies what kind of resource this is. Value: the fixed string
1533-- \"androidenterprise#user\".
2389-- \"androidenterprise#user\".
1534uKind :: Lens' User Text
2390uKind :: Lens' User Text
1535uKind = lens _uKind (\ s a -> s{_uKind = a})
2391uKind = lens _uKind (\ s a -> s{_uKind = a})
2393+-- | The name that will appear in user interfaces. Setting this property is
2394+-- optional when creating EMM-managed users. If you do set this property,
2395+-- use something generic about the organization (such as \"Example, Inc.\")
2396+-- or your name (as EMM). Not used for Google-managed user accounts.
2397+uDisplayName :: Lens' User (Maybe Text)
2399+ = lens _uDisplayName (\ s a -> s{_uDisplayName = a})
1537-- | The unique ID for the user.
2401-- | The unique ID for the user.
1538uId :: Lens' User (Maybe Text)
2402uId :: Lens' User (Maybe Text)
1539uId = lens _uId (\ s a -> s{_uId = a})
2403uId = lens _uId (\ s a -> s{_uId = a})
1541−-- | The user\'s primary email, e.g. \"jsmith\'example.com\".
2405+-- | The user\'s primary email address, for example, \"jsmith\'example.com\".
2406+-- Will always be set for Google managed users and not set for EMM managed
1542uPrimaryEmail :: Lens' User (Maybe Text)
2408uPrimaryEmail :: Lens' User (Maybe Text)
1543uPrimaryEmail
2409uPrimaryEmail
1544 = lens _uPrimaryEmail
2410 = lens _uPrimaryEmail
1545 (\ s a -> s{_uPrimaryEmail = a})
2411 (\ s a -> s{_uPrimaryEmail = a})
2413+-- | The entity that manages the user. With googleManaged users, the source
2414+-- of truth is Google so EMMs have to make sure a Google Account exists for
2415+-- the user. With emmManaged users, the EMM is in charge.
2416+uManagementType :: Lens' User (Maybe Text)
2418+ = lens _uManagementType
2419+ (\ s a -> s{_uManagementType = a})
2421+-- | The type of account that this user represents. A userAccount can be
2422+-- installed on multiple devices, but a deviceAccount is specific to a
2423+-- single device. An EMM-managed user (emmManaged) can be either type
2424+-- (userAccount, deviceAccount), but a Google-managed user (googleManaged)
2425+-- is always a userAccount.
2426+uAccountType :: Lens' User (Maybe Text)
2428+ = lens _uAccountType (\ s a -> s{_uAccountType = a})
1547instance FromJSON User where
2430instance FromJSON User where
1548 parseJSON
2431 parseJSON
1549 = withObject "User"
2432 = withObject "User"
1551 User' <$>
2434 User' <$>
2435+ (o .:? "accountIdentifier") <*>
1552− (o .:? "kind" .!= "androidenterprise#user") <*>
2436+ (o .:? "kind" .!= "androidenterprise#user")
2437+ <*> (o .:? "displayName")
1553− (o .:? "id")
2438+ <*> (o .:? "id")
1554− <*> (o .:? "primaryEmail"))
2439+ <*> (o .:? "primaryEmail")
2440+ <*> (o .:? "managementType")
2441+ <*> (o .:? "accountType"))
1556instance ToJSON User where
2443instance ToJSON User where
1557 toJSON User'{..}
2444 toJSON User'{..}
1558 = object
2445 = object
1559 (catMaybes
2446 (catMaybes
2447+ [("accountIdentifier" .=) <$> _uAccountIdentifier,
1560− [Just ("kind" .= _uKind), ("id" .=) <$> _uId,
2448+ Just ("kind" .= _uKind),
2449+ ("displayName" .=) <$> _uDisplayName,
2450+ ("id" .=) <$> _uId,
1561− ("primaryEmail" .=) <$> _uPrimaryEmail])
2451+ ("primaryEmail" .=) <$> _uPrimaryEmail,
2452+ ("managementType" .=) <$> _uManagementType,
2453+ ("accountType" .=) <$> _uAccountType])
2455+-- | The managed configuration resources for the device.
2457+-- /See:/ 'managedConfigurationsForDeviceListResponse' smart constructor.
2458+data ManagedConfigurationsForDeviceListResponse = ManagedConfigurationsForDeviceListResponse'
2459+ { _mcfdlrKind :: !Text
2460+ , _mcfdlrManagedConfigurationForDevice :: !(Maybe [ManagedConfiguration])
2461+ } deriving (Eq,Show,Data,Typeable,Generic)
2463+-- | Creates a value of 'ManagedConfigurationsForDeviceListResponse' with the minimum fields required to make a request.
2465+-- Use one of the following lenses to modify other fields as desired:
2469+-- * 'mcfdlrManagedConfigurationForDevice'
2470+managedConfigurationsForDeviceListResponse
2471+ :: ManagedConfigurationsForDeviceListResponse
2472+managedConfigurationsForDeviceListResponse =
2473+ ManagedConfigurationsForDeviceListResponse'
2474+ { _mcfdlrKind = "androidenterprise#managedConfigurationsForDeviceListResponse"
2475+ , _mcfdlrManagedConfigurationForDevice = Nothing
2478+-- | Identifies what kind of resource this is. Value: the fixed string
2479+-- \"androidenterprise#managedConfigurationsForDeviceListResponse\".
2480+mcfdlrKind :: Lens' ManagedConfigurationsForDeviceListResponse Text
2482+ = lens _mcfdlrKind (\ s a -> s{_mcfdlrKind = a})
2484+-- | A managed configuration for an app on a specific device.
2485+mcfdlrManagedConfigurationForDevice :: Lens' ManagedConfigurationsForDeviceListResponse [ManagedConfiguration]
2486+mcfdlrManagedConfigurationForDevice
2487+ = lens _mcfdlrManagedConfigurationForDevice
2489+ s{_mcfdlrManagedConfigurationForDevice = a})
2494+ ManagedConfigurationsForDeviceListResponse where
2497+ "ManagedConfigurationsForDeviceListResponse"
2499+ ManagedConfigurationsForDeviceListResponse' <$>
2501+ "androidenterprise#managedConfigurationsForDeviceListResponse")
2503+ (o .:? "managedConfigurationForDevice" .!= mempty))
2506+ ManagedConfigurationsForDeviceListResponse where
2508+ ManagedConfigurationsForDeviceListResponse'{..}
2511+ [Just ("kind" .= _mcfdlrKind),
2512+ ("managedConfigurationForDevice" .=) <$>
2513+ _mcfdlrManagedConfigurationForDevice])
1564-- /See:/ 'productsGenerateApprovalURLResponse' smart constructor.
2516-- /See:/ 'productsGenerateApprovalURLResponse' smart constructor.
@@ -1733,6 +2685,102 @@ instance ToJSON
1733 [("topicName" .=) <$> _estpnrTopicName,
2685 [("topicName" .=) <$> _estpnrTopicName,
1734 ("messageId" .=) <$> _estpnrMessageId])
2686 ("messageId" .=) <$> _estpnrMessageId])
2688+-- | A service account identity, including the name and credentials that can
2689+-- be used to authenticate as the service account.
2691+-- /See:/ 'serviceAccount' smart constructor.
2692+data ServiceAccount = ServiceAccount'
2694+ , _saKey :: !(Maybe ServiceAccountKey)
2695+ , _saName :: !(Maybe Text)
2696+ } deriving (Eq,Show,Data,Typeable,Generic)
2698+-- | Creates a value of 'ServiceAccount' with the minimum fields required to make a request.
2700+-- Use one of the following lenses to modify other fields as desired:
2711+ { _saKind = "androidenterprise#serviceAccount"
2713+ , _saName = Nothing
2716+-- | Identifies what kind of resource this is. Value: the fixed string
2717+-- \"androidenterprise#serviceAccount\".
2718+saKind :: Lens' ServiceAccount Text
2719+saKind = lens _saKind (\ s a -> s{_saKind = a})
2721+-- | Credentials that can be used to authenticate as this ServiceAccount.
2722+saKey :: Lens' ServiceAccount (Maybe ServiceAccountKey)
2723+saKey = lens _saKey (\ s a -> s{_saKey = a})
2725+-- | The account name of the service account, in the form of an email
2726+-- address. Assigned by the server.
2727+saName :: Lens' ServiceAccount (Maybe Text)
2728+saName = lens _saName (\ s a -> s{_saName = a})
2730+instance FromJSON ServiceAccount where
2732+ = withObject "ServiceAccount"
2734+ ServiceAccount' <$>
2735+ (o .:? "kind" .!= "androidenterprise#serviceAccount")
2737+ <*> (o .:? "name"))
2739+instance ToJSON ServiceAccount where
2740+ toJSON ServiceAccount'{..}
2743+ [Just ("kind" .= _saKind), ("key" .=) <$> _saKey,
2744+ ("name" .=) <$> _saName])
2746+-- | An event generated when a new version of an app is uploaded to Google
2747+-- Play. Notifications are sent for new public versions only: alpha, beta,
2748+-- or canary versions do not generate this event. To fetch up-to-date
2749+-- version history for an app, use Products.Get on the EMM API.
2751+-- /See:/ 'appUpdateEvent' smart constructor.
2752+newtype AppUpdateEvent = AppUpdateEvent'
2753+ { _aueProductId :: Maybe Text
2754+ } deriving (Eq,Show,Data,Typeable,Generic)
2756+-- | Creates a value of 'AppUpdateEvent' with the minimum fields required to make a request.
2758+-- Use one of the following lenses to modify other fields as desired:
2765+ { _aueProductId = Nothing
2768+-- | The id of the product (e.g. \"app:com.google.android.gm\") that was
2769+-- updated. This field will always be present.
2770+aueProductId :: Lens' AppUpdateEvent (Maybe Text)
2772+ = lens _aueProductId (\ s a -> s{_aueProductId = a})
2774+instance FromJSON AppUpdateEvent where
2776+ = withObject "AppUpdateEvent"
2777+ (\ o -> AppUpdateEvent' <$> (o .:? "productId"))
2779+instance ToJSON AppUpdateEvent where
2780+ toJSON AppUpdateEvent'{..}
2782+ (catMaybes [("productId" .=) <$> _aueProductId])
1736-- | The matching enterprise resources.
2784-- | The matching enterprise resources.
1738-- /See:/ 'enterprisesListResponse' smart constructor.
2786-- /See:/ 'enterprisesListResponse' smart constructor.
@@ -1785,6 +2833,75 @@ instance ToJSON EnterprisesListResponse where
1785 [Just ("kind" .= _elrKind),
2833 [Just ("kind" .= _elrKind),
1786 ("enterprise" .=) <$> _elrEnterprise])
2834 ("enterprise" .=) <$> _elrEnterprise])
2836+-- | A resource returned by the PullNotificationSet API, which contains a
2837+-- collection of notifications for enterprises associated with the service
2838+-- account authenticated for the request.
2840+-- /See:/ 'notificationSet' smart constructor.
2841+data NotificationSet = NotificationSet'
2842+ { _nsNotificationSetId :: !(Maybe Text)
2843+ , _nsNotification :: !(Maybe [Notification])
2845+ } deriving (Eq,Show,Data,Typeable,Generic)
2847+-- | Creates a value of 'NotificationSet' with the minimum fields required to make a request.
2849+-- Use one of the following lenses to modify other fields as desired:
2851+-- * 'nsNotificationSetId'
2853+-- * 'nsNotification'
2860+ { _nsNotificationSetId = Nothing
2861+ , _nsNotification = Nothing
2862+ , _nsKind = "androidenterprise#notificationSet"
2865+-- | The notification set ID, required to mark the notification as received
2866+-- with the Enterprises.AcknowledgeNotification API. This will be omitted
2867+-- if no notifications are present.
2868+nsNotificationSetId :: Lens' NotificationSet (Maybe Text)
2870+ = lens _nsNotificationSetId
2871+ (\ s a -> s{_nsNotificationSetId = a})
2873+-- | The notifications received, or empty if no notifications are present.
2874+nsNotification :: Lens' NotificationSet [Notification]
2876+ = lens _nsNotification
2877+ (\ s a -> s{_nsNotification = a})
2881+-- | Identifies what kind of resource this is. Value: the fixed string
2882+-- \"androidenterprise#notificationSet\".
2883+nsKind :: Lens' NotificationSet Text
2884+nsKind = lens _nsKind (\ s a -> s{_nsKind = a})
2886+instance FromJSON NotificationSet where
2888+ = withObject "NotificationSet"
2890+ NotificationSet' <$>
2891+ (o .:? "notificationSetId") <*>
2892+ (o .:? "notification" .!= mempty)
2895+ "androidenterprise#notificationSet"))
2897+instance ToJSON NotificationSet where
2898+ toJSON NotificationSet'{..}
2901+ [("notificationSetId" .=) <$> _nsNotificationSetId,
2902+ ("notification" .=) <$> _nsNotification,
2903+ Just ("kind" .= _nsKind)])
1788-- | Represents the list of app restrictions available to be pre-configured
2905-- | Represents the list of app restrictions available to be pre-configured
1789-- for the product.
2906-- for the product.
@@ -1994,33 +3111,23 @@ instance ToJSON DevicesListResponse where
1994 [Just ("kind" .= _dlrKind),
3111 [Just ("kind" .= _dlrKind),
1995 ("device" .=) <$> _dlrDevice])
3112 ("device" .=) <$> _dlrDevice])
1997−-- | An enterprise resource represents a binding between an organization and
3114+-- | An Enterprises resource represents the binding between an EMM and a
1998−-- their EMM. To create an enterprise, an admin of the enterprise must
3115+-- specific organization. That binding can be instantiated in one of two
1999−-- first go through a Play for Work sign-up flow. At the end of this the
3116+-- different ways using this API as follows: - For Google managed domain
2000−-- admin will be presented with a token (a short opaque alphanumeric
3117+-- customers, the process involves using Enterprises.enroll and
2001−-- string). They must then present this to the EMM, who then supplies it to
3118+-- Enterprises.setAccount (in conjunction with artifacts obtained from the
2002−-- the enroll method. Until this is done the EMM will not have any access
3119+-- Admin console and the Google API Console) and submitted to the EMM
2003−-- to the enterprise. After calling enroll the EMM should call setAccount
3120+-- through a more-or-less manual process. - For Android for Work Accounts
2004−-- to specify the service account that will be allowed to act on behalf of
3121+-- customers, the process involves using Enterprises.generateSignupUrl and
2005−-- the enterprise, which will be required for access to the enterprise\'s
3122+-- Enterprises.completeSignup in conjunction with the Android for Work
2006−-- data through this API. Only one call of setAccount is allowed for a
3123+-- Sign-up UI (Google-provided mechanism) to create the binding without
2007−-- given enterprise; the only way to change the account later is to
3124+-- manual steps. As an EMM, you can support either or both approaches in
2008−-- unenroll the enterprise and enroll it again (obtaining a new token). The
3125+-- your EMM console. See Create an Enterprise for details.
2009−-- EMM can unenroll an enterprise in order to sever the binding between
2010−-- them. Re-enrolling an enterprise is possible, but requires a new token
2011−-- to be retrieved. Enterprises.unenroll requires the EMM\'s credentials
2012−-- (as enroll does), not the enterprise\'s. Enterprises.unenroll can only
2013−-- be used for enterprises that were previously enrolled with the enroll
2014−-- call. Any enterprises that were enrolled using the (deprecated)
2015−-- Enterprises.insert call must be unenrolled with Enterprises.delete and
2016−-- can then be re-enrolled using the Enterprises.enroll call. The ID for an
2017−-- enterprise is an opaque string. It is returned by insert and enroll and
2018−-- can also be retrieved if the enterprise\'s primary domain is known using
2021-- /See:/ 'enterprise' smart constructor.
3127-- /See:/ 'enterprise' smart constructor.
2022data Enterprise = Enterprise'
3128data Enterprise = Enterprise'
2023 { _eKind :: !Text
3129 { _eKind :: !Text
3130+ , _eAdministrator :: !(Maybe [Administrator])
2024 , _ePrimaryDomain :: !(Maybe Text)
3131 , _ePrimaryDomain :: !(Maybe Text)
2025 , _eName :: !(Maybe Text)
3132 , _eName :: !(Maybe Text)
2026 , _eId :: !(Maybe Text)
3133 , _eId :: !(Maybe Text)
@@ -2032,6 +3139,8 @@ data Enterprise = Enterprise'
2033-- * 'eKind'
3140-- * 'eKind'
3142+-- * 'eAdministrator'
2035-- * 'ePrimaryDomain'
3144-- * 'ePrimaryDomain'
2037-- * 'eName'
3146-- * 'eName'
@@ -2042,6 +3151,7 @@ enterprise
2042enterprise =
3151enterprise =
2043 Enterprise'
3152 Enterprise'
2044 { _eKind = "androidenterprise#enterprise"
3153 { _eKind = "androidenterprise#enterprise"
3154+ , _eAdministrator = Nothing
2045 , _ePrimaryDomain = Nothing
3155 , _ePrimaryDomain = Nothing
2046 , _eName = Nothing
3156 , _eName = Nothing
2047 , _eId = Nothing
3157 , _eId = Nothing
@@ -2052,13 +3162,22 @@ enterprise =
2052eKind :: Lens' Enterprise Text
3162eKind :: Lens' Enterprise Text
2053eKind = lens _eKind (\ s a -> s{_eKind = a})
3163eKind = lens _eKind (\ s a -> s{_eKind = a})
3165+-- | Administrators of the enterprise. This is only supported for enterprises
3166+-- created via the EMM-initiated flow.
3167+eAdministrator :: Lens' Enterprise [Administrator]
3169+ = lens _eAdministrator
3170+ (\ s a -> s{_eAdministrator = a})
2055−-- | The enterprise\'s primary domain, e.g. \"example.com\".
3174+-- | The enterprise\'s primary domain, such as \"example.com\".
2056ePrimaryDomain :: Lens' Enterprise (Maybe Text)
3175ePrimaryDomain :: Lens' Enterprise (Maybe Text)
2057ePrimaryDomain
3176ePrimaryDomain
2058 = lens _ePrimaryDomain
3177 = lens _ePrimaryDomain
2059 (\ s a -> s{_ePrimaryDomain = a})
3178 (\ s a -> s{_ePrimaryDomain = a})
2061−-- | The name of the enterprise, e.g. \"Example Inc\".
3180+-- | The name of the enterprise, for example, \"Example, Inc\".
2062eName :: Lens' Enterprise (Maybe Text)
3181eName :: Lens' Enterprise (Maybe Text)
2063eName = lens _eName (\ s a -> s{_eName = a})
3182eName = lens _eName (\ s a -> s{_eName = a})
@@ -2072,7 +3191,8 @@ instance FromJSON Enterprise where
2073 Enterprise' <$>
3192 Enterprise' <$>
2074 (o .:? "kind" .!= "androidenterprise#enterprise") <*>
3193 (o .:? "kind" .!= "androidenterprise#enterprise") <*>
3194+ (o .:? "administrator" .!= mempty)
2075− (o .:? "primaryDomain")
3195+ <*> (o .:? "primaryDomain")
2076 <*> (o .:? "name")
3196 <*> (o .:? "name")
2077 <*> (o .:? "id"))
3197 <*> (o .:? "id"))
@@ -2081,22 +3201,167 @@ instance ToJSON Enterprise where
2081 = object
3201 = object
2082 (catMaybes
3202 (catMaybes
2083 [Just ("kind" .= _eKind),
3203 [Just ("kind" .= _eKind),
3204+ ("administrator" .=) <$> _eAdministrator,
2084 ("primaryDomain" .=) <$> _ePrimaryDomain,
3205 ("primaryDomain" .=) <$> _ePrimaryDomain,
2085 ("name" .=) <$> _eName, ("id" .=) <$> _eId])
3206 ("name" .=) <$> _eName, ("id" .=) <$> _eId])
3208+-- | An event generated when an app installation failed on a device
3210+-- /See:/ 'installFailureEvent' smart constructor.
3211+data InstallFailureEvent = InstallFailureEvent'
3212+ { _ifeFailureReason :: !(Maybe Text)
3213+ , _ifeFailureDetails :: !(Maybe Text)
3214+ , _ifeUserId :: !(Maybe Text)
3215+ , _ifeDeviceId :: !(Maybe Text)
3216+ , _ifeProductId :: !(Maybe Text)
3217+ } deriving (Eq,Show,Data,Typeable,Generic)
3219+-- | Creates a value of 'InstallFailureEvent' with the minimum fields required to make a request.
3221+-- Use one of the following lenses to modify other fields as desired:
3223+-- * 'ifeFailureReason'
3225+-- * 'ifeFailureDetails'
3233+ :: InstallFailureEvent
3234+installFailureEvent =
3235+ InstallFailureEvent'
3236+ { _ifeFailureReason = Nothing
3237+ , _ifeFailureDetails = Nothing
3238+ , _ifeUserId = Nothing
3239+ , _ifeDeviceId = Nothing
3240+ , _ifeProductId = Nothing
3243+-- | The reason for the installation failure. This field will always be
3245+ifeFailureReason :: Lens' InstallFailureEvent (Maybe Text)
3247+ = lens _ifeFailureReason
3248+ (\ s a -> s{_ifeFailureReason = a})
3250+-- | Additional details on the failure if applicable.
3251+ifeFailureDetails :: Lens' InstallFailureEvent (Maybe Text)
3253+ = lens _ifeFailureDetails
3254+ (\ s a -> s{_ifeFailureDetails = a})
3256+-- | The ID of the user. This field will always be present.
3257+ifeUserId :: Lens' InstallFailureEvent (Maybe Text)
3259+ = lens _ifeUserId (\ s a -> s{_ifeUserId = a})
3261+-- | The Android ID of the device. This field will always be present.
3262+ifeDeviceId :: Lens' InstallFailureEvent (Maybe Text)
3264+ = lens _ifeDeviceId (\ s a -> s{_ifeDeviceId = a})
3266+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which the
3267+-- install failure event occured. This field will always be present.
3268+ifeProductId :: Lens' InstallFailureEvent (Maybe Text)
3270+ = lens _ifeProductId (\ s a -> s{_ifeProductId = a})
3272+instance FromJSON InstallFailureEvent where
3274+ = withObject "InstallFailureEvent"
3276+ InstallFailureEvent' <$>
3277+ (o .:? "failureReason") <*> (o .:? "failureDetails")
3278+ <*> (o .:? "userId")
3279+ <*> (o .:? "deviceId")
3280+ <*> (o .:? "productId"))
3282+instance ToJSON InstallFailureEvent where
3283+ toJSON InstallFailureEvent'{..}
3286+ [("failureReason" .=) <$> _ifeFailureReason,
3287+ ("failureDetails" .=) <$> _ifeFailureDetails,
3288+ ("userId" .=) <$> _ifeUserId,
3289+ ("deviceId" .=) <$> _ifeDeviceId,
3290+ ("productId" .=) <$> _ifeProductId])
3292+-- | The managed configuration resources for the user.
3294+-- /See:/ 'managedConfigurationsForUserListResponse' smart constructor.
3295+data ManagedConfigurationsForUserListResponse = ManagedConfigurationsForUserListResponse'
3296+ { _mcfulrManagedConfigurationForUser :: !(Maybe [ManagedConfiguration])
3297+ , _mcfulrKind :: !Text
3298+ } deriving (Eq,Show,Data,Typeable,Generic)
3300+-- | Creates a value of 'ManagedConfigurationsForUserListResponse' with the minimum fields required to make a request.
3302+-- Use one of the following lenses to modify other fields as desired:
3304+-- * 'mcfulrManagedConfigurationForUser'
3307+managedConfigurationsForUserListResponse
3308+ :: ManagedConfigurationsForUserListResponse
3309+managedConfigurationsForUserListResponse =
3310+ ManagedConfigurationsForUserListResponse'
3311+ { _mcfulrManagedConfigurationForUser = Nothing
3312+ , _mcfulrKind = "androidenterprise#managedConfigurationsForUserListResponse"
3315+-- | A managed configuration for an app for a specific user.
3316+mcfulrManagedConfigurationForUser :: Lens' ManagedConfigurationsForUserListResponse [ManagedConfiguration]
3317+mcfulrManagedConfigurationForUser
3318+ = lens _mcfulrManagedConfigurationForUser
3319+ (\ s a -> s{_mcfulrManagedConfigurationForUser = a})
3323+-- | Identifies what kind of resource this is. Value: the fixed string
3324+-- \"androidenterprise#managedConfigurationsForUserListResponse\".
3325+mcfulrKind :: Lens' ManagedConfigurationsForUserListResponse Text
3327+ = lens _mcfulrKind (\ s a -> s{_mcfulrKind = a})
3330+ ManagedConfigurationsForUserListResponse where
3333+ "ManagedConfigurationsForUserListResponse"
3335+ ManagedConfigurationsForUserListResponse' <$>
3336+ (o .:? "managedConfigurationForUser" .!= mempty) <*>
3338+ "androidenterprise#managedConfigurationsForUserListResponse"))
3341+ ManagedConfigurationsForUserListResponse where
3342+ toJSON ManagedConfigurationsForUserListResponse'{..}
3345+ [("managedConfigurationForUser" .=) <$>
3346+ _mcfulrManagedConfigurationForUser,
3347+ Just ("kind" .= _mcfulrKind)])
2087-- | General setting for the Google Play for Work store layout, currently
3349-- | General setting for the Google Play for Work store layout, currently
2088-- only specifying the page to display the first time the store is opened.
3350-- only specifying the page to display the first time the store is opened.
2090-- /See:/ 'storeLayout' smart constructor.
3352-- /See:/ 'storeLayout' smart constructor.
2091data StoreLayout = StoreLayout'
3353data StoreLayout = StoreLayout'
3354+ { _slStoreLayoutType :: !(Maybe Text)
2092− { _slKind :: !Text
3355+ , _slKind :: !Text
2093− , _slHomepageId :: !(Maybe Text)
3356+ , _slHomepageId :: !(Maybe Text)
2094 } deriving (Eq,Show,Data,Typeable,Generic)
3357 } deriving (Eq,Show,Data,Typeable,Generic)
2096-- | Creates a value of 'StoreLayout' with the minimum fields required to make a request.
3359-- | Creates a value of 'StoreLayout' with the minimum fields required to make a request.
2098-- Use one of the following lenses to modify other fields as desired:
3361-- Use one of the following lenses to modify other fields as desired:
3363+-- * 'slStoreLayoutType'
2100-- * 'slKind'
3365-- * 'slKind'
2102-- * 'slHomepageId'
3367-- * 'slHomepageId'
@@ -2104,20 +3369,34 @@ storeLayout
2104 :: StoreLayout
3369 :: StoreLayout
2105storeLayout =
3370storeLayout =
2106 StoreLayout'
3371 StoreLayout'
3372+ { _slStoreLayoutType = Nothing
2107− { _slKind = "androidenterprise#storeLayout"
3373+ , _slKind = "androidenterprise#storeLayout"
2108 , _slHomepageId = Nothing
3374 , _slHomepageId = Nothing
3377+-- | Sets a store layout type. If set to \"custom\", \"homepageId\" must be
3378+-- specified. If set to \"basic\", the layout will consist of all approved
3379+-- apps accessible by the user, split in pages of 100 each; in this case,
3380+-- \"homepageId\" must not be specified. The \"basic\" setting takes
3381+-- precedence over any existing collections setup for this enterprise (if
3382+-- any). Should the enterprise use collectionViewers for controlling access
3383+-- rights, these will still be respected.
3384+slStoreLayoutType :: Lens' StoreLayout (Maybe Text)
3386+ = lens _slStoreLayoutType
3387+ (\ s a -> s{_slStoreLayoutType = a})
2111-- | Identifies what kind of resource this is. Value: the fixed string
3389-- | Identifies what kind of resource this is. Value: the fixed string
2112-- \"androidenterprise#storeLayout\".
3390-- \"androidenterprise#storeLayout\".
2113slKind :: Lens' StoreLayout Text
3391slKind :: Lens' StoreLayout Text
2114slKind = lens _slKind (\ s a -> s{_slKind = a})
3392slKind = lens _slKind (\ s a -> s{_slKind = a})
2116-- | The ID of the store page to be used as the homepage. The homepage will
3394-- | The ID of the store page to be used as the homepage. The homepage will
2117−-- be used as the first page shown in the Google Play for Work store. If
3395+-- be used as the first page shown in the Google Play for Work store. If a
2118−-- there is no homepage set, an empty store is shown. The homepage can be
3396+-- homepage has not been set, the Play store shown on devices will be
2119−-- unset (by not specifying it) to empty the store. If there exists at
3397+-- empty. Not specifying a homepage on a store layout effectively empties
2120−-- least one page, this field must be set to the ID of a valid page.
3398+-- the store. If there exists at least one page, this field must be set to
3399+-- the ID of a valid page.
2121slHomepageId :: Lens' StoreLayout (Maybe Text)
3400slHomepageId :: Lens' StoreLayout (Maybe Text)
2122slHomepageId
3401slHomepageId
2123 = lens _slHomepageId (\ s a -> s{_slHomepageId = a})
3402 = lens _slHomepageId (\ s a -> s{_slHomepageId = a})
@@ -2127,23 +3406,177 @@ instance FromJSON StoreLayout where
2127 = withObject "StoreLayout"
3406 = withObject "StoreLayout"
2129 StoreLayout' <$>
3408 StoreLayout' <$>
3409+ (o .:? "storeLayoutType") <*>
2130− (o .:? "kind" .!= "androidenterprise#storeLayout")
3410+ (o .:? "kind" .!= "androidenterprise#storeLayout")
2131 <*> (o .:? "homepageId"))
3411 <*> (o .:? "homepageId"))
2133instance ToJSON StoreLayout where
3413instance ToJSON StoreLayout where
2134 toJSON StoreLayout'{..}
3414 toJSON StoreLayout'{..}
2135 = object
3415 = object
2136 (catMaybes
3416 (catMaybes
3417+ [("storeLayoutType" .=) <$> _slStoreLayoutType,
2137− [Just ("kind" .= _slKind),
3418+ Just ("kind" .= _slKind),
2138 ("homepageId" .=) <$> _slHomepageId])
3419 ("homepageId" .=) <$> _slHomepageId])
3421+-- | An event generated when a new app version is uploaded to Google Play and
3422+-- its app restrictions schema changed. To fetch the app restrictions
3423+-- schema for an app, use Products.getAppRestrictionsSchema on the EMM API.
3425+-- /See:/ 'appRestrictionsSchemaChangeEvent' smart constructor.
3426+newtype AppRestrictionsSchemaChangeEvent = AppRestrictionsSchemaChangeEvent'
3427+ { _arsceProductId :: Maybe Text
3428+ } deriving (Eq,Show,Data,Typeable,Generic)
3430+-- | Creates a value of 'AppRestrictionsSchemaChangeEvent' with the minimum fields required to make a request.
3432+-- Use one of the following lenses to modify other fields as desired:
3434+-- * 'arsceProductId'
3435+appRestrictionsSchemaChangeEvent
3436+ :: AppRestrictionsSchemaChangeEvent
3437+appRestrictionsSchemaChangeEvent =
3438+ AppRestrictionsSchemaChangeEvent'
3439+ { _arsceProductId = Nothing
3442+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which the
3443+-- app restriction schema changed. This field will always be present.
3444+arsceProductId :: Lens' AppRestrictionsSchemaChangeEvent (Maybe Text)
3446+ = lens _arsceProductId
3447+ (\ s a -> s{_arsceProductId = a})
3449+instance FromJSON AppRestrictionsSchemaChangeEvent
3452+ = withObject "AppRestrictionsSchemaChangeEvent"
3454+ AppRestrictionsSchemaChangeEvent' <$>
3455+ (o .:? "productId"))
3457+instance ToJSON AppRestrictionsSchemaChangeEvent
3459+ toJSON AppRestrictionsSchemaChangeEvent'{..}
3461+ (catMaybes [("productId" .=) <$> _arsceProductId])
3463+-- | A token authorizing an administrator to access an iframe.
3465+-- /See:/ 'administratorWebToken' smart constructor.
3466+data AdministratorWebToken = AdministratorWebToken'
3467+ { _awtKind :: !Text
3468+ , _awtToken :: !(Maybe Text)
3469+ } deriving (Eq,Show,Data,Typeable,Generic)
3471+-- | Creates a value of 'AdministratorWebToken' with the minimum fields required to make a request.
3473+-- Use one of the following lenses to modify other fields as desired:
3478+administratorWebToken
3479+ :: AdministratorWebToken
3480+administratorWebToken =
3481+ AdministratorWebToken'
3482+ { _awtKind = "androidenterprise#administratorWebToken"
3483+ , _awtToken = Nothing
3486+-- | Identifies what kind of resource this is. Value: the fixed string
3487+-- \"androidenterprise#administratorWebToken\".
3488+awtKind :: Lens' AdministratorWebToken Text
3489+awtKind = lens _awtKind (\ s a -> s{_awtKind = a})
3491+-- | An opaque token to be passed to the Play front-end to generate an
3493+awtToken :: Lens' AdministratorWebToken (Maybe Text)
3494+awtToken = lens _awtToken (\ s a -> s{_awtToken = a})
3496+instance FromJSON AdministratorWebToken where
3498+ = withObject "AdministratorWebToken"
3500+ AdministratorWebToken' <$>
3502+ "androidenterprise#administratorWebToken")
3503+ <*> (o .:? "token"))
3505+instance ToJSON AdministratorWebToken where
3506+ toJSON AdministratorWebToken'{..}
3509+ [Just ("kind" .= _awtKind),
3510+ ("token" .=) <$> _awtToken])
3512+-- | A resource returned by the GenerateSignupUrl API, which contains the
3513+-- Signup URL and Completion Token.
3515+-- /See:/ 'signupInfo' smart constructor.
3516+data SignupInfo = SignupInfo'
3517+ { _siCompletionToken :: !(Maybe Text)
3519+ , _siURL :: !(Maybe Text)
3520+ } deriving (Eq,Show,Data,Typeable,Generic)
3522+-- | Creates a value of 'SignupInfo' with the minimum fields required to make a request.
3524+-- Use one of the following lenses to modify other fields as desired:
3526+-- * 'siCompletionToken'
3535+ { _siCompletionToken = Nothing
3536+ , _siKind = "androidenterprise#signupInfo"
3540+-- | An opaque token that will be required, along with the Enterprise Token,
3541+-- for obtaining the enterprise resource from CompleteSignup.
3542+siCompletionToken :: Lens' SignupInfo (Maybe Text)
3544+ = lens _siCompletionToken
3545+ (\ s a -> s{_siCompletionToken = a})
3547+-- | Identifies what kind of resource this is. Value: the fixed string
3548+-- \"androidenterprise#signupInfo\".
3549+siKind :: Lens' SignupInfo Text
3550+siKind = lens _siKind (\ s a -> s{_siKind = a})
3552+-- | A URL under which the Admin can sign up for an enterprise. The page
3553+-- pointed to cannot be rendered in an iframe.
3554+siURL :: Lens' SignupInfo (Maybe Text)
3555+siURL = lens _siURL (\ s a -> s{_siURL = a})
3557+instance FromJSON SignupInfo where
3559+ = withObject "SignupInfo"
3562+ (o .:? "completionToken") <*>
3563+ (o .:? "kind" .!= "androidenterprise#signupInfo")
3566+instance ToJSON SignupInfo where
3567+ toJSON SignupInfo'{..}
3570+ [("completionToken" .=) <$> _siCompletionToken,
3571+ Just ("kind" .= _siKind), ("url" .=) <$> _siURL])
2140−-- | A product represents an app in the Google Play Store that is available
3573+-- | A Products resource represents an app in the Google Play Store that is
2141−-- to at least some users in the enterprise. (Some apps are restricted to a
3574+-- available to at least some users in the enterprise. (Some apps are
2142−-- single enterprise, and no information about them is made available
3575+-- restricted to a single enterprise, and no information about them is made
2143−-- outside that enterprise.) The information provided for each product
3576+-- available outside that enterprise.) The information provided for each
2144−-- (localized name, icon, link to the full Google Play details page) is
3577+-- product (localized name, icon, link to the full Google Play details
2145−-- intended to allow a basic representation of the product within an EMM
3578+-- page) is intended to allow a basic representation of the product within
2146−-- user interface.
3579+-- an EMM user interface.
2148-- /See:/ 'product' smart constructor.
3581-- /See:/ 'product' smart constructor.
2149data Product = Product'
3582data Product = Product'
@@ -2245,7 +3678,10 @@ pAppVersion
2245 _Default
3678 _Default
2246 . _Coerce
3679 . _Coerce
2248−-- | Whether this product is free, free with in-app purchases, or paid.
3681+-- | Whether this product is free, free with in-app purchases, or paid. If
3682+-- the pricing is unknown, this means the product is not generally
3683+-- available anymore (even though it might still be available to people who
2249pProductPricing :: Lens' Product (Maybe Text)
3685pProductPricing :: Lens' Product (Maybe Text)
2250pProductPricing
3686pProductPricing
2251 = lens _pProductPricing
3687 = lens _pProductPricing