Search in sources :

Example 1 with DeleteFeedRequest

use of com.google.cloud.asset.v1.DeleteFeedRequest in project gapic-generator-java by googleapis.

the class AsyncDeleteFeed method asyncDeleteFeed.

public static void asyncDeleteFeed() throws Exception {
    // It may require modifications to work in your environment.
    try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
        DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()).build();
        ApiFuture<Empty> future = assetServiceClient.deleteFeedCallable().futureCall(request);
        // Do something.
        future.get();
    }
}
Also used : Empty(com.google.protobuf.Empty) AssetServiceClient(com.google.cloud.asset.v1.AssetServiceClient) DeleteFeedRequest(com.google.cloud.asset.v1.DeleteFeedRequest)

Example 2 with DeleteFeedRequest

use of com.google.cloud.asset.v1.DeleteFeedRequest in project gapic-generator-java by googleapis.

the class SyncDeleteFeed method syncDeleteFeed.

public static void syncDeleteFeed() throws Exception {
    // It may require modifications to work in your environment.
    try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
        DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()).build();
        assetServiceClient.deleteFeed(request);
    }
}
Also used : AssetServiceClient(com.google.cloud.asset.v1.AssetServiceClient) DeleteFeedRequest(com.google.cloud.asset.v1.DeleteFeedRequest)

Aggregations

AssetServiceClient (com.google.cloud.asset.v1.AssetServiceClient)2 DeleteFeedRequest (com.google.cloud.asset.v1.DeleteFeedRequest)2 Empty (com.google.protobuf.Empty)1