use of com.google.cloud.asset.v1.GetFeedRequest in project gapic-generator-java by googleapis.
the class AsyncGetFeed method asyncGetFeed.
public static void asyncGetFeed() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
GetFeedRequest request = GetFeedRequest.newBuilder().setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()).build();
ApiFuture<Feed> future = assetServiceClient.getFeedCallable().futureCall(request);
// Do something.
Feed response = future.get();
}
}
use of com.google.cloud.asset.v1.GetFeedRequest in project gapic-generator-java by googleapis.
the class SyncGetFeed method syncGetFeed.
public static void syncGetFeed() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
GetFeedRequest request = GetFeedRequest.newBuilder().setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()).build();
Feed response = assetServiceClient.getFeed(request);
}
}
Aggregations