This class is for advanced usage and reflects the underlying API directly.
+ *
+ * @deprecated The v1beta1 endpoint was turned down 2020-09-28.
*/
+@Deprecated
@Generated("by gapic-generator")
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class AssetServiceStub implements BackgroundResource {
diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java
index e3ab77b21..961b01fab 100644
--- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java
+++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java
@@ -78,7 +78,10 @@
* AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
*
*
+ *
+ * @deprecated The v1beta1 endpoint was turned down 2020-09-28.
*/
+@Deprecated
@Generated("by gapic-generator")
@BetaApi
public class AssetServiceStubSettings extends StubSettings This class is for advanced usage.
+ *
+ * @deprecated The v1beta1 endpoint was turned down 2020-09-28.
*/
+@Deprecated
@Generated("by gapic-generator")
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory {
diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceStub.java
index 4d8c66107..3c27cba6d 100644
--- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceStub.java
+++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceStub.java
@@ -43,7 +43,10 @@
* gRPC stub implementation for Cloud Asset API.
*
* This class is for advanced usage and reflects the underlying API directly.
+ *
+ * @deprecated The v1beta1 endpoint was turned down 2020-09-28.
*/
+@Deprecated
@Generated("by gapic-generator")
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public class GrpcAssetServiceStub extends AssetServiceStub {
diff --git a/grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java b/grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java
index 9bb587d31..4005e04cc 100644
--- a/grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java
+++ b/grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java
@@ -28,7 +28,10 @@
*
* Asset service definition.
*
+ *
+ * @deprecated The v1beta1 endpoint was turned down 2020-09-28.
*/
+@Deprecated
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/asset/v1beta1/asset_service.proto")
diff --git a/synth.metadata b/synth.metadata
index 2f4f5bd3e..cc124517f 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -73,15 +73,6 @@
"generator": "bazel"
}
},
- {
- "client": {
- "source": "googleapis",
- "apiName": "asset",
- "apiVersion": "v1beta1",
- "language": "java",
- "generator": "bazel"
- }
- },
{
"client": {
"source": "googleapis",
@@ -193,13 +184,6 @@
"google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java",
"google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceCallableFactory.java",
"google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java",
- "google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceClient.java",
- "google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceSettings.java",
- "google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/package-info.java",
- "google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStub.java",
- "google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java",
- "google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceCallableFactory.java",
- "google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceStub.java",
"google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java",
"google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java",
"google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java",
@@ -231,9 +215,6 @@
"google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java",
"google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetService.java",
"google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java",
- "google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/AssetServiceClientTest.java",
- "google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetService.java",
- "google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetServiceImpl.java",
"google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java",
"google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java",
"google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java",
@@ -247,7 +228,6 @@
"google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetService.java",
"google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetServiceImpl.java",
"grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java",
- "grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java",
"grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java",
"grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java",
"grpc-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceGrpc.java",
@@ -334,31 +314,6 @@
"proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequestOrBuilder.java",
"proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto",
"proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Asset.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetProto.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceProto.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequest.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequestOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryResponse.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryResponseOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ContentType.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequest.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequestOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponse.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponseOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestination.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestinationOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfig.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfigOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Resource.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ResourceOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAsset.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAssetOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindow.java",
- "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindowOrBuilder.java",
- "proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/asset_service.proto",
- "proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/assets.proto",
"proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java",
"proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java",
"proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java",
diff --git a/synth.py b/synth.py
index ed6afd39b..165dc7ad5 100644
--- a/synth.py
+++ b/synth.py
@@ -19,7 +19,7 @@
AUTOSYNTH_MULTIPLE_COMMITS = True
service = 'asset'
-versions = ['v1', 'v1beta1', 'v1p2beta1', 'v1p1beta1', 'v1p4beta1', 'v1p5beta1']
+versions = ['v1', 'v1p2beta1', 'v1p1beta1', 'v1p4beta1', 'v1p5beta1']
for version in versions:
library = java.bazel_library(
From 82ee8ae814093e1908d5bdc4880b7dc6ef5bf149 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * - *
- *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * Feed response = assetServiceClient.createFeed(parent);
- * }
- *
- *
- *
- * Note: close() needs to be called on the assetServiceClient object to clean up resources such + *
Note: close() needs to be called on the AssetServiceClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * *
The surface of this class includes several types of Java methods for each of the API's @@ -82,30 +74,26 @@ * *
To customize credentials: * - *
- *
+ * {@code
* AssetServiceSettings assetServiceSettings =
* AssetServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
- * AssetServiceClient assetServiceClient =
- * AssetServiceClient.create(assetServiceSettings);
- *
- *
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
*
- * To customize the endpoint:
+ * To customize the endpoint: * - *
- *
+ * {@code
* AssetServiceSettings assetServiceSettings =
* AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AssetServiceClient assetServiceClient =
- * AssetServiceClient.create(assetServiceSettings);
- *
- *
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class AssetServiceClient implements BackgroundResource { private final AssetServiceSettings settings; private final AssetServiceStub stub; @@ -126,7 +114,7 @@ public static final AssetServiceClient create(AssetServiceSettings settings) thr /** * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer to use AssetServiceSettings}. + * for advanced usage - prefer using create(AssetServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final AssetServiceClient create(AssetServiceStub stub) { @@ -164,13 +152,11 @@ public AssetServiceStub getStub() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public final OperationsClient getOperationsClient() { return operationsClient; } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Exports assets with time and resource types to a given Cloud Storage location/BigQuery table. * For Cloud Storage location destinations, the output format is newline-delimited JSON. Each line @@ -181,31 +167,15 @@ public final OperationsClient getOperationsClient() { * exponential retry to poll the export operation result. For regular-size resource parent, the * export operation usually finishes within 5 minutes. * - *
Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * OutputConfig outputConfig = OutputConfig.newBuilder().build();
- * ExportAssetsRequest request = ExportAssetsRequest.newBuilder()
- * .setParent(parent.toString())
- * .setOutputConfig(outputConfig)
- * .build();
- * ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * OutputConfig outputConfig = OutputConfig.newBuilder().build();
- * ExportAssetsRequest request = ExportAssetsRequest.newBuilder()
- * .setParent(parent.toString())
- * .setOutputConfig(outputConfig)
- * .build();
- * OperationFuture<ExportAssetsResponse, ExportAssetsRequest> future = assetServiceClient.exportAssetsOperationCallable().futureCall(request);
- * // Do something
- * ExportAssetsResponse response = future.get();
- * }
- *
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * OutputConfig outputConfig = OutputConfig.newBuilder().build();
- * ExportAssetsRequest request = ExportAssetsRequest.newBuilder()
- * .setParent(parent.toString())
- * .setOutputConfig(outputConfig)
- * .build();
- * ApiFuture<Operation> future = assetServiceClient.exportAssetsCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * BatchGetAssetsHistoryRequest request = BatchGetAssetsHistoryRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -297,7 +226,7 @@ public final BatchGetAssetsHistoryResponse batchGetAssetsHistory(
return batchGetAssetsHistoryCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Batch gets the update history of assets that overlap a time window. For IAM_POLICY content,
* this API outputs history when the asset and its attached IAM POLICY both exist. This can create
@@ -306,37 +235,16 @@ public final BatchGetAssetsHistoryResponse batchGetAssetsHistory(
* error.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * BatchGetAssetsHistoryRequest request = BatchGetAssetsHistoryRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<BatchGetAssetsHistoryResponse> future = assetServiceClient.batchGetAssetsHistoryCallable().futureCall(request);
- * // Do something
- * BatchGetAssetsHistoryResponse response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * Feed response = assetServiceClient.createFeed(parent);
- * }
- *
- *
* @param parent Required. The name of the project/folder/organization where this feed should be
* created in. It can only be an organization number (such as "organizations/123"), a folder
* number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a
@@ -348,26 +256,10 @@ public final Feed createFeed(String parent) {
return createFeed(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a feed in a parent project/folder/organization to listen to its asset updates.
*
- * Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * String feedId = "";
- * Feed feed = Feed.newBuilder().build();
- * CreateFeedRequest request = CreateFeedRequest.newBuilder()
- * .setParent(parent)
- * .setFeedId(feedId)
- * .setFeed(feed)
- * .build();
- * Feed response = assetServiceClient.createFeed(request);
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -375,45 +267,20 @@ public final Feed createFeed(CreateFeedRequest request) {
return createFeedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a feed in a parent project/folder/organization to listen to its asset updates.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * String feedId = "";
- * Feed feed = Feed.newBuilder().build();
- * CreateFeedRequest request = CreateFeedRequest.newBuilder()
- * .setParent(parent)
- * .setFeedId(feedId)
- * .setFeed(feed)
- * .build();
- * ApiFuture<Feed> future = assetServiceClient.createFeedCallable().futureCall(request);
- * // Do something
- * Feed response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- * Feed response = assetServiceClient.getFeed(name);
- * }
- *
- *
* @param name Required. The name of the Feed and it must be in the format of:
* projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id
* organizations/organization_number/feeds/feed_id
@@ -425,19 +292,10 @@ public final Feed getFeed(FeedName name) {
return getFeed(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets details about an asset feed.
*
- * Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- * Feed response = assetServiceClient.getFeed(name.toString());
- * }
- *
- *
* @param name Required. The name of the Feed and it must be in the format of:
* projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id
* organizations/organization_number/feeds/feed_id
@@ -448,22 +306,10 @@ public final Feed getFeed(String name) {
return getFeed(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets details about an asset feed.
*
- * Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- * GetFeedRequest request = GetFeedRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * Feed response = assetServiceClient.getFeed(request);
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -471,41 +317,20 @@ public final Feed getFeed(GetFeedRequest request) {
return getFeedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets details about an asset feed.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- * GetFeedRequest request = GetFeedRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Feed> future = assetServiceClient.getFeedCallable().futureCall(request);
- * // Do something
- * Feed response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * ListFeedsResponse response = assetServiceClient.listFeeds(parent);
- * }
- *
- *
* @param parent Required. The parent project/folder/organization whose feeds are to be listed. It
* can only be using project/folder/organization number (such as "folders/12345")", or a
* project ID (such as "projects/my-project-id").
@@ -516,22 +341,10 @@ public final ListFeedsResponse listFeeds(String parent) {
return listFeeds(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all asset feeds in a parent project/folder/organization.
*
- * Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * ListFeedsRequest request = ListFeedsRequest.newBuilder()
- * .setParent(parent)
- * .build();
- * ListFeedsResponse response = assetServiceClient.listFeeds(request);
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -539,41 +352,20 @@ public final ListFeedsResponse listFeeds(ListFeedsRequest request) {
return listFeedsCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all asset feeds in a parent project/folder/organization.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * ListFeedsRequest request = ListFeedsRequest.newBuilder()
- * .setParent(parent)
- * .build();
- * ApiFuture<ListFeedsResponse> future = assetServiceClient.listFeedsCallable().futureCall(request);
- * // Do something
- * ListFeedsResponse response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * Feed feed = Feed.newBuilder().build();
- * Feed response = assetServiceClient.updateFeed(feed);
- * }
- *
- *
* @param feed Required. The new values of feed details. It must match an existing feed and the
* field `name` must be in the format of: projects/project_number/feeds/feed_id or
* folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id.
@@ -584,24 +376,10 @@ public final Feed updateFeed(Feed feed) {
return updateFeed(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an asset feed configuration.
*
- * Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * Feed feed = Feed.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateFeedRequest request = UpdateFeedRequest.newBuilder()
- * .setFeed(feed)
- * .setUpdateMask(updateMask)
- * .build();
- * Feed response = assetServiceClient.updateFeed(request);
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -609,43 +387,20 @@ public final Feed updateFeed(UpdateFeedRequest request) {
return updateFeedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an asset feed configuration.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * Feed feed = Feed.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateFeedRequest request = UpdateFeedRequest.newBuilder()
- * .setFeed(feed)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Feed> future = assetServiceClient.updateFeedCallable().futureCall(request);
- * // Do something
- * Feed response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- * assetServiceClient.deleteFeed(name);
- * }
- *
- *
* @param name Required. The name of the feed and it must be in the format of:
* projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id
* organizations/organization_number/feeds/feed_id
@@ -657,19 +412,10 @@ public final void deleteFeed(FeedName name) {
deleteFeed(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an asset feed.
*
- * Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- * assetServiceClient.deleteFeed(name.toString());
- * }
- *
- *
* @param name Required. The name of the feed and it must be in the format of:
* projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id
* organizations/organization_number/feeds/feed_id
@@ -680,22 +426,10 @@ public final void deleteFeed(String name) {
deleteFeed(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an asset feed.
*
- * Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- * DeleteFeedRequest request = DeleteFeedRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * assetServiceClient.deleteFeed(request);
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -703,55 +437,34 @@ public final void deleteFeed(DeleteFeedRequest request) {
deleteFeedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an asset feed.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- * DeleteFeedRequest request = DeleteFeedRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = assetServiceClient.deleteFeedCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * String query = "";
- * List<String> assetTypes = new ArrayList<>();
- * for (ResourceSearchResult element : assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
* @param scope Required. A scope can be a project, a folder, or an organization. The search is
* limited to the resources within the `scope`. The caller must be granted the
* [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
* permission on the desired scope.
* The allowed values are: - *
* projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} - * (e.g., "projects/12345678") * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") * - * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + *
Examples: - *
* `name:Important` to find Cloud resources whose name contains "Important" as a - * word. * `displayName:Impor*` to find Cloud resources whose display name contains - * "Impor" as a prefix. * `description:*por*` to find Cloud resources whose - * description contains "por" as a substring. * `location:us-west*` to find Cloud - * resources whose location is prefixed with "us-west". * `labels:prod` to find Cloud - * resources whose labels contain "prod" as a key or value. * `labels.env:prod` to find - * Cloud resources that have a label "env" and its value is "prod". * `labels.env:*` - * to find Cloud resources that have a label "env". * `Important` to find Cloud resources - * that contain "Important" as a word in any of the searchable fields. * `Impor*` to - * find Cloud resources that contain "Impor" as a prefix in any of the searchable fields. - * * `*por*` to find Cloud resources that contain "por" as a substring in any of - * the searchable fields. * `Important location:(us-west1 OR global)` to find Cloud - * resources that contain "Important" as a word in any of the searchable fields and are also - * located in the "us-west1" region or the "global" location. + *
Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllResourcesRequest request = SearchAllResourcesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * for (ResourceSearchResult element : assetServiceClient.searchAllResources(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -819,111 +527,74 @@ public final SearchAllResourcesPagedResponse searchAllResources(
return searchAllResourcesPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Searches all Cloud resources within the specified scope, such as a project, folder, or
* organization. The caller must be granted the `cloudasset.assets.searchAllResources` permission
* on the desired scope, otherwise the request will be rejected.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllResourcesRequest request = SearchAllResourcesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * ApiFuture<SearchAllResourcesPagedResponse> future = assetServiceClient.searchAllResourcesPagedCallable().futureCall(request);
- * // Do something
- * for (ResourceSearchResult element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllResourcesRequest request = SearchAllResourcesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * while (true) {
- * SearchAllResourcesResponse response = assetServiceClient.searchAllResourcesCallable().call(request);
- * for (ResourceSearchResult element : response.getResultsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * String query = "";
- * for (IamPolicySearchResult element : assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
* @param scope Required. A scope can be a project, a folder, or an organization. The search is
* limited to the IAM policies within the `scope`. The caller must be granted the
* [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
* permission on the desired scope.
* The allowed values are: - *
* projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} - * (e.g., "projects/12345678") * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") * - * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + *
Examples: - *
* `policy:amy{@literal @}gmail.com` to find IAM policy bindings that specify user - * "amy{@literal @}gmail.com". * `policy:roles/compute.admin` to find IAM policy bindings - * that specify the Compute Admin role. * `policy.role.permissions:storage.buckets.update` - * to find IAM policy bindings that specify a role containing "storage.buckets.update" - * permission. Note that if callers don't have `iam.roles.get` access to a role's included - * permissions, policy bindings that specify this role will be dropped from the search - * results. * `resource:organizations/123456` to find IAM policy bindings that are set on - * "organizations/123456". * `Important` to find IAM policy bindings that contain - * "Important" as a word in any of the searchable fields (except for the included - * permissions). * `*por*` to find IAM policy bindings that contain "por" as a - * substring in any of the searchable fields (except for the included permissions). * - * `resource:(instance1 OR instance2) policy:amy` to find IAM policy bindings that are set on - * resources "instance1" or "instance2" and also specify user "amy". + *
Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * for (IamPolicySearchResult element : assetServiceClient.searchAllIamPolicies(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -960,83 +617,36 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(
return searchAllIamPoliciesPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Searches all IAM policies within the specified scope, such as a project, folder, or
* organization. The caller must be granted the `cloudasset.assets.searchAllIamPolicies`
* permission on the desired scope, otherwise the request will be rejected.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * ApiFuture<SearchAllIamPoliciesPagedResponse> future = assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request);
- * // Do something
- * for (IamPolicySearchResult element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * while (true) {
- * SearchAllIamPoliciesResponse response = assetServiceClient.searchAllIamPoliciesCallable().call(request);
- * for (IamPolicySearchResult element : response.getResultsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
- * AnalyzeIamPolicyRequest request = AnalyzeIamPolicyRequest.newBuilder()
- * .setAnalysisQuery(analysisQuery)
- * .build();
- * AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request);
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -1044,30 +654,18 @@ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest r
return analyzeIamPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Analyzes IAM policies to answer which identities have what accesses on which resources.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
- * AnalyzeIamPolicyRequest request = AnalyzeIamPolicyRequest.newBuilder()
- * .setAnalysisQuery(analysisQuery)
- * .build();
- * ApiFuture<AnalyzeIamPolicyResponse> future = assetServiceClient.analyzeIamPolicyCallable().futureCall(request);
- * // Do something
- * AnalyzeIamPolicyResponse response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
- * IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
- * AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder()
- * .setAnalysisQuery(analysisQuery)
- * .setOutputConfig(outputConfig)
- * .build();
- * AnalyzeIamPolicyLongrunningResponse response = assetServiceClient.analyzeIamPolicyLongrunningAsync(request).get();
- * }
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<
AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest>
analyzeIamPolicyLongrunningAsync(AnalyzeIamPolicyLongrunningRequest request) {
return analyzeIamPolicyLongrunningOperationCallable().futureCall(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Analyzes IAM policies asynchronously to answer which identities have what accesses on which
* resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination.
@@ -1115,22 +697,7 @@ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest r
* to map responses to requests.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
- * IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
- * AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder()
- * .setAnalysisQuery(analysisQuery)
- * .setOutputConfig(outputConfig)
- * .build();
- * OperationFuture<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> future = assetServiceClient.analyzeIamPolicyLongrunningOperationCallable().futureCall(request);
- * // Do something
- * AnalyzeIamPolicyLongrunningResponse response = future.get();
- * }
- *
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable<
AnalyzeIamPolicyLongrunningRequest,
AnalyzeIamPolicyLongrunningResponse,
@@ -1139,7 +706,7 @@ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest r
return stub.analyzeIamPolicyLongrunningOperationCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Analyzes IAM policies asynchronously to answer which identities have what accesses on which
* resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination.
@@ -1151,20 +718,6 @@ public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest r
* to map responses to requests.
*
* Sample code: - * - *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
- * IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
- * AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder()
- * .setAnalysisQuery(analysisQuery)
- * .setOutputConfig(outputConfig)
- * .build();
- * ApiFuture<Operation> future = assetServiceClient.analyzeIamPolicyLongrunningCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
*/
public final UnaryCallableThe builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *
For example, to set the total timeout of createFeed to 30 seconds: + *
For example, to set the total timeout of batchGetAssetsHistory to 30 seconds: * - *
- *
- * AssetServiceSettings.Builder assetServiceSettingsBuilder =
- * AssetServiceSettings.newBuilder();
+ * {@code
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
* assetServiceSettingsBuilder
- * .createFeedSettings()
+ * .batchGetAssetsHistorySettings()
* .setRetrySettings(
- * assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
+ * assetServiceSettingsBuilder
+ * .batchGetAssetsHistorySettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- *
- *
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class AssetServiceSettings extends ClientSettingsThe interfaces provided are listed below, along with usage samples. - * - *
================== AssetServiceClient ================== + *
======================= AssetServiceClient ======================= * *
Service Description: Asset service definition. * *
Sample for AssetServiceClient: - * - *
- *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String parent = "";
- * Feed response = assetServiceClient.createFeed(parent);
- * }
- *
- *
*/
-@Generated("by gapic-generator")
+@Generated("by gapic-generator-java")
package com.google.cloud.asset.v1;
import javax.annotation.Generated;
diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java
index 9c0d75e1b..28ba90e0e 100644
--- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java
+++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * https://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.google.cloud.asset.v1.stub;
import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse;
import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse;
-import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
@@ -46,22 +46,19 @@
import com.google.protobuf.Empty;
import javax.annotation.Generated;
-// AUTO-GENERATED DOCUMENTATION AND CLASS
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * Base stub class for Cloud Asset API.
+ * Base stub class for the AssetService service API.
*
* This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class AssetServiceStub implements BackgroundResource {
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- * For example, to set the total timeout of createFeed to 30 seconds:
+ * For example, to set the total timeout of batchGetAssetsHistory to 30 seconds:
*
- * This class is for advanced usage.
*/
@Generated("by gapic-generator")
-@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory {
+
@Override
public This class is for advanced usage and reflects the underlying API directly.
*/
-@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+@Generated("by gapic-generator-java")
public class GrpcAssetServiceStub extends AssetServiceStub {
-
private static final MethodDescriptor This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
- * Note: close() needs to be called on the assetServiceClient object to clean up resources such
+ * Note: close() needs to be called on the AssetServiceClient object to clean up resources such
* as threads. In the example above, try-with-resources is used, which automatically calls close().
*
* The surface of this class includes several types of Java methods for each of the API's
@@ -81,30 +69,26 @@
*
* To customize credentials:
*
- * To customize the endpoint:
*
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
-@Generated("by gapic-generator")
@BetaApi
+@Generated("by gapic-generator")
public class AssetServiceClient implements BackgroundResource {
private final AssetServiceSettings settings;
private final AssetServiceStub stub;
@@ -124,7 +108,7 @@ public static final AssetServiceClient create(AssetServiceSettings settings) thr
/**
* Constructs an instance of AssetServiceClient, using the given stub for making calls. This is
- * for advanced usage - prefer to use AssetServiceSettings}.
+ * for advanced usage - prefer using create(AssetServiceSettings).
*/
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final AssetServiceClient create(AssetServiceStub stub) {
@@ -156,7 +140,7 @@ public AssetServiceStub getStub() {
return stub;
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Searches all the resources under a given accessible CRM scope (project/folder/organization).
* This RPC gives callers especially admins the ability to search all the resources under a scope,
@@ -164,23 +148,15 @@ public AssetServiceStub getStub() {
* cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be
* rejected.
*
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
+ * @param scope Required. The relative name of an asset. The search is limited to the resources
+ * within the `scope`. The allowed value must be:
+ * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * For example, to set the total timeout of searchAllResources to 30 seconds:
*
- * The interfaces provided are listed below, along with usage samples.
- *
- * ================== AssetServiceClient ==================
+ * ======================= AssetServiceClient =======================
*
* Service Description: Asset service definition.
*
* Sample for AssetServiceClient:
- *
- * This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class AssetServiceStub implements BackgroundResource {
public UnaryCallable For example, to set the total timeout of searchAllResources to 30 seconds:
*
- * This class is for advanced usage.
*/
@Generated("by gapic-generator")
-@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory {
+
@Override
public
- *
+ * }
*/
-@Generated("by gapic-generator")
@BetaApi
+@Generated("by gapic-generator-java")
public class AssetServiceStubSettings extends StubSettings
+ *
- * {@code
* AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
* AssetServiceStubSettings.newBuilder();
* assetServiceSettingsBuilder
- * .createFeedSettings()
+ * .batchGetAssetsHistorySettings()
* .setRetrySettings(
- * assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
+ * assetServiceSettingsBuilder
+ * .batchGetAssetsHistorySettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- *
- *
- *
- *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * String query = "";
- * List<String> assetTypes = new ArrayList<>();
- * for (StandardResourceMetadata element : assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
- *
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
*
- * To customize the endpoint:
+ *
+ *
- * {@code
* AssetServiceSettings assetServiceSettings =
* AssetServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
- * AssetServiceClient assetServiceClient =
- * AssetServiceClient.create(assetServiceSettings);
- *
- *
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ *
+ *
+ *
- * {@code
* AssetServiceSettings assetServiceSettings =
* AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AssetServiceClient assetServiceClient =
- * AssetServiceClient.create(assetServiceSettings);
- *
- *
* @param scope Required. The relative name of an asset. The search is limited to the resources
- * within the `scope`. The allowed value must be: * Organization number (such as
- * "organizations/123") * Folder number(such as "folders/1234") * Project number (such
- * as "projects/12345") * Project id (such as "projects/abc")
+ * within the `scope`. The allowed value must be:
+ *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * String query = "";
- * List<String> assetTypes = new ArrayList<>();
- * for (StandardResourceMetadata element : assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
+ *
+ *
* @param query Optional. The query statement.
* @param assetTypes Optional. A list of asset types that this request searches for. If empty, it
* will search all the supported asset types.
@@ -197,7 +173,7 @@ public final SearchAllResourcesPagedResponse searchAllResources(
return searchAllResources(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Searches all the resources under a given accessible CRM scope (project/folder/organization).
* This RPC gives callers especially admins the ability to search all the resources under a scope,
@@ -205,20 +181,6 @@ public final SearchAllResourcesPagedResponse searchAllResources(
* cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be
* rejected.
*
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -227,7 +189,7 @@ public final SearchAllResourcesPagedResponse searchAllResources(
return searchAllResourcesPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Searches all the resources under a given accessible CRM scope (project/folder/organization).
* This RPC gives callers especially admins the ability to search all the resources under a scope,
@@ -236,27 +198,13 @@ public final SearchAllResourcesPagedResponse searchAllResources(
* rejected.
*
*
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllResourcesRequest request = SearchAllResourcesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * for (StandardResourceMetadata element : assetServiceClient.searchAllResources(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallable
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllResourcesRequest request = SearchAllResourcesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * ApiFuture<SearchAllResourcesPagedResponse> future = assetServiceClient.searchAllResourcesPagedCallable().futureCall(request);
- * // Do something
- * for (StandardResourceMetadata element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallable
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllResourcesRequest request = SearchAllResourcesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * while (true) {
- * SearchAllResourcesResponse response = assetServiceClient.searchAllResourcesCallable().call(request);
- * for (StandardResourceMetadata element : response.getResultsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
+ *
*
- *
+ * @param query Optional. The query statement. Examples:
+ *
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * String query = "";
- * for (IamPolicySearchResult element : assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
+ *
*
- * @param scope Required. The relative name of an asset. The search is limited to the resources
- * within the `scope`. The allowed value must be: * Organization number (such as
- * "organizations/123") * Folder number(such as "folders/1234") * Project number (such
- * as "projects/12345") * Project id (such as "projects/abc")
- * @param query Optional. The query statement. Examples: *
- * "policy:myuser{@literal @}mydomain.com" * "policy:(myuser{@literal @}mydomain.com
- * viewer)"
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope, String query) {
@@ -327,7 +250,7 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope
return searchAllIamPolicies(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Searches all the IAM policies under a given accessible CRM scope (project/folder/organization).
* This RPC gives callers especially admins the ability to search all the IAM policies under a
@@ -335,20 +258,6 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope
* have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be
* rejected.
*
- *
- *
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -357,7 +266,7 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(
return searchAllIamPoliciesPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Searches all the IAM policies under a given accessible CRM scope (project/folder/organization).
* This RPC gives callers especially admins the ability to search all the IAM policies under a
@@ -366,27 +275,13 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(
* rejected.
*
*
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * for (IamPolicySearchResult element : assetServiceClient.searchAllIamPolicies(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallable
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * ApiFuture<SearchAllIamPoliciesPagedResponse> future = assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request);
- * // Do something
- * for (IamPolicySearchResult element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallable
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder()
- * .setScope(scope)
- * .build();
- * while (true) {
- * SearchAllIamPoliciesResponse response = assetServiceClient.searchAllIamPoliciesCallable().call(request);
- * for (IamPolicySearchResult element : response.getResultsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
- *
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class AssetServiceSettings extends ClientSettings
- * AssetServiceSettings.Builder assetServiceSettingsBuilder =
- * AssetServiceSettings.newBuilder();
+ *
- * {@code
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
* assetServiceSettingsBuilder
* .searchAllResourcesSettings()
* .setRetrySettings(
- * assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder()
+ * assetServiceSettingsBuilder
+ * .searchAllResourcesSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- *
- *
*/
-@Generated("by gapic-generator")
+@Generated("by gapic-generator-java")
package com.google.cloud.asset.v1p1beta1;
import javax.annotation.Generated;
diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java
index 5c7ad8743..e6203cfdb 100644
--- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java
+++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * https://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.google.cloud.asset.v1p1beta1.stub;
import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse;
import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse;
-import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest;
@@ -27,14 +27,13 @@
import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse;
import javax.annotation.Generated;
-// AUTO-GENERATED DOCUMENTATION AND CLASS
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * Base stub class for Cloud Asset API.
+ * Base stub class for the AssetService service API.
*
*
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- * String scope = "";
- * String query = "";
- * List<String> assetTypes = new ArrayList<>();
- * SearchAllResourcesPagedResponse response = assetServiceClient.searchAllResources(scope, query, assetTypes);
- * }
- *
- *
- *
+ * }
*/
-@Generated("by gapic-generator")
@BetaApi
+@Generated("by gapic-generator-java")
public class AssetServiceStubSettings extends StubSettings
+ *
- * {@code
* AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
* AssetServiceStubSettings.newBuilder();
* assetServiceSettingsBuilder
* .searchAllResourcesSettings()
* .setRetrySettings(
- * assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder()
+ * assetServiceSettingsBuilder
+ * .searchAllResourcesSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- *