Search in sources :

Example 1 with QueryWriteStatusRequest

use of com.google.storage.v2.QueryWriteStatusRequest in project gapic-generator-java by googleapis.

the class AsyncQueryWriteStatus method asyncQueryWriteStatus.

public static void asyncQueryWriteStatus() throws Exception {
    // It may require modifications to work in your environment.
    try (StorageClient storageClient = StorageClient.create()) {
        QueryWriteStatusRequest request = QueryWriteStatusRequest.newBuilder().setUploadId("uploadId1563990780").setCommonObjectRequestParams(CommonObjectRequestParams.newBuilder().build()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).build();
        ApiFuture<QueryWriteStatusResponse> future = storageClient.queryWriteStatusCallable().futureCall(request);
        // Do something.
        QueryWriteStatusResponse response = future.get();
    }
}
Also used : QueryWriteStatusResponse(com.google.storage.v2.QueryWriteStatusResponse) StorageClient(com.google.storage.v2.StorageClient) QueryWriteStatusRequest(com.google.storage.v2.QueryWriteStatusRequest)

Example 2 with QueryWriteStatusRequest

use of com.google.storage.v2.QueryWriteStatusRequest in project gapic-generator-java by googleapis.

the class SyncQueryWriteStatus method syncQueryWriteStatus.

public static void syncQueryWriteStatus() throws Exception {
    // It may require modifications to work in your environment.
    try (StorageClient storageClient = StorageClient.create()) {
        QueryWriteStatusRequest request = QueryWriteStatusRequest.newBuilder().setUploadId("uploadId1563990780").setCommonObjectRequestParams(CommonObjectRequestParams.newBuilder().build()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).build();
        QueryWriteStatusResponse response = storageClient.queryWriteStatus(request);
    }
}
Also used : QueryWriteStatusResponse(com.google.storage.v2.QueryWriteStatusResponse) StorageClient(com.google.storage.v2.StorageClient) QueryWriteStatusRequest(com.google.storage.v2.QueryWriteStatusRequest)

Aggregations

QueryWriteStatusRequest (com.google.storage.v2.QueryWriteStatusRequest)2 QueryWriteStatusResponse (com.google.storage.v2.QueryWriteStatusResponse)2 StorageClient (com.google.storage.v2.StorageClient)2