use of com.google.cloud.asset.v1.ListFeedsResponse in project java-asset by googleapis.
the class ListFeedsExample method listFeeds.
// List feeds in a project.
public static void listFeeds(String projectId) throws Exception {
// the "close" method on the client to safely clean up any remaining background resources.
try (AssetServiceClient client = AssetServiceClient.create()) {
ListFeedsResponse response = client.listFeeds(ProjectName.of(projectId).toString());
System.out.println("Listed feeds under: " + projectId);
} catch (Exception e) {
System.out.println("Error during ListFeeds: \n" + e.toString());
}
}
use of com.google.cloud.asset.v1.ListFeedsResponse in project gapic-generator-java by googleapis.
the class AsyncListFeeds method asyncListFeeds.
public static void asyncListFeeds() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
ApiFuture<ListFeedsResponse> future = assetServiceClient.listFeedsCallable().futureCall(request);
// Do something.
ListFeedsResponse response = future.get();
}
}
use of com.google.cloud.asset.v1.ListFeedsResponse in project gapic-generator-java by googleapis.
the class SyncListFeeds method syncListFeeds.
public static void syncListFeeds() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
ListFeedsResponse response = assetServiceClient.listFeeds(request);
}
}
use of com.google.cloud.asset.v1.ListFeedsResponse in project gapic-generator-java by googleapis.
the class SyncListFeedsString method syncListFeedsString.
public static void syncListFeedsString() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
String parent = "parent-995424086";
ListFeedsResponse response = assetServiceClient.listFeeds(parent);
}
}
Aggregations