1 /* 2 * Copyright 2022 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.google.cloud.asset.v1.stub; 18 19 import static com.google.cloud.asset.v1.AssetServiceClient.AnalyzeOrgPoliciesPagedResponse; 20 import static com.google.cloud.asset.v1.AssetServiceClient.AnalyzeOrgPolicyGovernedAssetsPagedResponse; 21 import static com.google.cloud.asset.v1.AssetServiceClient.AnalyzeOrgPolicyGovernedContainersPagedResponse; 22 import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; 23 import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; 24 import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; 25 import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; 26 27 import com.google.api.gax.core.BackgroundResource; 28 import com.google.api.gax.core.BackgroundResourceAggregation; 29 import com.google.api.gax.grpc.GrpcCallSettings; 30 import com.google.api.gax.grpc.GrpcStubCallableFactory; 31 import com.google.api.gax.rpc.ClientContext; 32 import com.google.api.gax.rpc.OperationCallable; 33 import com.google.api.gax.rpc.UnaryCallable; 34 import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; 35 import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; 36 import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; 37 import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; 38 import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; 39 import com.google.cloud.asset.v1.AnalyzeMoveRequest; 40 import com.google.cloud.asset.v1.AnalyzeMoveResponse; 41 import com.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest; 42 import com.google.cloud.asset.v1.AnalyzeOrgPoliciesResponse; 43 import com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest; 44 import com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse; 45 import com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest; 46 import com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse; 47 import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; 48 import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; 49 import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; 50 import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; 51 import com.google.cloud.asset.v1.CreateFeedRequest; 52 import com.google.cloud.asset.v1.CreateSavedQueryRequest; 53 import com.google.cloud.asset.v1.DeleteFeedRequest; 54 import com.google.cloud.asset.v1.DeleteSavedQueryRequest; 55 import com.google.cloud.asset.v1.ExportAssetsRequest; 56 import com.google.cloud.asset.v1.ExportAssetsResponse; 57 import com.google.cloud.asset.v1.Feed; 58 import com.google.cloud.asset.v1.GetFeedRequest; 59 import com.google.cloud.asset.v1.GetSavedQueryRequest; 60 import com.google.cloud.asset.v1.ListAssetsRequest; 61 import com.google.cloud.asset.v1.ListAssetsResponse; 62 import com.google.cloud.asset.v1.ListFeedsRequest; 63 import com.google.cloud.asset.v1.ListFeedsResponse; 64 import com.google.cloud.asset.v1.ListSavedQueriesRequest; 65 import com.google.cloud.asset.v1.ListSavedQueriesResponse; 66 import com.google.cloud.asset.v1.QueryAssetsRequest; 67 import com.google.cloud.asset.v1.QueryAssetsResponse; 68 import com.google.cloud.asset.v1.SavedQuery; 69 import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; 70 import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; 71 import com.google.cloud.asset.v1.SearchAllResourcesRequest; 72 import com.google.cloud.asset.v1.SearchAllResourcesResponse; 73 import com.google.cloud.asset.v1.UpdateFeedRequest; 74 import com.google.cloud.asset.v1.UpdateSavedQueryRequest; 75 import com.google.common.collect.ImmutableMap; 76 import com.google.longrunning.Operation; 77 import com.google.longrunning.stub.GrpcOperationsStub; 78 import com.google.protobuf.Empty; 79 import io.grpc.MethodDescriptor; 80 import io.grpc.protobuf.ProtoUtils; 81 import java.io.IOException; 82 import java.util.concurrent.TimeUnit; 83 import javax.annotation.Generated; 84 85 // AUTO-GENERATED DOCUMENTATION AND CLASS. 86 /** 87 * gRPC stub implementation for the AssetService service API. 88 * 89 * <p>This class is for advanced usage and reflects the underlying API directly. 90 */ 91 @Generated("by gapic-generator-java") 92 public class GrpcAssetServiceStub extends AssetServiceStub { 93 private static final MethodDescriptor<ExportAssetsRequest, Operation> 94 exportAssetsMethodDescriptor = 95 MethodDescriptor.<ExportAssetsRequest, Operation>newBuilder() 96 .setType(MethodDescriptor.MethodType.UNARY) 97 .setFullMethodName("google.cloud.asset.v1.AssetService/ExportAssets") 98 .setRequestMarshaller(ProtoUtils.marshaller(ExportAssetsRequest.getDefaultInstance())) 99 .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) 100 .build(); 101 102 private static final MethodDescriptor<ListAssetsRequest, ListAssetsResponse> 103 listAssetsMethodDescriptor = 104 MethodDescriptor.<ListAssetsRequest, ListAssetsResponse>newBuilder() 105 .setType(MethodDescriptor.MethodType.UNARY) 106 .setFullMethodName("google.cloud.asset.v1.AssetService/ListAssets") 107 .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) 108 .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) 109 .build(); 110 111 private static final MethodDescriptor<BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> 112 batchGetAssetsHistoryMethodDescriptor = 113 MethodDescriptor.<BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse>newBuilder() 114 .setType(MethodDescriptor.MethodType.UNARY) 115 .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetAssetsHistory") 116 .setRequestMarshaller( 117 ProtoUtils.marshaller(BatchGetAssetsHistoryRequest.getDefaultInstance())) 118 .setResponseMarshaller( 119 ProtoUtils.marshaller(BatchGetAssetsHistoryResponse.getDefaultInstance())) 120 .build(); 121 122 private static final MethodDescriptor<CreateFeedRequest, Feed> createFeedMethodDescriptor = 123 MethodDescriptor.<CreateFeedRequest, Feed>newBuilder() 124 .setType(MethodDescriptor.MethodType.UNARY) 125 .setFullMethodName("google.cloud.asset.v1.AssetService/CreateFeed") 126 .setRequestMarshaller(ProtoUtils.marshaller(CreateFeedRequest.getDefaultInstance())) 127 .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) 128 .build(); 129 130 private static final MethodDescriptor<GetFeedRequest, Feed> getFeedMethodDescriptor = 131 MethodDescriptor.<GetFeedRequest, Feed>newBuilder() 132 .setType(MethodDescriptor.MethodType.UNARY) 133 .setFullMethodName("google.cloud.asset.v1.AssetService/GetFeed") 134 .setRequestMarshaller(ProtoUtils.marshaller(GetFeedRequest.getDefaultInstance())) 135 .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) 136 .build(); 137 138 private static final MethodDescriptor<ListFeedsRequest, ListFeedsResponse> 139 listFeedsMethodDescriptor = 140 MethodDescriptor.<ListFeedsRequest, ListFeedsResponse>newBuilder() 141 .setType(MethodDescriptor.MethodType.UNARY) 142 .setFullMethodName("google.cloud.asset.v1.AssetService/ListFeeds") 143 .setRequestMarshaller(ProtoUtils.marshaller(ListFeedsRequest.getDefaultInstance())) 144 .setResponseMarshaller(ProtoUtils.marshaller(ListFeedsResponse.getDefaultInstance())) 145 .build(); 146 147 private static final MethodDescriptor<UpdateFeedRequest, Feed> updateFeedMethodDescriptor = 148 MethodDescriptor.<UpdateFeedRequest, Feed>newBuilder() 149 .setType(MethodDescriptor.MethodType.UNARY) 150 .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateFeed") 151 .setRequestMarshaller(ProtoUtils.marshaller(UpdateFeedRequest.getDefaultInstance())) 152 .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) 153 .build(); 154 155 private static final MethodDescriptor<DeleteFeedRequest, Empty> deleteFeedMethodDescriptor = 156 MethodDescriptor.<DeleteFeedRequest, Empty>newBuilder() 157 .setType(MethodDescriptor.MethodType.UNARY) 158 .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteFeed") 159 .setRequestMarshaller(ProtoUtils.marshaller(DeleteFeedRequest.getDefaultInstance())) 160 .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) 161 .build(); 162 163 private static final MethodDescriptor<SearchAllResourcesRequest, SearchAllResourcesResponse> 164 searchAllResourcesMethodDescriptor = 165 MethodDescriptor.<SearchAllResourcesRequest, SearchAllResourcesResponse>newBuilder() 166 .setType(MethodDescriptor.MethodType.UNARY) 167 .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllResources") 168 .setRequestMarshaller( 169 ProtoUtils.marshaller(SearchAllResourcesRequest.getDefaultInstance())) 170 .setResponseMarshaller( 171 ProtoUtils.marshaller(SearchAllResourcesResponse.getDefaultInstance())) 172 .build(); 173 174 private static final MethodDescriptor<SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse> 175 searchAllIamPoliciesMethodDescriptor = 176 MethodDescriptor.<SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse>newBuilder() 177 .setType(MethodDescriptor.MethodType.UNARY) 178 .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllIamPolicies") 179 .setRequestMarshaller( 180 ProtoUtils.marshaller(SearchAllIamPoliciesRequest.getDefaultInstance())) 181 .setResponseMarshaller( 182 ProtoUtils.marshaller(SearchAllIamPoliciesResponse.getDefaultInstance())) 183 .build(); 184 185 private static final MethodDescriptor<AnalyzeIamPolicyRequest, AnalyzeIamPolicyResponse> 186 analyzeIamPolicyMethodDescriptor = 187 MethodDescriptor.<AnalyzeIamPolicyRequest, AnalyzeIamPolicyResponse>newBuilder() 188 .setType(MethodDescriptor.MethodType.UNARY) 189 .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicy") 190 .setRequestMarshaller( 191 ProtoUtils.marshaller(AnalyzeIamPolicyRequest.getDefaultInstance())) 192 .setResponseMarshaller( 193 ProtoUtils.marshaller(AnalyzeIamPolicyResponse.getDefaultInstance())) 194 .build(); 195 196 private static final MethodDescriptor<AnalyzeIamPolicyLongrunningRequest, Operation> 197 analyzeIamPolicyLongrunningMethodDescriptor = 198 MethodDescriptor.<AnalyzeIamPolicyLongrunningRequest, Operation>newBuilder() 199 .setType(MethodDescriptor.MethodType.UNARY) 200 .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicyLongrunning") 201 .setRequestMarshaller( 202 ProtoUtils.marshaller(AnalyzeIamPolicyLongrunningRequest.getDefaultInstance())) 203 .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) 204 .build(); 205 206 private static final MethodDescriptor<AnalyzeMoveRequest, AnalyzeMoveResponse> 207 analyzeMoveMethodDescriptor = 208 MethodDescriptor.<AnalyzeMoveRequest, AnalyzeMoveResponse>newBuilder() 209 .setType(MethodDescriptor.MethodType.UNARY) 210 .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeMove") 211 .setRequestMarshaller(ProtoUtils.marshaller(AnalyzeMoveRequest.getDefaultInstance())) 212 .setResponseMarshaller( 213 ProtoUtils.marshaller(AnalyzeMoveResponse.getDefaultInstance())) 214 .build(); 215 216 private static final MethodDescriptor<QueryAssetsRequest, QueryAssetsResponse> 217 queryAssetsMethodDescriptor = 218 MethodDescriptor.<QueryAssetsRequest, QueryAssetsResponse>newBuilder() 219 .setType(MethodDescriptor.MethodType.UNARY) 220 .setFullMethodName("google.cloud.asset.v1.AssetService/QueryAssets") 221 .setRequestMarshaller(ProtoUtils.marshaller(QueryAssetsRequest.getDefaultInstance())) 222 .setResponseMarshaller( 223 ProtoUtils.marshaller(QueryAssetsResponse.getDefaultInstance())) 224 .build(); 225 226 private static final MethodDescriptor<CreateSavedQueryRequest, SavedQuery> 227 createSavedQueryMethodDescriptor = 228 MethodDescriptor.<CreateSavedQueryRequest, SavedQuery>newBuilder() 229 .setType(MethodDescriptor.MethodType.UNARY) 230 .setFullMethodName("google.cloud.asset.v1.AssetService/CreateSavedQuery") 231 .setRequestMarshaller( 232 ProtoUtils.marshaller(CreateSavedQueryRequest.getDefaultInstance())) 233 .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) 234 .build(); 235 236 private static final MethodDescriptor<GetSavedQueryRequest, SavedQuery> 237 getSavedQueryMethodDescriptor = 238 MethodDescriptor.<GetSavedQueryRequest, SavedQuery>newBuilder() 239 .setType(MethodDescriptor.MethodType.UNARY) 240 .setFullMethodName("google.cloud.asset.v1.AssetService/GetSavedQuery") 241 .setRequestMarshaller( 242 ProtoUtils.marshaller(GetSavedQueryRequest.getDefaultInstance())) 243 .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) 244 .build(); 245 246 private static final MethodDescriptor<ListSavedQueriesRequest, ListSavedQueriesResponse> 247 listSavedQueriesMethodDescriptor = 248 MethodDescriptor.<ListSavedQueriesRequest, ListSavedQueriesResponse>newBuilder() 249 .setType(MethodDescriptor.MethodType.UNARY) 250 .setFullMethodName("google.cloud.asset.v1.AssetService/ListSavedQueries") 251 .setRequestMarshaller( 252 ProtoUtils.marshaller(ListSavedQueriesRequest.getDefaultInstance())) 253 .setResponseMarshaller( 254 ProtoUtils.marshaller(ListSavedQueriesResponse.getDefaultInstance())) 255 .build(); 256 257 private static final MethodDescriptor<UpdateSavedQueryRequest, SavedQuery> 258 updateSavedQueryMethodDescriptor = 259 MethodDescriptor.<UpdateSavedQueryRequest, SavedQuery>newBuilder() 260 .setType(MethodDescriptor.MethodType.UNARY) 261 .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateSavedQuery") 262 .setRequestMarshaller( 263 ProtoUtils.marshaller(UpdateSavedQueryRequest.getDefaultInstance())) 264 .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) 265 .build(); 266 267 private static final MethodDescriptor<DeleteSavedQueryRequest, Empty> 268 deleteSavedQueryMethodDescriptor = 269 MethodDescriptor.<DeleteSavedQueryRequest, Empty>newBuilder() 270 .setType(MethodDescriptor.MethodType.UNARY) 271 .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteSavedQuery") 272 .setRequestMarshaller( 273 ProtoUtils.marshaller(DeleteSavedQueryRequest.getDefaultInstance())) 274 .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) 275 .build(); 276 277 private static final MethodDescriptor< 278 BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> 279 batchGetEffectiveIamPoliciesMethodDescriptor = 280 MethodDescriptor 281 .<BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> 282 newBuilder() 283 .setType(MethodDescriptor.MethodType.UNARY) 284 .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetEffectiveIamPolicies") 285 .setRequestMarshaller( 286 ProtoUtils.marshaller(BatchGetEffectiveIamPoliciesRequest.getDefaultInstance())) 287 .setResponseMarshaller( 288 ProtoUtils.marshaller(BatchGetEffectiveIamPoliciesResponse.getDefaultInstance())) 289 .build(); 290 291 private static final MethodDescriptor<AnalyzeOrgPoliciesRequest, AnalyzeOrgPoliciesResponse> 292 analyzeOrgPoliciesMethodDescriptor = 293 MethodDescriptor.<AnalyzeOrgPoliciesRequest, AnalyzeOrgPoliciesResponse>newBuilder() 294 .setType(MethodDescriptor.MethodType.UNARY) 295 .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeOrgPolicies") 296 .setRequestMarshaller( 297 ProtoUtils.marshaller(AnalyzeOrgPoliciesRequest.getDefaultInstance())) 298 .setResponseMarshaller( 299 ProtoUtils.marshaller(AnalyzeOrgPoliciesResponse.getDefaultInstance())) 300 .build(); 301 302 private static final MethodDescriptor< 303 AnalyzeOrgPolicyGovernedContainersRequest, AnalyzeOrgPolicyGovernedContainersResponse> 304 analyzeOrgPolicyGovernedContainersMethodDescriptor = 305 MethodDescriptor 306 .<AnalyzeOrgPolicyGovernedContainersRequest, 307 AnalyzeOrgPolicyGovernedContainersResponse> 308 newBuilder() 309 .setType(MethodDescriptor.MethodType.UNARY) 310 .setFullMethodName( 311 "google.cloud.asset.v1.AssetService/AnalyzeOrgPolicyGovernedContainers") 312 .setRequestMarshaller( 313 ProtoUtils.marshaller( 314 AnalyzeOrgPolicyGovernedContainersRequest.getDefaultInstance())) 315 .setResponseMarshaller( 316 ProtoUtils.marshaller( 317 AnalyzeOrgPolicyGovernedContainersResponse.getDefaultInstance())) 318 .build(); 319 320 private static final MethodDescriptor< 321 AnalyzeOrgPolicyGovernedAssetsRequest, AnalyzeOrgPolicyGovernedAssetsResponse> 322 analyzeOrgPolicyGovernedAssetsMethodDescriptor = 323 MethodDescriptor 324 .<AnalyzeOrgPolicyGovernedAssetsRequest, AnalyzeOrgPolicyGovernedAssetsResponse> 325 newBuilder() 326 .setType(MethodDescriptor.MethodType.UNARY) 327 .setFullMethodName( 328 "google.cloud.asset.v1.AssetService/AnalyzeOrgPolicyGovernedAssets") 329 .setRequestMarshaller( 330 ProtoUtils.marshaller(AnalyzeOrgPolicyGovernedAssetsRequest.getDefaultInstance())) 331 .setResponseMarshaller( 332 ProtoUtils.marshaller( 333 AnalyzeOrgPolicyGovernedAssetsResponse.getDefaultInstance())) 334 .build(); 335 336 private final UnaryCallable<ExportAssetsRequest, Operation> exportAssetsCallable; 337 private final OperationCallable<ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> 338 exportAssetsOperationCallable; 339 private final UnaryCallable<ListAssetsRequest, ListAssetsResponse> listAssetsCallable; 340 private final UnaryCallable<ListAssetsRequest, ListAssetsPagedResponse> listAssetsPagedCallable; 341 private final UnaryCallable<BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> 342 batchGetAssetsHistoryCallable; 343 private final UnaryCallable<CreateFeedRequest, Feed> createFeedCallable; 344 private final UnaryCallable<GetFeedRequest, Feed> getFeedCallable; 345 private final UnaryCallable<ListFeedsRequest, ListFeedsResponse> listFeedsCallable; 346 private final UnaryCallable<UpdateFeedRequest, Feed> updateFeedCallable; 347 private final UnaryCallable<DeleteFeedRequest, Empty> deleteFeedCallable; 348 private final UnaryCallable<SearchAllResourcesRequest, SearchAllResourcesResponse> 349 searchAllResourcesCallable; 350 private final UnaryCallable<SearchAllResourcesRequest, SearchAllResourcesPagedResponse> 351 searchAllResourcesPagedCallable; 352 private final UnaryCallable<SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse> 353 searchAllIamPoliciesCallable; 354 private final UnaryCallable<SearchAllIamPoliciesRequest, SearchAllIamPoliciesPagedResponse> 355 searchAllIamPoliciesPagedCallable; 356 private final UnaryCallable<AnalyzeIamPolicyRequest, AnalyzeIamPolicyResponse> 357 analyzeIamPolicyCallable; 358 private final UnaryCallable<AnalyzeIamPolicyLongrunningRequest, Operation> 359 analyzeIamPolicyLongrunningCallable; 360 private final OperationCallable< 361 AnalyzeIamPolicyLongrunningRequest, 362 AnalyzeIamPolicyLongrunningResponse, 363 AnalyzeIamPolicyLongrunningMetadata> 364 analyzeIamPolicyLongrunningOperationCallable; 365 private final UnaryCallable<AnalyzeMoveRequest, AnalyzeMoveResponse> analyzeMoveCallable; 366 private final UnaryCallable<QueryAssetsRequest, QueryAssetsResponse> queryAssetsCallable; 367 private final UnaryCallable<CreateSavedQueryRequest, SavedQuery> createSavedQueryCallable; 368 private final UnaryCallable<GetSavedQueryRequest, SavedQuery> getSavedQueryCallable; 369 private final UnaryCallable<ListSavedQueriesRequest, ListSavedQueriesResponse> 370 listSavedQueriesCallable; 371 private final UnaryCallable<ListSavedQueriesRequest, ListSavedQueriesPagedResponse> 372 listSavedQueriesPagedCallable; 373 private final UnaryCallable<UpdateSavedQueryRequest, SavedQuery> updateSavedQueryCallable; 374 private final UnaryCallable<DeleteSavedQueryRequest, Empty> deleteSavedQueryCallable; 375 private final UnaryCallable< 376 BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> 377 batchGetEffectiveIamPoliciesCallable; 378 private final UnaryCallable<AnalyzeOrgPoliciesRequest, AnalyzeOrgPoliciesResponse> 379 analyzeOrgPoliciesCallable; 380 private final UnaryCallable<AnalyzeOrgPoliciesRequest, AnalyzeOrgPoliciesPagedResponse> 381 analyzeOrgPoliciesPagedCallable; 382 private final UnaryCallable< 383 AnalyzeOrgPolicyGovernedContainersRequest, AnalyzeOrgPolicyGovernedContainersResponse> 384 analyzeOrgPolicyGovernedContainersCallable; 385 private final UnaryCallable< 386 AnalyzeOrgPolicyGovernedContainersRequest, 387 AnalyzeOrgPolicyGovernedContainersPagedResponse> 388 analyzeOrgPolicyGovernedContainersPagedCallable; 389 private final UnaryCallable< 390 AnalyzeOrgPolicyGovernedAssetsRequest, AnalyzeOrgPolicyGovernedAssetsResponse> 391 analyzeOrgPolicyGovernedAssetsCallable; 392 private final UnaryCallable< 393 AnalyzeOrgPolicyGovernedAssetsRequest, AnalyzeOrgPolicyGovernedAssetsPagedResponse> 394 analyzeOrgPolicyGovernedAssetsPagedCallable; 395 396 private final BackgroundResource backgroundResources; 397 private final GrpcOperationsStub operationsStub; 398 private final GrpcStubCallableFactory callableFactory; 399 create(AssetServiceStubSettings settings)400 public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) 401 throws IOException { 402 return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); 403 } 404 create(ClientContext clientContext)405 public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { 406 return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); 407 } 408 create( ClientContext clientContext, GrpcStubCallableFactory callableFactory)409 public static final GrpcAssetServiceStub create( 410 ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { 411 return new GrpcAssetServiceStub( 412 AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); 413 } 414 415 /** 416 * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so 417 * that it is easy to make a subclass, but otherwise, the static factory methods should be 418 * preferred. 419 */ GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext)420 protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) 421 throws IOException { 422 this(settings, clientContext, new GrpcAssetServiceCallableFactory()); 423 } 424 425 /** 426 * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so 427 * that it is easy to make a subclass, but otherwise, the static factory methods should be 428 * preferred. 429 */ GrpcAssetServiceStub( AssetServiceStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory)430 protected GrpcAssetServiceStub( 431 AssetServiceStubSettings settings, 432 ClientContext clientContext, 433 GrpcStubCallableFactory callableFactory) 434 throws IOException { 435 this.callableFactory = callableFactory; 436 this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); 437 438 GrpcCallSettings<ExportAssetsRequest, Operation> exportAssetsTransportSettings = 439 GrpcCallSettings.<ExportAssetsRequest, Operation>newBuilder() 440 .setMethodDescriptor(exportAssetsMethodDescriptor) 441 .setParamsExtractor( 442 request -> { 443 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 444 params.put("parent", String.valueOf(request.getParent())); 445 return params.build(); 446 }) 447 .build(); 448 GrpcCallSettings<ListAssetsRequest, ListAssetsResponse> listAssetsTransportSettings = 449 GrpcCallSettings.<ListAssetsRequest, ListAssetsResponse>newBuilder() 450 .setMethodDescriptor(listAssetsMethodDescriptor) 451 .setParamsExtractor( 452 request -> { 453 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 454 params.put("parent", String.valueOf(request.getParent())); 455 return params.build(); 456 }) 457 .build(); 458 GrpcCallSettings<BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> 459 batchGetAssetsHistoryTransportSettings = 460 GrpcCallSettings 461 .<BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse>newBuilder() 462 .setMethodDescriptor(batchGetAssetsHistoryMethodDescriptor) 463 .setParamsExtractor( 464 request -> { 465 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 466 params.put("parent", String.valueOf(request.getParent())); 467 return params.build(); 468 }) 469 .build(); 470 GrpcCallSettings<CreateFeedRequest, Feed> createFeedTransportSettings = 471 GrpcCallSettings.<CreateFeedRequest, Feed>newBuilder() 472 .setMethodDescriptor(createFeedMethodDescriptor) 473 .setParamsExtractor( 474 request -> { 475 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 476 params.put("parent", String.valueOf(request.getParent())); 477 return params.build(); 478 }) 479 .build(); 480 GrpcCallSettings<GetFeedRequest, Feed> getFeedTransportSettings = 481 GrpcCallSettings.<GetFeedRequest, Feed>newBuilder() 482 .setMethodDescriptor(getFeedMethodDescriptor) 483 .setParamsExtractor( 484 request -> { 485 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 486 params.put("name", String.valueOf(request.getName())); 487 return params.build(); 488 }) 489 .build(); 490 GrpcCallSettings<ListFeedsRequest, ListFeedsResponse> listFeedsTransportSettings = 491 GrpcCallSettings.<ListFeedsRequest, ListFeedsResponse>newBuilder() 492 .setMethodDescriptor(listFeedsMethodDescriptor) 493 .setParamsExtractor( 494 request -> { 495 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 496 params.put("parent", String.valueOf(request.getParent())); 497 return params.build(); 498 }) 499 .build(); 500 GrpcCallSettings<UpdateFeedRequest, Feed> updateFeedTransportSettings = 501 GrpcCallSettings.<UpdateFeedRequest, Feed>newBuilder() 502 .setMethodDescriptor(updateFeedMethodDescriptor) 503 .setParamsExtractor( 504 request -> { 505 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 506 params.put("feed.name", String.valueOf(request.getFeed().getName())); 507 return params.build(); 508 }) 509 .build(); 510 GrpcCallSettings<DeleteFeedRequest, Empty> deleteFeedTransportSettings = 511 GrpcCallSettings.<DeleteFeedRequest, Empty>newBuilder() 512 .setMethodDescriptor(deleteFeedMethodDescriptor) 513 .setParamsExtractor( 514 request -> { 515 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 516 params.put("name", String.valueOf(request.getName())); 517 return params.build(); 518 }) 519 .build(); 520 GrpcCallSettings<SearchAllResourcesRequest, SearchAllResourcesResponse> 521 searchAllResourcesTransportSettings = 522 GrpcCallSettings.<SearchAllResourcesRequest, SearchAllResourcesResponse>newBuilder() 523 .setMethodDescriptor(searchAllResourcesMethodDescriptor) 524 .setParamsExtractor( 525 request -> { 526 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 527 params.put("scope", String.valueOf(request.getScope())); 528 return params.build(); 529 }) 530 .build(); 531 GrpcCallSettings<SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse> 532 searchAllIamPoliciesTransportSettings = 533 GrpcCallSettings.<SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse>newBuilder() 534 .setMethodDescriptor(searchAllIamPoliciesMethodDescriptor) 535 .setParamsExtractor( 536 request -> { 537 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 538 params.put("scope", String.valueOf(request.getScope())); 539 return params.build(); 540 }) 541 .build(); 542 GrpcCallSettings<AnalyzeIamPolicyRequest, AnalyzeIamPolicyResponse> 543 analyzeIamPolicyTransportSettings = 544 GrpcCallSettings.<AnalyzeIamPolicyRequest, AnalyzeIamPolicyResponse>newBuilder() 545 .setMethodDescriptor(analyzeIamPolicyMethodDescriptor) 546 .setParamsExtractor( 547 request -> { 548 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 549 params.put( 550 "analysis_query.scope", 551 String.valueOf(request.getAnalysisQuery().getScope())); 552 return params.build(); 553 }) 554 .build(); 555 GrpcCallSettings<AnalyzeIamPolicyLongrunningRequest, Operation> 556 analyzeIamPolicyLongrunningTransportSettings = 557 GrpcCallSettings.<AnalyzeIamPolicyLongrunningRequest, Operation>newBuilder() 558 .setMethodDescriptor(analyzeIamPolicyLongrunningMethodDescriptor) 559 .setParamsExtractor( 560 request -> { 561 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 562 params.put( 563 "analysis_query.scope", 564 String.valueOf(request.getAnalysisQuery().getScope())); 565 return params.build(); 566 }) 567 .build(); 568 GrpcCallSettings<AnalyzeMoveRequest, AnalyzeMoveResponse> analyzeMoveTransportSettings = 569 GrpcCallSettings.<AnalyzeMoveRequest, AnalyzeMoveResponse>newBuilder() 570 .setMethodDescriptor(analyzeMoveMethodDescriptor) 571 .setParamsExtractor( 572 request -> { 573 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 574 params.put("resource", String.valueOf(request.getResource())); 575 return params.build(); 576 }) 577 .build(); 578 GrpcCallSettings<QueryAssetsRequest, QueryAssetsResponse> queryAssetsTransportSettings = 579 GrpcCallSettings.<QueryAssetsRequest, QueryAssetsResponse>newBuilder() 580 .setMethodDescriptor(queryAssetsMethodDescriptor) 581 .setParamsExtractor( 582 request -> { 583 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 584 params.put("parent", String.valueOf(request.getParent())); 585 return params.build(); 586 }) 587 .build(); 588 GrpcCallSettings<CreateSavedQueryRequest, SavedQuery> createSavedQueryTransportSettings = 589 GrpcCallSettings.<CreateSavedQueryRequest, SavedQuery>newBuilder() 590 .setMethodDescriptor(createSavedQueryMethodDescriptor) 591 .setParamsExtractor( 592 request -> { 593 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 594 params.put("parent", String.valueOf(request.getParent())); 595 return params.build(); 596 }) 597 .build(); 598 GrpcCallSettings<GetSavedQueryRequest, SavedQuery> getSavedQueryTransportSettings = 599 GrpcCallSettings.<GetSavedQueryRequest, SavedQuery>newBuilder() 600 .setMethodDescriptor(getSavedQueryMethodDescriptor) 601 .setParamsExtractor( 602 request -> { 603 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 604 params.put("name", String.valueOf(request.getName())); 605 return params.build(); 606 }) 607 .build(); 608 GrpcCallSettings<ListSavedQueriesRequest, ListSavedQueriesResponse> 609 listSavedQueriesTransportSettings = 610 GrpcCallSettings.<ListSavedQueriesRequest, ListSavedQueriesResponse>newBuilder() 611 .setMethodDescriptor(listSavedQueriesMethodDescriptor) 612 .setParamsExtractor( 613 request -> { 614 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 615 params.put("parent", String.valueOf(request.getParent())); 616 return params.build(); 617 }) 618 .build(); 619 GrpcCallSettings<UpdateSavedQueryRequest, SavedQuery> updateSavedQueryTransportSettings = 620 GrpcCallSettings.<UpdateSavedQueryRequest, SavedQuery>newBuilder() 621 .setMethodDescriptor(updateSavedQueryMethodDescriptor) 622 .setParamsExtractor( 623 request -> { 624 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 625 params.put("saved_query.name", String.valueOf(request.getSavedQuery().getName())); 626 return params.build(); 627 }) 628 .build(); 629 GrpcCallSettings<DeleteSavedQueryRequest, Empty> deleteSavedQueryTransportSettings = 630 GrpcCallSettings.<DeleteSavedQueryRequest, Empty>newBuilder() 631 .setMethodDescriptor(deleteSavedQueryMethodDescriptor) 632 .setParamsExtractor( 633 request -> { 634 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 635 params.put("name", String.valueOf(request.getName())); 636 return params.build(); 637 }) 638 .build(); 639 GrpcCallSettings<BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> 640 batchGetEffectiveIamPoliciesTransportSettings = 641 GrpcCallSettings 642 .<BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> 643 newBuilder() 644 .setMethodDescriptor(batchGetEffectiveIamPoliciesMethodDescriptor) 645 .setParamsExtractor( 646 request -> { 647 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 648 params.put("scope", String.valueOf(request.getScope())); 649 return params.build(); 650 }) 651 .build(); 652 GrpcCallSettings<AnalyzeOrgPoliciesRequest, AnalyzeOrgPoliciesResponse> 653 analyzeOrgPoliciesTransportSettings = 654 GrpcCallSettings.<AnalyzeOrgPoliciesRequest, AnalyzeOrgPoliciesResponse>newBuilder() 655 .setMethodDescriptor(analyzeOrgPoliciesMethodDescriptor) 656 .setParamsExtractor( 657 request -> { 658 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 659 params.put("scope", String.valueOf(request.getScope())); 660 return params.build(); 661 }) 662 .build(); 663 GrpcCallSettings< 664 AnalyzeOrgPolicyGovernedContainersRequest, AnalyzeOrgPolicyGovernedContainersResponse> 665 analyzeOrgPolicyGovernedContainersTransportSettings = 666 GrpcCallSettings 667 .<AnalyzeOrgPolicyGovernedContainersRequest, 668 AnalyzeOrgPolicyGovernedContainersResponse> 669 newBuilder() 670 .setMethodDescriptor(analyzeOrgPolicyGovernedContainersMethodDescriptor) 671 .setParamsExtractor( 672 request -> { 673 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 674 params.put("scope", String.valueOf(request.getScope())); 675 return params.build(); 676 }) 677 .build(); 678 GrpcCallSettings<AnalyzeOrgPolicyGovernedAssetsRequest, AnalyzeOrgPolicyGovernedAssetsResponse> 679 analyzeOrgPolicyGovernedAssetsTransportSettings = 680 GrpcCallSettings 681 .<AnalyzeOrgPolicyGovernedAssetsRequest, AnalyzeOrgPolicyGovernedAssetsResponse> 682 newBuilder() 683 .setMethodDescriptor(analyzeOrgPolicyGovernedAssetsMethodDescriptor) 684 .setParamsExtractor( 685 request -> { 686 ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); 687 params.put("scope", String.valueOf(request.getScope())); 688 return params.build(); 689 }) 690 .build(); 691 692 this.exportAssetsCallable = 693 callableFactory.createUnaryCallable( 694 exportAssetsTransportSettings, settings.exportAssetsSettings(), clientContext); 695 this.exportAssetsOperationCallable = 696 callableFactory.createOperationCallable( 697 exportAssetsTransportSettings, 698 settings.exportAssetsOperationSettings(), 699 clientContext, 700 operationsStub); 701 this.listAssetsCallable = 702 callableFactory.createUnaryCallable( 703 listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); 704 this.listAssetsPagedCallable = 705 callableFactory.createPagedCallable( 706 listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); 707 this.batchGetAssetsHistoryCallable = 708 callableFactory.createUnaryCallable( 709 batchGetAssetsHistoryTransportSettings, 710 settings.batchGetAssetsHistorySettings(), 711 clientContext); 712 this.createFeedCallable = 713 callableFactory.createUnaryCallable( 714 createFeedTransportSettings, settings.createFeedSettings(), clientContext); 715 this.getFeedCallable = 716 callableFactory.createUnaryCallable( 717 getFeedTransportSettings, settings.getFeedSettings(), clientContext); 718 this.listFeedsCallable = 719 callableFactory.createUnaryCallable( 720 listFeedsTransportSettings, settings.listFeedsSettings(), clientContext); 721 this.updateFeedCallable = 722 callableFactory.createUnaryCallable( 723 updateFeedTransportSettings, settings.updateFeedSettings(), clientContext); 724 this.deleteFeedCallable = 725 callableFactory.createUnaryCallable( 726 deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext); 727 this.searchAllResourcesCallable = 728 callableFactory.createUnaryCallable( 729 searchAllResourcesTransportSettings, 730 settings.searchAllResourcesSettings(), 731 clientContext); 732 this.searchAllResourcesPagedCallable = 733 callableFactory.createPagedCallable( 734 searchAllResourcesTransportSettings, 735 settings.searchAllResourcesSettings(), 736 clientContext); 737 this.searchAllIamPoliciesCallable = 738 callableFactory.createUnaryCallable( 739 searchAllIamPoliciesTransportSettings, 740 settings.searchAllIamPoliciesSettings(), 741 clientContext); 742 this.searchAllIamPoliciesPagedCallable = 743 callableFactory.createPagedCallable( 744 searchAllIamPoliciesTransportSettings, 745 settings.searchAllIamPoliciesSettings(), 746 clientContext); 747 this.analyzeIamPolicyCallable = 748 callableFactory.createUnaryCallable( 749 analyzeIamPolicyTransportSettings, settings.analyzeIamPolicySettings(), clientContext); 750 this.analyzeIamPolicyLongrunningCallable = 751 callableFactory.createUnaryCallable( 752 analyzeIamPolicyLongrunningTransportSettings, 753 settings.analyzeIamPolicyLongrunningSettings(), 754 clientContext); 755 this.analyzeIamPolicyLongrunningOperationCallable = 756 callableFactory.createOperationCallable( 757 analyzeIamPolicyLongrunningTransportSettings, 758 settings.analyzeIamPolicyLongrunningOperationSettings(), 759 clientContext, 760 operationsStub); 761 this.analyzeMoveCallable = 762 callableFactory.createUnaryCallable( 763 analyzeMoveTransportSettings, settings.analyzeMoveSettings(), clientContext); 764 this.queryAssetsCallable = 765 callableFactory.createUnaryCallable( 766 queryAssetsTransportSettings, settings.queryAssetsSettings(), clientContext); 767 this.createSavedQueryCallable = 768 callableFactory.createUnaryCallable( 769 createSavedQueryTransportSettings, settings.createSavedQuerySettings(), clientContext); 770 this.getSavedQueryCallable = 771 callableFactory.createUnaryCallable( 772 getSavedQueryTransportSettings, settings.getSavedQuerySettings(), clientContext); 773 this.listSavedQueriesCallable = 774 callableFactory.createUnaryCallable( 775 listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); 776 this.listSavedQueriesPagedCallable = 777 callableFactory.createPagedCallable( 778 listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); 779 this.updateSavedQueryCallable = 780 callableFactory.createUnaryCallable( 781 updateSavedQueryTransportSettings, settings.updateSavedQuerySettings(), clientContext); 782 this.deleteSavedQueryCallable = 783 callableFactory.createUnaryCallable( 784 deleteSavedQueryTransportSettings, settings.deleteSavedQuerySettings(), clientContext); 785 this.batchGetEffectiveIamPoliciesCallable = 786 callableFactory.createUnaryCallable( 787 batchGetEffectiveIamPoliciesTransportSettings, 788 settings.batchGetEffectiveIamPoliciesSettings(), 789 clientContext); 790 this.analyzeOrgPoliciesCallable = 791 callableFactory.createUnaryCallable( 792 analyzeOrgPoliciesTransportSettings, 793 settings.analyzeOrgPoliciesSettings(), 794 clientContext); 795 this.analyzeOrgPoliciesPagedCallable = 796 callableFactory.createPagedCallable( 797 analyzeOrgPoliciesTransportSettings, 798 settings.analyzeOrgPoliciesSettings(), 799 clientContext); 800 this.analyzeOrgPolicyGovernedContainersCallable = 801 callableFactory.createUnaryCallable( 802 analyzeOrgPolicyGovernedContainersTransportSettings, 803 settings.analyzeOrgPolicyGovernedContainersSettings(), 804 clientContext); 805 this.analyzeOrgPolicyGovernedContainersPagedCallable = 806 callableFactory.createPagedCallable( 807 analyzeOrgPolicyGovernedContainersTransportSettings, 808 settings.analyzeOrgPolicyGovernedContainersSettings(), 809 clientContext); 810 this.analyzeOrgPolicyGovernedAssetsCallable = 811 callableFactory.createUnaryCallable( 812 analyzeOrgPolicyGovernedAssetsTransportSettings, 813 settings.analyzeOrgPolicyGovernedAssetsSettings(), 814 clientContext); 815 this.analyzeOrgPolicyGovernedAssetsPagedCallable = 816 callableFactory.createPagedCallable( 817 analyzeOrgPolicyGovernedAssetsTransportSettings, 818 settings.analyzeOrgPolicyGovernedAssetsSettings(), 819 clientContext); 820 821 this.backgroundResources = 822 new BackgroundResourceAggregation(clientContext.getBackgroundResources()); 823 } 824 getOperationsStub()825 public GrpcOperationsStub getOperationsStub() { 826 return operationsStub; 827 } 828 829 @Override exportAssetsCallable()830 public UnaryCallable<ExportAssetsRequest, Operation> exportAssetsCallable() { 831 return exportAssetsCallable; 832 } 833 834 @Override 835 public OperationCallable<ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> exportAssetsOperationCallable()836 exportAssetsOperationCallable() { 837 return exportAssetsOperationCallable; 838 } 839 840 @Override listAssetsCallable()841 public UnaryCallable<ListAssetsRequest, ListAssetsResponse> listAssetsCallable() { 842 return listAssetsCallable; 843 } 844 845 @Override listAssetsPagedCallable()846 public UnaryCallable<ListAssetsRequest, ListAssetsPagedResponse> listAssetsPagedCallable() { 847 return listAssetsPagedCallable; 848 } 849 850 @Override 851 public UnaryCallable<BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> batchGetAssetsHistoryCallable()852 batchGetAssetsHistoryCallable() { 853 return batchGetAssetsHistoryCallable; 854 } 855 856 @Override createFeedCallable()857 public UnaryCallable<CreateFeedRequest, Feed> createFeedCallable() { 858 return createFeedCallable; 859 } 860 861 @Override getFeedCallable()862 public UnaryCallable<GetFeedRequest, Feed> getFeedCallable() { 863 return getFeedCallable; 864 } 865 866 @Override listFeedsCallable()867 public UnaryCallable<ListFeedsRequest, ListFeedsResponse> listFeedsCallable() { 868 return listFeedsCallable; 869 } 870 871 @Override updateFeedCallable()872 public UnaryCallable<UpdateFeedRequest, Feed> updateFeedCallable() { 873 return updateFeedCallable; 874 } 875 876 @Override deleteFeedCallable()877 public UnaryCallable<DeleteFeedRequest, Empty> deleteFeedCallable() { 878 return deleteFeedCallable; 879 } 880 881 @Override 882 public UnaryCallable<SearchAllResourcesRequest, SearchAllResourcesResponse> searchAllResourcesCallable()883 searchAllResourcesCallable() { 884 return searchAllResourcesCallable; 885 } 886 887 @Override 888 public UnaryCallable<SearchAllResourcesRequest, SearchAllResourcesPagedResponse> searchAllResourcesPagedCallable()889 searchAllResourcesPagedCallable() { 890 return searchAllResourcesPagedCallable; 891 } 892 893 @Override 894 public UnaryCallable<SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse> searchAllIamPoliciesCallable()895 searchAllIamPoliciesCallable() { 896 return searchAllIamPoliciesCallable; 897 } 898 899 @Override 900 public UnaryCallable<SearchAllIamPoliciesRequest, SearchAllIamPoliciesPagedResponse> searchAllIamPoliciesPagedCallable()901 searchAllIamPoliciesPagedCallable() { 902 return searchAllIamPoliciesPagedCallable; 903 } 904 905 @Override 906 public UnaryCallable<AnalyzeIamPolicyRequest, AnalyzeIamPolicyResponse> analyzeIamPolicyCallable()907 analyzeIamPolicyCallable() { 908 return analyzeIamPolicyCallable; 909 } 910 911 @Override 912 public UnaryCallable<AnalyzeIamPolicyLongrunningRequest, Operation> analyzeIamPolicyLongrunningCallable()913 analyzeIamPolicyLongrunningCallable() { 914 return analyzeIamPolicyLongrunningCallable; 915 } 916 917 @Override 918 public OperationCallable< 919 AnalyzeIamPolicyLongrunningRequest, 920 AnalyzeIamPolicyLongrunningResponse, 921 AnalyzeIamPolicyLongrunningMetadata> analyzeIamPolicyLongrunningOperationCallable()922 analyzeIamPolicyLongrunningOperationCallable() { 923 return analyzeIamPolicyLongrunningOperationCallable; 924 } 925 926 @Override analyzeMoveCallable()927 public UnaryCallable<AnalyzeMoveRequest, AnalyzeMoveResponse> analyzeMoveCallable() { 928 return analyzeMoveCallable; 929 } 930 931 @Override queryAssetsCallable()932 public UnaryCallable<QueryAssetsRequest, QueryAssetsResponse> queryAssetsCallable() { 933 return queryAssetsCallable; 934 } 935 936 @Override createSavedQueryCallable()937 public UnaryCallable<CreateSavedQueryRequest, SavedQuery> createSavedQueryCallable() { 938 return createSavedQueryCallable; 939 } 940 941 @Override getSavedQueryCallable()942 public UnaryCallable<GetSavedQueryRequest, SavedQuery> getSavedQueryCallable() { 943 return getSavedQueryCallable; 944 } 945 946 @Override 947 public UnaryCallable<ListSavedQueriesRequest, ListSavedQueriesResponse> listSavedQueriesCallable()948 listSavedQueriesCallable() { 949 return listSavedQueriesCallable; 950 } 951 952 @Override 953 public UnaryCallable<ListSavedQueriesRequest, ListSavedQueriesPagedResponse> listSavedQueriesPagedCallable()954 listSavedQueriesPagedCallable() { 955 return listSavedQueriesPagedCallable; 956 } 957 958 @Override updateSavedQueryCallable()959 public UnaryCallable<UpdateSavedQueryRequest, SavedQuery> updateSavedQueryCallable() { 960 return updateSavedQueryCallable; 961 } 962 963 @Override deleteSavedQueryCallable()964 public UnaryCallable<DeleteSavedQueryRequest, Empty> deleteSavedQueryCallable() { 965 return deleteSavedQueryCallable; 966 } 967 968 @Override 969 public UnaryCallable<BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> batchGetEffectiveIamPoliciesCallable()970 batchGetEffectiveIamPoliciesCallable() { 971 return batchGetEffectiveIamPoliciesCallable; 972 } 973 974 @Override 975 public UnaryCallable<AnalyzeOrgPoliciesRequest, AnalyzeOrgPoliciesResponse> analyzeOrgPoliciesCallable()976 analyzeOrgPoliciesCallable() { 977 return analyzeOrgPoliciesCallable; 978 } 979 980 @Override 981 public UnaryCallable<AnalyzeOrgPoliciesRequest, AnalyzeOrgPoliciesPagedResponse> analyzeOrgPoliciesPagedCallable()982 analyzeOrgPoliciesPagedCallable() { 983 return analyzeOrgPoliciesPagedCallable; 984 } 985 986 @Override 987 public UnaryCallable< 988 AnalyzeOrgPolicyGovernedContainersRequest, AnalyzeOrgPolicyGovernedContainersResponse> analyzeOrgPolicyGovernedContainersCallable()989 analyzeOrgPolicyGovernedContainersCallable() { 990 return analyzeOrgPolicyGovernedContainersCallable; 991 } 992 993 @Override 994 public UnaryCallable< 995 AnalyzeOrgPolicyGovernedContainersRequest, 996 AnalyzeOrgPolicyGovernedContainersPagedResponse> analyzeOrgPolicyGovernedContainersPagedCallable()997 analyzeOrgPolicyGovernedContainersPagedCallable() { 998 return analyzeOrgPolicyGovernedContainersPagedCallable; 999 } 1000 1001 @Override 1002 public UnaryCallable< 1003 AnalyzeOrgPolicyGovernedAssetsRequest, AnalyzeOrgPolicyGovernedAssetsResponse> analyzeOrgPolicyGovernedAssetsCallable()1004 analyzeOrgPolicyGovernedAssetsCallable() { 1005 return analyzeOrgPolicyGovernedAssetsCallable; 1006 } 1007 1008 @Override 1009 public UnaryCallable< 1010 AnalyzeOrgPolicyGovernedAssetsRequest, AnalyzeOrgPolicyGovernedAssetsPagedResponse> analyzeOrgPolicyGovernedAssetsPagedCallable()1011 analyzeOrgPolicyGovernedAssetsPagedCallable() { 1012 return analyzeOrgPolicyGovernedAssetsPagedCallable; 1013 } 1014 1015 @Override close()1016 public final void close() { 1017 try { 1018 backgroundResources.close(); 1019 } catch (RuntimeException e) { 1020 throw e; 1021 } catch (Exception e) { 1022 throw new IllegalStateException("Failed to close resource", e); 1023 } 1024 } 1025 1026 @Override shutdown()1027 public void shutdown() { 1028 backgroundResources.shutdown(); 1029 } 1030 1031 @Override isShutdown()1032 public boolean isShutdown() { 1033 return backgroundResources.isShutdown(); 1034 } 1035 1036 @Override isTerminated()1037 public boolean isTerminated() { 1038 return backgroundResources.isTerminated(); 1039 } 1040 1041 @Override shutdownNow()1042 public void shutdownNow() { 1043 backgroundResources.shutdownNow(); 1044 } 1045 1046 @Override awaitTermination(long duration, TimeUnit unit)1047 public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { 1048 return backgroundResources.awaitTermination(duration, unit); 1049 } 1050 } 1051