use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class AsyncDeleteShelf method asyncDeleteShelf.
public static void asyncDeleteShelf() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
DeleteShelfRequest request = DeleteShelfRequest.newBuilder().setName(ShelfName.of("[SHELF_ID]").toString()).build();
ApiFuture<Empty> future = libraryServiceClient.deleteShelfCallable().futureCall(request);
// Do something.
future.get();
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncDeleteShelf method syncDeleteShelf.
public static void syncDeleteShelf() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
DeleteShelfRequest request = DeleteShelfRequest.newBuilder().setName(ShelfName.of("[SHELF_ID]").toString()).build();
libraryServiceClient.deleteShelf(request);
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncDeleteShelfShelfname method syncDeleteShelfShelfname.
public static void syncDeleteShelfShelfname() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
ShelfName name = ShelfName.of("[SHELF_ID]");
libraryServiceClient.deleteShelf(name);
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class AsyncListShelves method asyncListShelves.
public static void asyncListShelves() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
ListShelvesRequest request = ListShelvesRequest.newBuilder().setPageSize(883849137).setPageToken("pageToken873572522").build();
ApiFuture<Shelf> future = libraryServiceClient.listShelvesPagedCallable().futureCall(request);
// Do something.
for (Shelf element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class AsyncMergeShelves method asyncMergeShelves.
public static void asyncMergeShelves() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
MergeShelvesRequest request = MergeShelvesRequest.newBuilder().setName(ShelfName.of("[SHELF_ID]").toString()).setOtherShelf(ShelfName.of("[SHELF_ID]").toString()).build();
ApiFuture<Shelf> future = libraryServiceClient.mergeShelvesCallable().futureCall(request);
// Do something.
Shelf response = future.get();
}
}
Aggregations