use of com.google.storage.v2.StartResumableWriteRequest in project gapic-generator-java by googleapis.
the class AsyncStartResumableWrite method asyncStartResumableWrite.
public static void asyncStartResumableWrite() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
StartResumableWriteRequest request = StartResumableWriteRequest.newBuilder().setWriteObjectSpec(WriteObjectSpec.newBuilder().build()).setCommonObjectRequestParams(CommonObjectRequestParams.newBuilder().build()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).build();
ApiFuture<StartResumableWriteResponse> future = storageClient.startResumableWriteCallable().futureCall(request);
// Do something.
StartResumableWriteResponse response = future.get();
}
}
use of com.google.storage.v2.StartResumableWriteRequest in project gapic-generator-java by googleapis.
the class SyncStartResumableWrite method syncStartResumableWrite.
public static void syncStartResumableWrite() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
StartResumableWriteRequest request = StartResumableWriteRequest.newBuilder().setWriteObjectSpec(WriteObjectSpec.newBuilder().build()).setCommonObjectRequestParams(CommonObjectRequestParams.newBuilder().build()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).build();
StartResumableWriteResponse response = storageClient.startResumableWrite(request);
}
}
Aggregations