use of com.google.example.library.v1.ShelfName in project gapic-generator-java by googleapis.
the class SyncMoveBookBooknameShelfname method syncMoveBookBooknameShelfname.
public static void syncMoveBookBooknameShelfname() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
BookName name = BookName.of("[SHELF]", "[BOOK]");
ShelfName otherShelfName = ShelfName.of("[SHELF_ID]");
Book response = libraryServiceClient.moveBook(name, otherShelfName);
}
}
use of com.google.example.library.v1.ShelfName in project gapic-generator-java by googleapis.
the class SyncMoveBookStringShelfname method syncMoveBookStringShelfname.
public static void syncMoveBookStringShelfname() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
String name = BookName.of("[SHELF]", "[BOOK]").toString();
ShelfName otherShelfName = ShelfName.of("[SHELF_ID]");
Book response = libraryServiceClient.moveBook(name, otherShelfName);
}
}
use of com.google.example.library.v1.ShelfName in project gapic-generator-java by googleapis.
the class SyncGetShelfShelfname method syncGetShelfShelfname.
public static void syncGetShelfShelfname() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
ShelfName name = ShelfName.of("[SHELF_ID]");
Shelf response = libraryServiceClient.getShelf(name);
}
}
use of com.google.example.library.v1.ShelfName in project gapic-generator-java by googleapis.
the class SyncMergeShelvesShelfnameString method syncMergeShelvesShelfnameString.
public static void syncMergeShelvesShelfnameString() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
ShelfName name = ShelfName.of("[SHELF_ID]");
String otherShelf = ShelfName.of("[SHELF_ID]").toString();
Shelf response = libraryServiceClient.mergeShelves(name, otherShelf);
}
}
use of com.google.example.library.v1.ShelfName in project gapic-generator-java by googleapis.
the class SyncMergeShelvesStringShelfname method syncMergeShelvesStringShelfname.
public static void syncMergeShelvesStringShelfname() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
String name = ShelfName.of("[SHELF_ID]").toString();
ShelfName otherShelf = ShelfName.of("[SHELF_ID]");
Shelf response = libraryServiceClient.mergeShelves(name, otherShelf);
}
}
Aggregations