@@ -1021,6 +1021,156 @@ 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+ * Analyzes IAM policies asynchronously to answer which identities have what accesses on which
1073+ * resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination.
1074+ * For Cloud Storage destination, the output format is the JSON format that represents a
1075+ * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method
1076+ * implements the [google.longrunning.Operation][google.longrunning.Operation], which allows you
1077+ * to track the operation status. We recommend intervals of at least 2 seconds with exponential
1078+ * backoff retry to poll the operation result. The metadata contains the request to help callers
1079+ * 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+ * AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder()
1088+ * .setAnalysisQuery(analysisQuery)
1089+ * .setOutputConfig(outputConfig)
1090+ * .build();
1091+ * AnalyzeIamPolicyLongrunningResponse response = assetServiceClient.analyzeIamPolicyLongrunningAsync(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 <
1101+ AnalyzeIamPolicyLongrunningResponse , AnalyzeIamPolicyLongrunningRequest >
1102+ analyzeIamPolicyLongrunningAsync (AnalyzeIamPolicyLongrunningRequest request ) {
1103+ return analyzeIamPolicyLongrunningOperationCallable ().futureCall (request );
1104+ }
1105+
1106+ // AUTO-GENERATED DOCUMENTATION AND METHOD
1107+ /**
1108+ * Analyzes IAM policies asynchronously to answer which identities have what accesses on which
1109+ * resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination.
1110+ * For Cloud Storage destination, the output format is the JSON format that represents a
1111+ * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method
1112+ * implements the [google.longrunning.Operation][google.longrunning.Operation], which allows you
1113+ * to track the operation status. We recommend intervals of at least 2 seconds with exponential
1114+ * backoff retry to poll the operation result. The metadata contains the request to help callers
1115+ * to map responses to requests.
1116+ *
1117+ * <p>Sample code:
1118+ *
1119+ * <pre><code>
1120+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
1121+ * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
1122+ * IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
1123+ * AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder()
1124+ * .setAnalysisQuery(analysisQuery)
1125+ * .setOutputConfig(outputConfig)
1126+ * .build();
1127+ * OperationFuture<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> future = assetServiceClient.analyzeIamPolicyLongrunningOperationCallable().futureCall(request);
1128+ * // Do something
1129+ * AnalyzeIamPolicyLongrunningResponse response = future.get();
1130+ * }
1131+ * </code></pre>
1132+ */
1133+ @ BetaApi ("The surface for use by generated code is not stable yet and may change in the future." )
1134+ public final OperationCallable <
1135+ AnalyzeIamPolicyLongrunningRequest ,
1136+ AnalyzeIamPolicyLongrunningResponse ,
1137+ AnalyzeIamPolicyLongrunningRequest >
1138+ analyzeIamPolicyLongrunningOperationCallable () {
1139+ return stub .analyzeIamPolicyLongrunningOperationCallable ();
1140+ }
1141+
1142+ // AUTO-GENERATED DOCUMENTATION AND METHOD
1143+ /**
1144+ * Analyzes IAM policies asynchronously to answer which identities have what accesses on which
1145+ * resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination.
1146+ * For Cloud Storage destination, the output format is the JSON format that represents a
1147+ * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method
1148+ * implements the [google.longrunning.Operation][google.longrunning.Operation], which allows you
1149+ * to track the operation status. We recommend intervals of at least 2 seconds with exponential
1150+ * backoff retry to poll the operation result. The metadata contains the request to help callers
1151+ * to map responses to requests.
1152+ *
1153+ * <p>Sample code:
1154+ *
1155+ * <pre><code>
1156+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
1157+ * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
1158+ * IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
1159+ * AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder()
1160+ * .setAnalysisQuery(analysisQuery)
1161+ * .setOutputConfig(outputConfig)
1162+ * .build();
1163+ * ApiFuture<Operation> future = assetServiceClient.analyzeIamPolicyLongrunningCallable().futureCall(request);
1164+ * // Do something
1165+ * Operation response = future.get();
1166+ * }
1167+ * </code></pre>
1168+ */
1169+ public final UnaryCallable <AnalyzeIamPolicyLongrunningRequest , Operation >
1170+ analyzeIamPolicyLongrunningCallable () {
1171+ return stub .analyzeIamPolicyLongrunningCallable ();
1172+ }
1173+
10241174 @ Override
10251175 public final void close () {
10261176 stub .close ();
0 commit comments