@@ -1021,6 +1021,155 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(
10211021 return stub .searchAllIamPoliciesCallable ();
10221022 }
10231023
1024+ // AUTO-GENERATED DOCUMENTATION AND METHOD
1025+ /**
1026+ * Analyzes IAM policies to answer which identities have what accesses on which resources.
1027+ *
1028+ * <p>Sample code:
1029+ *
1030+ * <pre><code>
1031+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
1032+ * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
1033+ * AnalyzeIamPolicyRequest request = AnalyzeIamPolicyRequest.newBuilder()
1034+ * .setAnalysisQuery(analysisQuery)
1035+ * .build();
1036+ * AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request);
1037+ * }
1038+ * </code></pre>
1039+ *
1040+ * @param request The request object containing all of the parameters for the API call.
1041+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1042+ */
1043+ public final AnalyzeIamPolicyResponse analyzeIamPolicy (AnalyzeIamPolicyRequest request ) {
1044+ return analyzeIamPolicyCallable ().call (request );
1045+ }
1046+
1047+ // AUTO-GENERATED DOCUMENTATION AND METHOD
1048+ /**
1049+ * Analyzes IAM policies to answer which identities have what accesses on which resources.
1050+ *
1051+ * <p>Sample code:
1052+ *
1053+ * <pre><code>
1054+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
1055+ * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
1056+ * AnalyzeIamPolicyRequest request = AnalyzeIamPolicyRequest.newBuilder()
1057+ * .setAnalysisQuery(analysisQuery)
1058+ * .build();
1059+ * ApiFuture<AnalyzeIamPolicyResponse> future = assetServiceClient.analyzeIamPolicyCallable().futureCall(request);
1060+ * // Do something
1061+ * AnalyzeIamPolicyResponse response = future.get();
1062+ * }
1063+ * </code></pre>
1064+ */
1065+ public final UnaryCallable <AnalyzeIamPolicyRequest , AnalyzeIamPolicyResponse >
1066+ analyzeIamPolicyCallable () {
1067+ return stub .analyzeIamPolicyCallable ();
1068+ }
1069+
1070+ // AUTO-GENERATED DOCUMENTATION AND METHOD
1071+ /**
1072+ * Exports the answers of which identities have what accesses on which resources to a Google Cloud
1073+ * Storage or a BigQuery destination. For Cloud Storage destination, the output format is the JSON
1074+ * format that represents a
1075+ * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse].
1076+ * This method implements the [google.longrunning.Operation][google.longrunning.Operation], which
1077+ * allows you to track the export status. We recommend intervals of at least 2 seconds with
1078+ * exponential retry to poll the export operation result. The metadata contains the request to
1079+ * help callers to map responses to requests.
1080+ *
1081+ * <p>Sample code:
1082+ *
1083+ * <pre><code>
1084+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
1085+ * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
1086+ * IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
1087+ * ExportIamPolicyAnalysisRequest request = ExportIamPolicyAnalysisRequest.newBuilder()
1088+ * .setAnalysisQuery(analysisQuery)
1089+ * .setOutputConfig(outputConfig)
1090+ * .build();
1091+ * ExportIamPolicyAnalysisResponse response = assetServiceClient.exportIamPolicyAnalysisAsync(request).get();
1092+ * }
1093+ * </code></pre>
1094+ *
1095+ * @param request The request object containing all of the parameters for the API call.
1096+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1097+ */
1098+ @ BetaApi (
1099+ "The surface for long-running operations is not stable yet and may change in the future." )
1100+ public final OperationFuture <ExportIamPolicyAnalysisResponse , ExportIamPolicyAnalysisRequest >
1101+ exportIamPolicyAnalysisAsync (ExportIamPolicyAnalysisRequest request ) {
1102+ return exportIamPolicyAnalysisOperationCallable ().futureCall (request );
1103+ }
1104+
1105+ // AUTO-GENERATED DOCUMENTATION AND METHOD
1106+ /**
1107+ * Exports the answers of which identities have what accesses on which resources to a Google Cloud
1108+ * Storage or a BigQuery destination. For Cloud Storage destination, the output format is the JSON
1109+ * format that represents a
1110+ * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse].
1111+ * This method implements the [google.longrunning.Operation][google.longrunning.Operation], which
1112+ * allows you to track the export status. We recommend intervals of at least 2 seconds with
1113+ * exponential retry to poll the export operation result. The metadata contains the request to
1114+ * help callers to map responses to requests.
1115+ *
1116+ * <p>Sample code:
1117+ *
1118+ * <pre><code>
1119+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
1120+ * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
1121+ * IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
1122+ * ExportIamPolicyAnalysisRequest request = ExportIamPolicyAnalysisRequest.newBuilder()
1123+ * .setAnalysisQuery(analysisQuery)
1124+ * .setOutputConfig(outputConfig)
1125+ * .build();
1126+ * OperationFuture<ExportIamPolicyAnalysisResponse, ExportIamPolicyAnalysisRequest> future = assetServiceClient.exportIamPolicyAnalysisOperationCallable().futureCall(request);
1127+ * // Do something
1128+ * ExportIamPolicyAnalysisResponse response = future.get();
1129+ * }
1130+ * </code></pre>
1131+ */
1132+ @ BetaApi ("The surface for use by generated code is not stable yet and may change in the future." )
1133+ public final OperationCallable <
1134+ ExportIamPolicyAnalysisRequest ,
1135+ ExportIamPolicyAnalysisResponse ,
1136+ ExportIamPolicyAnalysisRequest >
1137+ exportIamPolicyAnalysisOperationCallable () {
1138+ return stub .exportIamPolicyAnalysisOperationCallable ();
1139+ }
1140+
1141+ // AUTO-GENERATED DOCUMENTATION AND METHOD
1142+ /**
1143+ * Exports the answers of which identities have what accesses on which resources to a Google Cloud
1144+ * Storage or a BigQuery destination. For Cloud Storage destination, the output format is the JSON
1145+ * format that represents a
1146+ * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse].
1147+ * This method implements the [google.longrunning.Operation][google.longrunning.Operation], which
1148+ * allows you to track the export status. We recommend intervals of at least 2 seconds with
1149+ * exponential retry to poll the export operation result. The metadata contains the request to
1150+ * help callers to map responses to requests.
1151+ *
1152+ * <p>Sample code:
1153+ *
1154+ * <pre><code>
1155+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
1156+ * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
1157+ * IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
1158+ * ExportIamPolicyAnalysisRequest request = ExportIamPolicyAnalysisRequest.newBuilder()
1159+ * .setAnalysisQuery(analysisQuery)
1160+ * .setOutputConfig(outputConfig)
1161+ * .build();
1162+ * ApiFuture<Operation> future = assetServiceClient.exportIamPolicyAnalysisCallable().futureCall(request);
1163+ * // Do something
1164+ * Operation response = future.get();
1165+ * }
1166+ * </code></pre>
1167+ */
1168+ public final UnaryCallable <ExportIamPolicyAnalysisRequest , Operation >
1169+ exportIamPolicyAnalysisCallable () {
1170+ return stub .exportIamPolicyAnalysisCallable ();
1171+ }
1172+
10241173 @ Override
10251174 public final void close () {
10261175 stub .close ();
0 commit comments