Search in sources :

Example 6 with UndeleteBucketRequest

use of com.google.logging.v2.UndeleteBucketRequest in project gapic-generator-java by googleapis.

the class SyncUndeleteBucket method syncUndeleteBucket.

public static void syncUndeleteBucket() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        UndeleteBucketRequest request = UndeleteBucketRequest.newBuilder().setName(LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()).build();
        configClient.undeleteBucket(request);
    }
}
Also used : ConfigClient(com.google.cloud.logging.v2.ConfigClient) UndeleteBucketRequest(com.google.logging.v2.UndeleteBucketRequest)

Aggregations

UndeleteBucketRequest (com.google.logging.v2.UndeleteBucketRequest)6 Test (org.junit.Test)4 Empty (com.google.protobuf.Empty)3 InvalidArgumentException (com.google.api.gax.rpc.InvalidArgumentException)2 ConfigClient (com.google.cloud.logging.v2.ConfigClient)2 AbstractMessage (com.google.protobuf.AbstractMessage)2 StatusRuntimeException (io.grpc.StatusRuntimeException)2