use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncCreateBookShelfnameBook method syncCreateBookShelfnameBook.
public static void syncCreateBookShelfnameBook() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
ShelfName parent = ShelfName.of("[SHELF_ID]");
Book book = Book.newBuilder().build();
Book response = libraryServiceClient.createBook(parent, book);
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncCreateBookStringBook method syncCreateBookStringBook.
public static void syncCreateBookStringBook() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
String parent = ShelfName.of("[SHELF_ID]").toString();
Book book = Book.newBuilder().build();
Book response = libraryServiceClient.createBook(parent, book);
}
}
use of com.google.cloud.example.library.v1.LibraryServiceClient in project gapic-generator-java by googleapis.
the class SyncUpdateBookBookFieldmask method syncUpdateBookBookFieldmask.
public static void syncUpdateBookBookFieldmask() throws Exception {
// It may require modifications to work in your environment.
try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
Book book = Book.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Book response = libraryServiceClient.updateBook(book, updateMask);
}
}
Aggregations