@@ -113,13 +113,14 @@ public final class ApplicationPolicy extends com.google.api.client.json.GenericJ
113113
114114 /**
115115 * Configuration to enable this app as an extension app, with the capability of interacting with
116- * Android Device Policy offline.This field can be set for at most one app.The signing key
117- * certificate fingerprint of the app on the device must match one of the entries in
118- * ApplicationPolicy.signingKeyCerts or ExtensionConfig.signingKeyFingerprintsSha256 (deprecated)
119- * or the signing key certificate fingerprints obtained from Play Store for the app to be able to
120- * communicate with Android Device Policy. If the app is not on Play Store and if
121- * ApplicationPolicy.signingKeyCerts and ExtensionConfig.signingKeyFingerprintsSha256 (deprecated)
122- * are not set, a NonComplianceDetail with INVALID_VALUE is reported.
116+ * Android Device Policy offline.This field can be set for at most one app. If there is any app
117+ * with COMPANION_APP role, this field cannot be set.The signing key certificate fingerprint of
118+ * the app on the device must match one of the entries in ApplicationPolicy.signingKeyCerts or
119+ * ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) or the signing key certificate
120+ * fingerprints obtained from Play Store for the app to be able to communicate with Android Device
121+ * Policy. If the app is not on Play Store and if ApplicationPolicy.signingKeyCerts and
122+ * ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) are not set, a NonComplianceDetail
123+ * with INVALID_VALUE is reported.
123124 * The value may be {@code null}.
124125 */
125126 @ com .google .api .client .util .Key
@@ -215,16 +216,39 @@ public final class ApplicationPolicy extends com.google.api.client.json.GenericJ
215216 @ com .google .api .client .util .Key
216217 private java .lang .String preferentialNetworkId ;
217218
219+ /**
220+ * Optional. Roles the app has.Apps having certain roles can be exempted from power and background
221+ * execution restrictions, suspension and hibernation on Android 14 and above. The user control
222+ * can also be disallowed for apps with certain roles on Android 11 and above. Refer to the
223+ * documentation of each RoleType for more details.The app is notified about the roles that are
224+ * set for it if the app has a notification receiver service with . The app is notified whenever
225+ * its roles are updated or after the app is installed when it has nonempty list of roles. The app
226+ * can use this notification to bootstrap itself after the installation. See Integrate with the
227+ * AMAPI SDK (https://developers.google.com/android/management/sdk-integration) and Manage app
228+ * roles (https://developers.google.com/android/management/app-roles) guides for more details on
229+ * the requirements for the service.For the exemptions to be applied and the app to be notified
230+ * about the roles, the signing key certificate fingerprint of the app on the device must match
231+ * one of the signing key certificate fingerprints obtained from Play Store or one of the entries
232+ * in ApplicationPolicy.signingKeyCerts. Otherwise, a NonComplianceDetail with
233+ * APP_SIGNING_CERT_MISMATCH is reported.There must not be duplicate roles with the same roleType.
234+ * Multiple apps cannot hold a role with the same roleType. A role with type ROLE_TYPE_UNSPECIFIED
235+ * is not allowed.
236+ * The value may be {@code null}.
237+ */
238+ @ com .google .api .client .util .Key
239+ private java .util .List <Role > roles ;
240+
218241 /**
219242 * Optional. Signing key certificates of the app.This field is required in the following cases:
220- * The app has installType set to CUSTOM (i.e. a custom app). The app has extensionConfig set
221- * (i.e. an extension app) but ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) is not
222- * set and the app does not exist on the Play Store.If this field is not set for a custom app, the
223- * policy is rejected. If it is not set when required for a non-custom app, a NonComplianceDetail
224- * with INVALID_VALUE is reported.For other cases, this field is optional and the signing key
243+ * The app has installType set to CUSTOM (i.e. a custom app). The app has roles set to a nonempty
244+ * list and the app does not exist on the Play Store. The app has extensionConfig set (i.e. an
245+ * extension app) but ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) is not set and the
246+ * app does not exist on the Play Store.If this field is not set for a custom app, the policy is
247+ * rejected. If it is not set when required for a non-custom app, a NonComplianceDetail with
248+ * INVALID_VALUE is reported.For other cases, this field is optional and the signing key
225249 * certificates obtained from Play Store are used.See following policy settings to see how this
226250 * field is used: choosePrivateKeyRules ApplicationPolicy.InstallType.CUSTOM
227- * ApplicationPolicy.extensionConfig
251+ * ApplicationPolicy.extensionConfig ApplicationPolicy.roles
228252 * The value may be {@code null}.
229253 */
230254 @ com .google .api .client .util .Key
@@ -434,13 +458,14 @@ public ApplicationPolicy setDisabled(java.lang.Boolean disabled) {
434458
435459 /**
436460 * Configuration to enable this app as an extension app, with the capability of interacting with
437- * Android Device Policy offline.This field can be set for at most one app.The signing key
438- * certificate fingerprint of the app on the device must match one of the entries in
439- * ApplicationPolicy.signingKeyCerts or ExtensionConfig.signingKeyFingerprintsSha256 (deprecated)
440- * or the signing key certificate fingerprints obtained from Play Store for the app to be able to
441- * communicate with Android Device Policy. If the app is not on Play Store and if
442- * ApplicationPolicy.signingKeyCerts and ExtensionConfig.signingKeyFingerprintsSha256 (deprecated)
443- * are not set, a NonComplianceDetail with INVALID_VALUE is reported.
461+ * Android Device Policy offline.This field can be set for at most one app. If there is any app
462+ * with COMPANION_APP role, this field cannot be set.The signing key certificate fingerprint of
463+ * the app on the device must match one of the entries in ApplicationPolicy.signingKeyCerts or
464+ * ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) or the signing key certificate
465+ * fingerprints obtained from Play Store for the app to be able to communicate with Android Device
466+ * Policy. If the app is not on Play Store and if ApplicationPolicy.signingKeyCerts and
467+ * ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) are not set, a NonComplianceDetail
468+ * with INVALID_VALUE is reported.
444469 * @return value or {@code null} for none
445470 */
446471 public ExtensionConfig getExtensionConfig () {
@@ -449,13 +474,14 @@ public ExtensionConfig getExtensionConfig() {
449474
450475 /**
451476 * Configuration to enable this app as an extension app, with the capability of interacting with
452- * Android Device Policy offline.This field can be set for at most one app.The signing key
453- * certificate fingerprint of the app on the device must match one of the entries in
454- * ApplicationPolicy.signingKeyCerts or ExtensionConfig.signingKeyFingerprintsSha256 (deprecated)
455- * or the signing key certificate fingerprints obtained from Play Store for the app to be able to
456- * communicate with Android Device Policy. If the app is not on Play Store and if
457- * ApplicationPolicy.signingKeyCerts and ExtensionConfig.signingKeyFingerprintsSha256 (deprecated)
458- * are not set, a NonComplianceDetail with INVALID_VALUE is reported.
477+ * Android Device Policy offline.This field can be set for at most one app. If there is any app
478+ * with COMPANION_APP role, this field cannot be set.The signing key certificate fingerprint of
479+ * the app on the device must match one of the entries in ApplicationPolicy.signingKeyCerts or
480+ * ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) or the signing key certificate
481+ * fingerprints obtained from Play Store for the app to be able to communicate with Android Device
482+ * Policy. If the app is not on Play Store and if ApplicationPolicy.signingKeyCerts and
483+ * ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) are not set, a NonComplianceDetail
484+ * with INVALID_VALUE is reported.
459485 * @param extensionConfig extensionConfig or {@code null} for none
460486 */
461487 public ApplicationPolicy setExtensionConfig (ExtensionConfig extensionConfig ) {
@@ -673,16 +699,64 @@ public ApplicationPolicy setPreferentialNetworkId(java.lang.String preferentialN
673699 return this ;
674700 }
675701
702+ /**
703+ * Optional. Roles the app has.Apps having certain roles can be exempted from power and background
704+ * execution restrictions, suspension and hibernation on Android 14 and above. The user control
705+ * can also be disallowed for apps with certain roles on Android 11 and above. Refer to the
706+ * documentation of each RoleType for more details.The app is notified about the roles that are
707+ * set for it if the app has a notification receiver service with . The app is notified whenever
708+ * its roles are updated or after the app is installed when it has nonempty list of roles. The app
709+ * can use this notification to bootstrap itself after the installation. See Integrate with the
710+ * AMAPI SDK (https://developers.google.com/android/management/sdk-integration) and Manage app
711+ * roles (https://developers.google.com/android/management/app-roles) guides for more details on
712+ * the requirements for the service.For the exemptions to be applied and the app to be notified
713+ * about the roles, the signing key certificate fingerprint of the app on the device must match
714+ * one of the signing key certificate fingerprints obtained from Play Store or one of the entries
715+ * in ApplicationPolicy.signingKeyCerts. Otherwise, a NonComplianceDetail with
716+ * APP_SIGNING_CERT_MISMATCH is reported.There must not be duplicate roles with the same roleType.
717+ * Multiple apps cannot hold a role with the same roleType. A role with type ROLE_TYPE_UNSPECIFIED
718+ * is not allowed.
719+ * @return value or {@code null} for none
720+ */
721+ public java .util .List <Role > getRoles () {
722+ return roles ;
723+ }
724+
725+ /**
726+ * Optional. Roles the app has.Apps having certain roles can be exempted from power and background
727+ * execution restrictions, suspension and hibernation on Android 14 and above. The user control
728+ * can also be disallowed for apps with certain roles on Android 11 and above. Refer to the
729+ * documentation of each RoleType for more details.The app is notified about the roles that are
730+ * set for it if the app has a notification receiver service with . The app is notified whenever
731+ * its roles are updated or after the app is installed when it has nonempty list of roles. The app
732+ * can use this notification to bootstrap itself after the installation. See Integrate with the
733+ * AMAPI SDK (https://developers.google.com/android/management/sdk-integration) and Manage app
734+ * roles (https://developers.google.com/android/management/app-roles) guides for more details on
735+ * the requirements for the service.For the exemptions to be applied and the app to be notified
736+ * about the roles, the signing key certificate fingerprint of the app on the device must match
737+ * one of the signing key certificate fingerprints obtained from Play Store or one of the entries
738+ * in ApplicationPolicy.signingKeyCerts. Otherwise, a NonComplianceDetail with
739+ * APP_SIGNING_CERT_MISMATCH is reported.There must not be duplicate roles with the same roleType.
740+ * Multiple apps cannot hold a role with the same roleType. A role with type ROLE_TYPE_UNSPECIFIED
741+ * is not allowed.
742+ * @param roles roles or {@code null} for none
743+ */
744+ public ApplicationPolicy setRoles (java .util .List <Role > roles ) {
745+ this .roles = roles ;
746+ return this ;
747+ }
748+
676749 /**
677750 * Optional. Signing key certificates of the app.This field is required in the following cases:
678- * The app has installType set to CUSTOM (i.e. a custom app). The app has extensionConfig set
679- * (i.e. an extension app) but ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) is not
680- * set and the app does not exist on the Play Store.If this field is not set for a custom app, the
681- * policy is rejected. If it is not set when required for a non-custom app, a NonComplianceDetail
682- * with INVALID_VALUE is reported.For other cases, this field is optional and the signing key
751+ * The app has installType set to CUSTOM (i.e. a custom app). The app has roles set to a nonempty
752+ * list and the app does not exist on the Play Store. The app has extensionConfig set (i.e. an
753+ * extension app) but ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) is not set and the
754+ * app does not exist on the Play Store.If this field is not set for a custom app, the policy is
755+ * rejected. If it is not set when required for a non-custom app, a NonComplianceDetail with
756+ * INVALID_VALUE is reported.For other cases, this field is optional and the signing key
683757 * certificates obtained from Play Store are used.See following policy settings to see how this
684758 * field is used: choosePrivateKeyRules ApplicationPolicy.InstallType.CUSTOM
685- * ApplicationPolicy.extensionConfig
759+ * ApplicationPolicy.extensionConfig ApplicationPolicy.roles
686760 * @return value or {@code null} for none
687761 */
688762 public java .util .List <ApplicationSigningKeyCert > getSigningKeyCerts () {
@@ -691,14 +765,15 @@ public java.util.List<ApplicationSigningKeyCert> getSigningKeyCerts() {
691765
692766 /**
693767 * Optional. Signing key certificates of the app.This field is required in the following cases:
694- * The app has installType set to CUSTOM (i.e. a custom app). The app has extensionConfig set
695- * (i.e. an extension app) but ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) is not
696- * set and the app does not exist on the Play Store.If this field is not set for a custom app, the
697- * policy is rejected. If it is not set when required for a non-custom app, a NonComplianceDetail
698- * with INVALID_VALUE is reported.For other cases, this field is optional and the signing key
768+ * The app has installType set to CUSTOM (i.e. a custom app). The app has roles set to a nonempty
769+ * list and the app does not exist on the Play Store. The app has extensionConfig set (i.e. an
770+ * extension app) but ExtensionConfig.signingKeyFingerprintsSha256 (deprecated) is not set and the
771+ * app does not exist on the Play Store.If this field is not set for a custom app, the policy is
772+ * rejected. If it is not set when required for a non-custom app, a NonComplianceDetail with
773+ * INVALID_VALUE is reported.For other cases, this field is optional and the signing key
699774 * certificates obtained from Play Store are used.See following policy settings to see how this
700775 * field is used: choosePrivateKeyRules ApplicationPolicy.InstallType.CUSTOM
701- * ApplicationPolicy.extensionConfig
776+ * ApplicationPolicy.extensionConfig ApplicationPolicy.roles
702777 * @param signingKeyCerts signingKeyCerts or {@code null} for none
703778 */
704779 public ApplicationPolicy setSigningKeyCerts (java .util .List <ApplicationSigningKeyCert > signingKeyCerts ) {
0 commit comments