use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncDeleteShelfString method syncDeleteShelfString.
public static void syncDeleteShelfString() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
String name = ShelfName.of("[SHELF_ID]").toString();
libraryServiceClient.deleteShelf(name);
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncGetBook method syncGetBook.
public static void syncGetBook() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
GetBookRequest request = GetBookRequest.newBuilder().setName(BookName.of("[SHELF]", "[BOOK]").toString()).build();
Book response = libraryServiceClient.getBook(request);
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncGetBookBookname method syncGetBookBookname.
public static void syncGetBookBookname() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
BookName name = BookName.of("[SHELF]", "[BOOK]");
Book response = libraryServiceClient.getBook(name);
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncGetBookString method syncGetBookString.
public static void syncGetBookString() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
String name = BookName.of("[SHELF]", "[BOOK]").toString();
Book response = libraryServiceClient.getBook(name);
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncGetShelf method syncGetShelf.
public static void syncGetShelf() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
GetShelfRequest request = GetShelfRequest.newBuilder().setName(ShelfName.of("[SHELF_ID]").toString()).build();
Shelf response = libraryServiceClient.getShelf(request);
}
}
Aggregations