From e9428e75eca06556b3a31036a6bf3ee560f668bc Mon Sep 17 00:00:00 2001 From: Mira Leung Date: Wed, 6 May 2020 00:43:16 +0000 Subject: [PATCH 1/2] chore: add support for complex resource IDs --- .../config/ResourceNamePatternConfigTest.java | 37 +- .../testdata/csharp_library.baseline | 651 ++++++------- .../testdata/go_library.baseline | 87 +- .../testdata/java_library.baseline | 358 ++++---- .../java_library_no_gapic_config.baseline | 260 +++--- ..._library_with_grpc_service_config.baseline | 358 ++++---- .../testdata/nodejs_library.baseline | 194 ++-- .../testdata/php_library.baseline | 231 ++--- ..._library_with_grpc_service_config.baseline | 231 ++--- .../testdata/python_library.baseline | 177 ++-- .../testdata/ruby_library.baseline | 169 ++-- .../ruby_library_no_gapic_config.baseline | 27 +- .../testsrc/protoannotations/library.proto | 866 ++++++++++-------- 13 files changed, 1902 insertions(+), 1744 deletions(-) diff --git a/src/test/java/com/google/api/codegen/config/ResourceNamePatternConfigTest.java b/src/test/java/com/google/api/codegen/config/ResourceNamePatternConfigTest.java index 1ec1db9ec2..1bd44552ac 100644 --- a/src/test/java/com/google/api/codegen/config/ResourceNamePatternConfigTest.java +++ b/src/test/java/com/google/api/codegen/config/ResourceNamePatternConfigTest.java @@ -22,14 +22,14 @@ public class ResourceNamePatternConfigTest { @Test public void testIsFixedPattern() { - assertThat(new ResourceNamePatternConfig("_deleted_topic_").isFixedPattern()).isEqualTo(true); + assertThat(new ResourceNamePatternConfig("deleted_topic").isFixedPattern()).isEqualTo(true); assertThat(new ResourceNamePatternConfig("states/{state}/cities/{city}").isFixedPattern()) .isEqualTo(false); } @Test public void testGetCreateMethodName() { - assertThat(new ResourceNamePatternConfig("_deleted_topic_").getCreateMethodName()) + assertThat(new ResourceNamePatternConfig("deleted_topic").getCreateMethodName()) .isEqualTo("ofDeletedTopicName"); assertThat(new ResourceNamePatternConfig("states/{state}/cities/{city}").getCreateMethodName()) .isEqualTo("ofStateCityName"); @@ -37,15 +37,31 @@ public void testGetCreateMethodName() { @Test public void testGetBindingVariables() { - assertThat(new ResourceNamePatternConfig("_deleted_topic_").getBindingVariables()).isEmpty(); + assertThat(new ResourceNamePatternConfig("deleted_topic").getBindingVariables()).isEmpty(); assertThat(new ResourceNamePatternConfig("states/{state}/cities/{city}").getBindingVariables()) .containsExactly("state", "city"); } + @Test + public void testGetBindingVariablesWithComplexResourceIds() { + assertThat( + new ResourceNamePatternConfig("states/{state}/animals/{animal_1}~{animal_2}") + .getBindingVariables()) + .containsExactly("state", "animal_1", "animal_2"); + assertThat( + new ResourceNamePatternConfig("states/{state}/animals/{foo}.{bar}~{car}-{cdr}_{cadr}") + .getBindingVariables()) + .containsExactly("state", "foo", "bar", "car", "cdr", "cadr"); + assertThat( + new ResourceNamePatternConfig("states/{state}/animals/{foo}.{bar}/prizes/{prize}") + .getBindingVariables()) + .containsExactly("state", "foo", "bar", "prize"); + } + @Test public void testGetPatternId() { ResourceNamePatternConfig pattern; - pattern = new ResourceNamePatternConfig("_deleted_topic"); + pattern = new ResourceNamePatternConfig("deleted_topic"); assertThat(pattern.getPatternId()).isEqualTo("deleted_topic"); pattern = new ResourceNamePatternConfig("states/{state}/cities/{city}"); assertThat(pattern.getPatternId()).isEqualTo("state_city"); @@ -55,5 +71,18 @@ public void testGetPatternId() { assertThat(pattern.getPatternId()).isEqualTo("state_city_mascot_animal"); pattern = new ResourceNamePatternConfig("states/{state}/mascotAnimals/{mascot_animal}"); assertThat(pattern.getPatternId()).isEqualTo("state_mascot_animal"); + + pattern = new ResourceNamePatternConfig("states/{state}/animals/{animal_id=**}"); + assertThat(pattern.getPatternId()).isEqualTo("state_animal_id"); + } + + @Test + public void testGetPatternIdWithComplexResourceIds() { + ResourceNamePatternConfig pattern = + new ResourceNamePatternConfig("states/{state}/animals/{animal_1}~{animal_2}"); + assertThat(pattern.getPatternId()).isEqualTo("state_animal_1_animal_2"); + pattern = + new ResourceNamePatternConfig("states/{state}/animals/{foo}.{bar}~{car}-{cdr}_{cadr}"); + assertThat(pattern.getPatternId()).isEqualTo("state_foo_bar_car_cdr_cadr"); } } diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/csharp_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/csharp_library.baseline index 372c4ff4e0..130b92e9e8 100644 --- a/src/test/java/com/google/api/codegen/protoannotations/testdata/csharp_library.baseline +++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/csharp_library.baseline @@ -534,7 +534,7 @@ namespace Google.Example.Library.V1.Samples while (!done) { // Initialize a request - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Comment comment2 = new Comment { Comment = ByteString.CopyFrom(File.ReadAllBytes("comment_file")), @@ -620,7 +620,7 @@ namespace Google.Example.Library.V1.Samples public static async Task SampleDiscussBookAsync(string imageFileName, Comment.Types.Stage stage) { LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Comment comment2 = new Comment { Comment = ByteString.CopyFrom(File.ReadAllBytes("comment_file")), @@ -708,7 +708,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); IEnumerable names = new[] { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; IEnumerable shelves = new[] { @@ -780,7 +780,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); IEnumerable names = new[] { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; IEnumerable shelves = new[] { @@ -854,7 +854,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); IEnumerable names = new[] { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; IEnumerable shelves = new[] { @@ -932,7 +932,7 @@ namespace Google.Example.Library.V1.Samples { BookNameOneofs = { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }, ShelvesAsShelfNames = { @@ -1007,7 +1007,7 @@ namespace Google.Example.Library.V1.Samples { BookNameOneofs = { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }, ShelvesAsShelfNames = { @@ -1084,7 +1084,7 @@ namespace Google.Example.Library.V1.Samples { BookNameOneofs = { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }, ShelvesAsShelfNames = { @@ -1160,7 +1160,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); IEnumerable names = new[] { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; IEnumerable shelves = new[] { @@ -1231,7 +1231,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); IEnumerable names = new[] { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; IEnumerable shelves = new[] { @@ -1305,7 +1305,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); IEnumerable names = new[] { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; IEnumerable shelves = new[] { @@ -1382,7 +1382,7 @@ namespace Google.Example.Library.V1.Samples { BookNameOneofs = { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }, ShelvesAsShelfNames = { @@ -1456,7 +1456,7 @@ namespace Google.Example.Library.V1.Samples { BookNameOneofs = { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }, ShelvesAsShelfNames = { @@ -1533,7 +1533,7 @@ namespace Google.Example.Library.V1.Samples { BookNameOneofs = { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }, ShelvesAsShelfNames = { @@ -1608,7 +1608,7 @@ namespace Google.Example.Library.V1.Samples public static async Task SampleGetBigBookAsync(string shelf) { LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); - BookNameOneof name = BookNameOneof.From(new BookName(shelf, "War and Peace")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "War and Peace")); // Poll until the returned long-running operation is complete Operation operation = await libraryServiceClient.GetBigBookAsync(name); Book response = (await operation.PollUntilCompletedAsync()).Result; @@ -1696,7 +1696,7 @@ namespace Google.Example.Library.V1.Samples public static async Task SampleGetBigBookAsync(string shelf, string bigBookName) { LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); - BookNameOneof name = BookNameOneof.From(new BookName(shelf, bigBookName)); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", bigBookName)); // Poll until the returned long-running operation is complete Operation operation = await libraryServiceClient.GetBigBookAsync(name); Book response = (await operation.PollUntilCompletedAsync()).Result; @@ -1771,7 +1771,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName(shelf, "War and Peace")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "War and Peace")), }; // Poll until the returned long-running operation is complete Operation operation = await libraryServiceClient.GetBigBookAsync(request); @@ -1862,7 +1862,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName(shelf, bigBookName)), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", bigBookName)), }; // Poll until the returned long-running operation is complete Operation operation = await libraryServiceClient.GetBigBookAsync(request); @@ -1935,7 +1935,7 @@ namespace Google.Example.Library.V1.Samples public static void SampleGetBigBook(string shelf) { LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); - BookNameOneof name = BookNameOneof.From(new BookName(shelf, "War and Peace")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "War and Peace")); // Poll until the returned long-running operation is complete Book response = libraryServiceClient.GetBigBook(name).PollUntilCompleted().Result; // Testing iterating over map fields when both key and value are specified. @@ -2021,7 +2021,7 @@ namespace Google.Example.Library.V1.Samples public static void SampleGetBigBook(string shelf, string bigBookName) { LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); - BookNameOneof name = BookNameOneof.From(new BookName(shelf, bigBookName)); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", bigBookName)); // Poll until the returned long-running operation is complete Book response = libraryServiceClient.GetBigBook(name).PollUntilCompleted().Result; Console.WriteLine(response); @@ -2094,7 +2094,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName(shelf, "War and Peace")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "War and Peace")), }; // Poll until the returned long-running operation is complete Book response = libraryServiceClient.GetBigBook(request).PollUntilCompleted().Result; @@ -2183,7 +2183,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName(shelf, bigBookName)), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", bigBookName)), }; // Poll until the returned long-running operation is complete Book response = libraryServiceClient.GetBigBook(request).PollUntilCompleted().Result; @@ -2254,7 +2254,7 @@ namespace Google.Example.Library.V1.Samples public static async Task SampleGetBigNothingAsync() { LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Poll until the returned long-running operation is complete Operation operation = await libraryServiceClient.GetBigNothingAsync(name); await operation.PollUntilCompletedAsync(); @@ -2314,7 +2314,7 @@ namespace Google.Example.Library.V1.Samples public static async Task SampleGetBigNothingAsync() { LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Poll until the returned long-running operation is complete Operation operation = await libraryServiceClient.GetBigNothingAsync(name); await operation.PollUntilCompletedAsync(); @@ -2375,7 +2375,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Poll until the returned long-running operation is complete Operation operation = await libraryServiceClient.GetBigNothingAsync(request); @@ -2438,7 +2438,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Poll until the returned long-running operation is complete Operation operation = await libraryServiceClient.GetBigNothingAsync(request); @@ -2497,7 +2497,7 @@ namespace Google.Example.Library.V1.Samples public static void SampleGetBigNothing() { LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Poll until the returned long-running operation is complete libraryServiceClient.GetBigNothing(name).PollUntilCompleted(); // Got nothing @@ -2555,7 +2555,7 @@ namespace Google.Example.Library.V1.Samples public static void SampleGetBigNothing() { LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Poll until the returned long-running operation is complete libraryServiceClient.GetBigNothing(name).PollUntilCompleted(); } @@ -2614,7 +2614,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Poll until the returned long-running operation is complete libraryServiceClient.GetBigNothing(request).PollUntilCompleted(); @@ -2675,7 +2675,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Poll until the returned long-running operation is complete libraryServiceClient.GetBigNothing(request).PollUntilCompleted(); @@ -2736,7 +2736,7 @@ namespace Google.Example.Library.V1.Samples public static async Task SampleGetBookAsync() { LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Book response = await libraryServiceClient.GetBookAsync(name); string intKeyVal = response.MapStringValue[123]; string booleanKeyVal = response.MapBoolKey[true]; @@ -2802,7 +2802,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Book response = await libraryServiceClient.GetBookAsync(request); string intKeyVal = response.MapStringValue[123]; @@ -2866,7 +2866,7 @@ namespace Google.Example.Library.V1.Samples public static void SampleGetBook() { LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Book response = libraryServiceClient.GetBook(name); string intKeyVal = response.MapStringValue[123]; string booleanKeyVal = response.MapBoolKey[true]; @@ -2931,7 +2931,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Book response = libraryServiceClient.GetBook(request); string intKeyVal = response.MapStringValue[123]; @@ -4210,8 +4210,8 @@ namespace Google.Example.Library.V1.Samples RequiredSingularString = "", RequiredSingularBytes = ByteString.Empty, RequiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(), - RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), RequiredSingularResourceNameCommon = "", RequiredSingularFixed32 = 0, RequiredSingularFixed64 = 0L, @@ -4328,7 +4328,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); GetBookFromAbsolutelyAnywhereRequest request = new GetBookFromAbsolutelyAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "The ID of the book")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "The ID of the book")), }; BookFromAnywhere response = libraryServiceClient.GetBookFromAbsolutelyAnywhere(request); Console.WriteLine("Archived book found."); @@ -4384,7 +4384,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); GetBookFromAbsolutelyAnywhereRequest request = new GetBookFromAbsolutelyAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("The Shelf to search for the book", "The ID of the book")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "The ID of the book")), }; BookFromAnywhere response = libraryServiceClient.GetBookFromAbsolutelyAnywhere(request); Console.WriteLine("Book on shelf found."); @@ -4509,7 +4509,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName(shelf, "War and Peace")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "War and Peace")), }; // Poll until the returned long-running operation is complete Book response = libraryServiceClient.GetBigBook(request).PollUntilCompleted().Result; @@ -4623,7 +4623,7 @@ namespace Google.Example.Library.V1.Samples // Initialize a request DiscussBookRequest request = new DiscussBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Comment = new Comment { Comment = ByteString.CopyFrom(File.ReadAllBytes("comment_file")), @@ -4712,7 +4712,7 @@ namespace Google.Example.Library.V1.Samples LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); DiscussBookRequest request = new DiscussBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Comment = new Comment { Comment = ByteString.CopyFrom(File.ReadAllBytes("comment_file")), @@ -4819,7 +4819,7 @@ namespace Google.Example.Library.V1.SmokeTests LibraryServiceClient client = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName($"testShelf-{Guid.NewGuid()}", projectId)); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", projectId)); Book book = new Book { Rating = Book.Types.Rating.Good, @@ -5525,7 +5525,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request Book response = await libraryServiceClient.GetBookAsync(name); // End snippet @@ -5538,7 +5538,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request Book response = libraryServiceClient.GetBook(name); // End snippet @@ -5554,7 +5554,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request Book response = await libraryServiceClient.GetBookAsync(request); @@ -5570,7 +5570,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request Book response = libraryServiceClient.GetBook(request); @@ -5771,7 +5771,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request await libraryServiceClient.DeleteBookAsync(name); // End snippet @@ -5784,7 +5784,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request libraryServiceClient.DeleteBook(name); // End snippet @@ -5800,7 +5800,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) DeleteBookRequest request = new DeleteBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request await libraryServiceClient.DeleteBookAsync(request); @@ -5816,7 +5816,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) DeleteBookRequest request = new DeleteBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request libraryServiceClient.DeleteBook(request); @@ -5831,7 +5831,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Book book = new Book(); // Make the request Book response = await libraryServiceClient.UpdateBookAsync(name, book); @@ -5845,7 +5845,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Book book = new Book(); // Make the request Book response = libraryServiceClient.UpdateBook(name, book); @@ -5860,7 +5860,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string optionalFoo = ""; Book book = new Book(); FieldMask updateMask = new FieldMask(); @@ -5877,7 +5877,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string optionalFoo = ""; Book book = new Book(); FieldMask updateMask = new FieldMask(); @@ -5897,7 +5897,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) UpdateBookRequest request = new UpdateBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Book = new Book(), }; // Make the request @@ -5914,7 +5914,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) UpdateBookRequest request = new UpdateBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Book = new Book(), }; // Make the request @@ -5930,7 +5930,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); ShelfName otherShelfName = new ShelfName("[SHELF]"); // Make the request Book response = await libraryServiceClient.MoveBookAsync(name, otherShelfName); @@ -5944,7 +5944,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); ShelfName otherShelfName = new ShelfName("[SHELF]"); // Make the request Book response = libraryServiceClient.MoveBook(name, otherShelfName); @@ -5961,7 +5961,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) MoveBookRequest request = new MoveBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OtherShelfNameAsShelfName = new ShelfName("[SHELF]"), }; // Make the request @@ -5978,7 +5978,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) MoveBookRequest request = new MoveBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OtherShelfNameAsShelfName = new ShelfName("[SHELF]"), }; // Make the request @@ -6254,7 +6254,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); IEnumerable comments = new[] { new Comment @@ -6276,7 +6276,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); IEnumerable comments = new[] { new Comment @@ -6301,7 +6301,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) AddCommentsRequest request = new AddCommentsRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Comments = { new Comment @@ -6326,7 +6326,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) AddCommentsRequest request = new AddCommentsRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Comments = { new Comment @@ -6414,8 +6414,8 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof altBookName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof altBookName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); LocationName place = new LocationName("[PROJECT]", "[LOCATION]"); FolderName folder = new FolderName("[FOLDER]"); // Make the request @@ -6430,8 +6430,8 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof altBookName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof altBookName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); LocationName place = new LocationName("[PROJECT]", "[LOCATION]"); FolderName folder = new FolderName("[FOLDER]"); // Make the request @@ -6449,8 +6449,8 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookFromAnywhereRequest request = new GetBookFromAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - AltBookNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + AltBookNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), PlaceAsLocationName = new LocationName("[PROJECT]", "[LOCATION]"), FolderAsFolderName = new FolderName("[FOLDER]"), }; @@ -6468,8 +6468,8 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookFromAnywhereRequest request = new GetBookFromAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - AltBookNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + AltBookNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), PlaceAsLocationName = new LocationName("[PROJECT]", "[LOCATION]"), FolderAsFolderName = new FolderName("[FOLDER]"), }; @@ -6486,7 +6486,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request BookFromAnywhere response = await libraryServiceClient.GetBookFromAbsolutelyAnywhereAsync(name); // End snippet @@ -6499,7 +6499,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request BookFromAnywhere response = libraryServiceClient.GetBookFromAbsolutelyAnywhere(name); // End snippet @@ -6515,7 +6515,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookFromAbsolutelyAnywhereRequest request = new GetBookFromAbsolutelyAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request BookFromAnywhere response = await libraryServiceClient.GetBookFromAbsolutelyAnywhereAsync(request); @@ -6531,7 +6531,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookFromAbsolutelyAnywhereRequest request = new GetBookFromAbsolutelyAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request BookFromAnywhere response = libraryServiceClient.GetBookFromAbsolutelyAnywhere(request); @@ -6546,7 +6546,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string indexName = "default index"; IDictionary indexMap = new Dictionary { @@ -6564,7 +6564,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string indexName = "default index"; IDictionary indexMap = new Dictionary { @@ -6585,7 +6585,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) UpdateBookIndexRequest request = new UpdateBookIndexRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), IndexName = "default index", IndexMap = { @@ -6606,7 +6606,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) UpdateBookIndexRequest request = new UpdateBookIndexRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), IndexName = "default index", IndexMap = { @@ -6699,7 +6699,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize a request DiscussBookRequest request = new DiscussBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Stream a request to the server await duplexStream.WriteAsync(request); @@ -6723,7 +6723,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) IEnumerable names = new[] { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; IEnumerable shelves = new List(); // Make the request @@ -6771,7 +6771,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) IEnumerable names = new[] { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; IEnumerable shelves = new List(); // Make the request @@ -6821,7 +6821,7 @@ namespace Google.Example.Library.V1.Snippets { BookNameOneofs = { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }, ShelvesAsShelfNames = { }, }; @@ -6872,7 +6872,7 @@ namespace Google.Example.Library.V1.Snippets { BookNameOneofs = { - BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }, ShelvesAsShelfNames = { }, }; @@ -6955,7 +6955,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request Operation response = await libraryServiceClient.GetBigBookAsync(name); @@ -6987,7 +6987,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request Operation response = libraryServiceClient.GetBigBook(name); @@ -7021,7 +7021,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request Operation response = @@ -7056,7 +7056,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request Operation response = @@ -7090,7 +7090,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request Operation response = await libraryServiceClient.GetBigNothingAsync(name); @@ -7120,7 +7120,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); // Make the request Operation response = libraryServiceClient.GetBigNothing(name); @@ -7152,7 +7152,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request Operation response = @@ -7185,7 +7185,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request Operation response = @@ -7249,8 +7249,8 @@ namespace Google.Example.Library.V1.Snippets string requiredSingularString = ""; ByteString requiredSingularBytes = ByteString.Empty; TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage requiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(); - BookNameOneof requiredSingularResourceName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof requiredSingularResourceNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof requiredSingularResourceName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof requiredSingularResourceNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string requiredSingularResourceNameCommon = ""; int requiredSingularFixed32 = 0; long requiredSingularFixed64 = 0L; @@ -7310,8 +7310,8 @@ namespace Google.Example.Library.V1.Snippets string optionalSingularString = ""; ByteString optionalSingularBytes = ByteString.Empty; TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage optionalSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(); - BookNameOneof optionalSingularResourceName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof optionalSingularResourceNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof optionalSingularResourceName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof optionalSingularResourceNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string optionalSingularResourceNameCommon = ""; int optionalSingularFixed32 = 0; long optionalSingularFixed64 = 0L; @@ -7383,8 +7383,8 @@ namespace Google.Example.Library.V1.Snippets string requiredSingularString = ""; ByteString requiredSingularBytes = ByteString.Empty; TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage requiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(); - BookNameOneof requiredSingularResourceName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof requiredSingularResourceNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof requiredSingularResourceName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof requiredSingularResourceNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string requiredSingularResourceNameCommon = ""; int requiredSingularFixed32 = 0; long requiredSingularFixed64 = 0L; @@ -7444,8 +7444,8 @@ namespace Google.Example.Library.V1.Snippets string optionalSingularString = ""; ByteString optionalSingularBytes = ByteString.Empty; TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage optionalSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(); - BookNameOneof optionalSingularResourceName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof optionalSingularResourceNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof optionalSingularResourceName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof optionalSingularResourceNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string optionalSingularResourceNameCommon = ""; int optionalSingularFixed32 = 0; long optionalSingularFixed64 = 0L; @@ -7520,8 +7520,8 @@ namespace Google.Example.Library.V1.Snippets RequiredSingularString = "", RequiredSingularBytes = ByteString.Empty, RequiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(), - RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), RequiredSingularResourceNameCommon = "", RequiredSingularFixed32 = 0, RequiredSingularFixed64 = 0L, @@ -7596,8 +7596,8 @@ namespace Google.Example.Library.V1.Snippets RequiredSingularString = "", RequiredSingularBytes = ByteString.Empty, RequiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(), - RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), RequiredSingularResourceNameCommon = "", RequiredSingularFixed32 = 0, RequiredSingularFixed64 = 0L, @@ -8026,7 +8026,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = await LibraryServiceClient.CreateAsync(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string author = ""; string title = ""; Book.Types.Rating rating = Book.Types.Rating.Good; @@ -8042,7 +8042,7 @@ namespace Google.Example.Library.V1.Snippets // Create client LibraryServiceClient libraryServiceClient = LibraryServiceClient.Create(); // Initialize request argument(s) - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string author = ""; string title = ""; Book.Types.Rating rating = Book.Types.Rating.Good; @@ -8061,7 +8061,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) Book request = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request await libraryServiceClient.SaveBookAsync(request); @@ -8077,7 +8077,7 @@ namespace Google.Example.Library.V1.Snippets // Initialize request argument(s) Book request = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; // Make the request libraryServiceClient.SaveBook(request); @@ -8833,7 +8833,7 @@ namespace Google.Example.Library.V1.Tests }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -8864,7 +8864,7 @@ namespace Google.Example.Library.V1.Tests }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -8895,7 +8895,7 @@ namespace Google.Example.Library.V1.Tests }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -8924,7 +8924,7 @@ namespace Google.Example.Library.V1.Tests }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9096,11 +9096,11 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookRequest expectedRequest = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9109,7 +9109,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.GetBook(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Book response = client.GetBook(name); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); @@ -9125,11 +9125,11 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookRequest expectedRequest = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9138,7 +9138,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.GetBookAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Book response = await client.GetBookAsync(name); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); @@ -9154,11 +9154,11 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9182,11 +9182,11 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookRequest request = new GetBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9210,13 +9210,13 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); DeleteBookRequest expectedRequest = new DeleteBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Empty expectedResponse = new Empty(); mockGrpcClient.Setup(x => x.DeleteBook(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); client.DeleteBook(name); mockGrpcClient.VerifyAll(); } @@ -9231,13 +9231,13 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); DeleteBookRequest expectedRequest = new DeleteBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Empty expectedResponse = new Empty(); mockGrpcClient.Setup(x => x.DeleteBookAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); await client.DeleteBookAsync(name); mockGrpcClient.VerifyAll(); } @@ -9252,7 +9252,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); DeleteBookRequest request = new DeleteBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Empty expectedResponse = new Empty(); mockGrpcClient.Setup(x => x.DeleteBook(request, It.IsAny())) @@ -9272,7 +9272,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); DeleteBookRequest request = new DeleteBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Empty expectedResponse = new Empty(); mockGrpcClient.Setup(x => x.DeleteBookAsync(request, It.IsAny())) @@ -9292,12 +9292,12 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookRequest expectedRequest = new UpdateBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Book = new Book(), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9306,7 +9306,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.UpdateBook(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Book book = new Book(); Book response = client.UpdateBook(name, book); Assert.Same(expectedResponse, response); @@ -9323,12 +9323,12 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookRequest expectedRequest = new UpdateBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Book = new Book(), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9337,7 +9337,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.UpdateBookAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); Book book = new Book(); Book response = await client.UpdateBookAsync(name, book); Assert.Same(expectedResponse, response); @@ -9354,7 +9354,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookRequest expectedRequest = new UpdateBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OptionalFoo = "optionalFoo1822578535", Book = new Book(), UpdateMask = new FieldMask(), @@ -9362,7 +9362,7 @@ namespace Google.Example.Library.V1.Tests }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9371,7 +9371,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.UpdateBook(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string optionalFoo = "optionalFoo1822578535"; Book book = new Book(); FieldMask updateMask = new FieldMask(); @@ -9391,7 +9391,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookRequest expectedRequest = new UpdateBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OptionalFoo = "optionalFoo1822578535", Book = new Book(), UpdateMask = new FieldMask(), @@ -9399,7 +9399,7 @@ namespace Google.Example.Library.V1.Tests }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9408,7 +9408,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.UpdateBookAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string optionalFoo = "optionalFoo1822578535"; Book book = new Book(); FieldMask updateMask = new FieldMask(); @@ -9428,12 +9428,12 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookRequest request = new UpdateBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Book = new Book(), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9457,12 +9457,12 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookRequest request = new UpdateBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Book = new Book(), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9486,12 +9486,12 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); MoveBookRequest expectedRequest = new MoveBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OtherShelfNameAsShelfName = new ShelfName("[SHELF]"), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9500,7 +9500,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.MoveBook(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); ShelfName otherShelfName = new ShelfName("[SHELF]"); Book response = client.MoveBook(name, otherShelfName); Assert.Same(expectedResponse, response); @@ -9517,12 +9517,12 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); MoveBookRequest expectedRequest = new MoveBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OtherShelfNameAsShelfName = new ShelfName("[SHELF]"), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9531,7 +9531,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.MoveBookAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); ShelfName otherShelfName = new ShelfName("[SHELF]"); Book response = await client.MoveBookAsync(name, otherShelfName); Assert.Same(expectedResponse, response); @@ -9548,12 +9548,12 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); MoveBookRequest request = new MoveBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OtherShelfNameAsShelfName = new ShelfName("[SHELF]"), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9577,12 +9577,12 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); MoveBookRequest request = new MoveBookRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OtherShelfNameAsShelfName = new ShelfName("[SHELF]"), }; Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9606,7 +9606,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); AddCommentsRequest expectedRequest = new AddCommentsRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Comments = { new Comment @@ -9621,7 +9621,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.AddComments(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); IEnumerable comments = new[] { new Comment @@ -9645,7 +9645,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); AddCommentsRequest expectedRequest = new AddCommentsRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Comments = { new Comment @@ -9660,7 +9660,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.AddCommentsAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); IEnumerable comments = new[] { new Comment @@ -9684,7 +9684,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); AddCommentsRequest request = new AddCommentsRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Comments = { new Comment @@ -9713,7 +9713,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); AddCommentsRequest request = new AddCommentsRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Comments = { new Comment @@ -9858,14 +9858,14 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookFromAnywhereRequest expectedRequest = new GetBookFromAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - AltBookNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + AltBookNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), PlaceAsLocationName = new LocationName("[PROJECT]", "[LOCATION]"), FolderAsFolderName = new FolderName("[FOLDER]"), }; BookFromAnywhere expectedResponse = new BookFromAnywhere { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9873,8 +9873,8 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.GetBookFromAnywhere(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof altBookName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof altBookName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); LocationName place = new LocationName("[PROJECT]", "[LOCATION]"); FolderName folder = new FolderName("[FOLDER]"); BookFromAnywhere response = client.GetBookFromAnywhere(name, altBookName, place, folder); @@ -9892,14 +9892,14 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookFromAnywhereRequest expectedRequest = new GetBookFromAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - AltBookNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + AltBookNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), PlaceAsLocationName = new LocationName("[PROJECT]", "[LOCATION]"), FolderAsFolderName = new FolderName("[FOLDER]"), }; BookFromAnywhere expectedResponse = new BookFromAnywhere { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9907,8 +9907,8 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.GetBookFromAnywhereAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof altBookName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof altBookName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); LocationName place = new LocationName("[PROJECT]", "[LOCATION]"); FolderName folder = new FolderName("[FOLDER]"); BookFromAnywhere response = await client.GetBookFromAnywhereAsync(name, altBookName, place, folder); @@ -9926,14 +9926,14 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookFromAnywhereRequest request = new GetBookFromAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - AltBookNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + AltBookNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), PlaceAsLocationName = new LocationName("[PROJECT]", "[LOCATION]"), FolderAsFolderName = new FolderName("[FOLDER]"), }; BookFromAnywhere expectedResponse = new BookFromAnywhere { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9956,14 +9956,14 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookFromAnywhereRequest request = new GetBookFromAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - AltBookNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + AltBookNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), PlaceAsLocationName = new LocationName("[PROJECT]", "[LOCATION]"), FolderAsFolderName = new FolderName("[FOLDER]"), }; BookFromAnywhere expectedResponse = new BookFromAnywhere { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9986,11 +9986,11 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookFromAbsolutelyAnywhereRequest expectedRequest = new GetBookFromAbsolutelyAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; BookFromAnywhere expectedResponse = new BookFromAnywhere { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -9998,7 +9998,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.GetBookFromAbsolutelyAnywhere(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); BookFromAnywhere response = client.GetBookFromAbsolutelyAnywhere(name); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); @@ -10014,11 +10014,11 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookFromAbsolutelyAnywhereRequest expectedRequest = new GetBookFromAbsolutelyAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; BookFromAnywhere expectedResponse = new BookFromAnywhere { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -10026,7 +10026,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.GetBookFromAbsolutelyAnywhereAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); BookFromAnywhere response = await client.GetBookFromAbsolutelyAnywhereAsync(name); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); @@ -10042,11 +10042,11 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookFromAbsolutelyAnywhereRequest request = new GetBookFromAbsolutelyAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; BookFromAnywhere expectedResponse = new BookFromAnywhere { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -10069,11 +10069,11 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); GetBookFromAbsolutelyAnywhereRequest request = new GetBookFromAbsolutelyAnywhereRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; BookFromAnywhere expectedResponse = new BookFromAnywhere { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -10096,7 +10096,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookIndexRequest expectedRequest = new UpdateBookIndexRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), IndexName = "default index", IndexMap = { @@ -10107,7 +10107,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.UpdateBookIndex(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string indexName = "default index"; IDictionary indexMap = new Dictionary { @@ -10127,7 +10127,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookIndexRequest expectedRequest = new UpdateBookIndexRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), IndexName = "default index", IndexMap = { @@ -10138,7 +10138,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.UpdateBookIndexAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string indexName = "default index"; IDictionary indexMap = new Dictionary { @@ -10158,7 +10158,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookIndexRequest request = new UpdateBookIndexRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), IndexName = "default index", IndexMap = { @@ -10183,7 +10183,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); UpdateBookIndexRequest request = new UpdateBookIndexRequest { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), IndexName = "default index", IndexMap = { @@ -10255,8 +10255,8 @@ namespace Google.Example.Library.V1.Tests RequiredSingularString = "requiredSingularString-1949894503", RequiredSingularBytes = ByteString.CopyFromUtf8("-29"), RequiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(), - RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), RequiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002", RequiredSingularFixed32 = 720656715, RequiredSingularFixed64 = 720656810, @@ -10316,8 +10316,8 @@ namespace Google.Example.Library.V1.Tests OptionalSingularString = "optionalSingularString1852995162", OptionalSingularBytes = ByteString.CopyFromUtf8("2"), OptionalSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(), - OptionalSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - OptionalSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + OptionalSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + OptionalSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OptionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657", OptionalSingularFixed32 = 1648847958, OptionalSingularFixed64 = 1648847863, @@ -10382,8 +10382,8 @@ namespace Google.Example.Library.V1.Tests string requiredSingularString = "requiredSingularString-1949894503"; ByteString requiredSingularBytes = ByteString.CopyFromUtf8("-29"); TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage requiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(); - BookNameOneof requiredSingularResourceName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof requiredSingularResourceNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof requiredSingularResourceName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof requiredSingularResourceNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string requiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002"; int requiredSingularFixed32 = 720656715; long requiredSingularFixed64 = 720656810; @@ -10443,8 +10443,8 @@ namespace Google.Example.Library.V1.Tests string optionalSingularString = "optionalSingularString1852995162"; ByteString optionalSingularBytes = ByteString.CopyFromUtf8("2"); TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage optionalSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(); - BookNameOneof optionalSingularResourceName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof optionalSingularResourceNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof optionalSingularResourceName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof optionalSingularResourceNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string optionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657"; int optionalSingularFixed32 = 1648847958; long optionalSingularFixed64 = 1648847863; @@ -10519,8 +10519,8 @@ namespace Google.Example.Library.V1.Tests RequiredSingularString = "requiredSingularString-1949894503", RequiredSingularBytes = ByteString.CopyFromUtf8("-29"), RequiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(), - RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), RequiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002", RequiredSingularFixed32 = 720656715, RequiredSingularFixed64 = 720656810, @@ -10580,8 +10580,8 @@ namespace Google.Example.Library.V1.Tests OptionalSingularString = "optionalSingularString1852995162", OptionalSingularBytes = ByteString.CopyFromUtf8("2"), OptionalSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(), - OptionalSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - OptionalSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + OptionalSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + OptionalSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), OptionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657", OptionalSingularFixed32 = 1648847958, OptionalSingularFixed64 = 1648847863, @@ -10646,8 +10646,8 @@ namespace Google.Example.Library.V1.Tests string requiredSingularString = "requiredSingularString-1949894503"; ByteString requiredSingularBytes = ByteString.CopyFromUtf8("-29"); TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage requiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(); - BookNameOneof requiredSingularResourceName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof requiredSingularResourceNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof requiredSingularResourceName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof requiredSingularResourceNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string requiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002"; int requiredSingularFixed32 = 720656715; long requiredSingularFixed64 = 720656810; @@ -10707,8 +10707,8 @@ namespace Google.Example.Library.V1.Tests string optionalSingularString = "optionalSingularString1852995162"; ByteString optionalSingularBytes = ByteString.CopyFromUtf8("2"); TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage optionalSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(); - BookNameOneof optionalSingularResourceName = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); - BookNameOneof optionalSingularResourceNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof optionalSingularResourceName = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); + BookNameOneof optionalSingularResourceNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string optionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657"; int optionalSingularFixed32 = 1648847958; long optionalSingularFixed64 = 1648847863; @@ -10783,8 +10783,8 @@ namespace Google.Example.Library.V1.Tests RequiredSingularString = "requiredSingularString-1949894503", RequiredSingularBytes = ByteString.CopyFromUtf8("-29"), RequiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(), - RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), RequiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002", RequiredSingularFixed32 = 720656715, RequiredSingularFixed64 = 720656810, @@ -10864,8 +10864,8 @@ namespace Google.Example.Library.V1.Tests RequiredSingularString = "requiredSingularString-1949894503", RequiredSingularBytes = ByteString.CopyFromUtf8("-29"), RequiredSingularMessage = new TestOptionalRequiredFlatteningParamsRequest.Types.InnerMessage(), - RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), - RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + RequiredSingularResourceNameAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), + RequiredSingularResourceNameOneofAsBookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), RequiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002", RequiredSingularFixed32 = 720656715, RequiredSingularFixed64 = 720656810, @@ -11256,7 +11256,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); Book expectedRequest = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Rating = Book.Types.Rating.Good, @@ -11265,7 +11265,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.SaveBook(expectedRequest, It.IsAny())) .Returns(expectedResponse); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string author = "author-1406328437"; string title = "title110371416"; Book.Types.Rating rating = Book.Types.Rating.Good; @@ -11283,7 +11283,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); Book expectedRequest = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Rating = Book.Types.Rating.Good, @@ -11292,7 +11292,7 @@ namespace Google.Example.Library.V1.Tests mockGrpcClient.Setup(x => x.SaveBookAsync(expectedRequest, It.IsAny())) .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null)); LibraryServiceClient client = new LibraryServiceClientImpl(mockGrpcClient.Object, null); - BookNameOneof name = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")); + BookNameOneof name = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")); string author = "author-1406328437"; string title = "title110371416"; Book.Types.Rating rating = Book.Types.Rating.Good; @@ -11310,7 +11310,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); Book request = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Empty expectedResponse = new Empty(); mockGrpcClient.Setup(x => x.SaveBook(request, It.IsAny())) @@ -11330,7 +11330,7 @@ namespace Google.Example.Library.V1.Tests .Returns(new Mock().Object); Book request = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), }; Empty expectedResponse = new Empty(); mockGrpcClient.Setup(x => x.SaveBookAsync(request, It.IsAny())) @@ -11351,7 +11351,7 @@ namespace Google.Example.Library.V1.Tests ListShelvesRequest expectedRequest = new ListShelvesRequest(); Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -11377,7 +11377,7 @@ namespace Google.Example.Library.V1.Tests ListShelvesRequest expectedRequest = new ListShelvesRequest(); Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -11403,7 +11403,7 @@ namespace Google.Example.Library.V1.Tests ListShelvesRequest request = new ListShelvesRequest(); Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -11428,7 +11428,7 @@ namespace Google.Example.Library.V1.Tests ListShelvesRequest request = new ListShelvesRequest(); Book expectedResponse = new Book { - BookNameOneof = BookNameOneof.From(new BookName("[SHELF]", "[BOOK]")), + BookNameOneof = BookNameOneof.From(new BookFromArchiveName("[ARCHIVE]", "[BOOK]")), Author = "author-1406328437", Title = "title110371416", Read = true, @@ -17046,7 +17046,8 @@ namespace Google.Example.Library.V1 /// /// Test server streaming - /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option. + /// gRPC streaming methods don't have an HTTP equivalent and don't need to + /// have the google.api.http option. /// /// /// The request object containing all of the parameters for the API call. @@ -17073,7 +17074,8 @@ namespace Google.Example.Library.V1 /// /// Test server streaming, non-paged responses. - /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option. + /// gRPC streaming methods don't have an HTTP equivalent and don't need to + /// have the google.api.http option. /// /// /// The name of the shelf whose books we'd like to list. @@ -17095,7 +17097,8 @@ namespace Google.Example.Library.V1 /// /// Test server streaming, non-paged responses. - /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option. + /// gRPC streaming methods don't have an HTTP equivalent and don't need to + /// have the google.api.http option. /// /// /// The request object containing all of the parameters for the API call. @@ -24746,8 +24749,9 @@ namespace Google.Example.Library.V1 } /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The resource name of the book. @@ -24785,8 +24789,9 @@ namespace Google.Example.Library.V1 callSettings); /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The resource name of the book. @@ -24821,8 +24826,9 @@ namespace Google.Example.Library.V1 gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The resource name of the book. @@ -24857,8 +24863,9 @@ namespace Google.Example.Library.V1 callSettings); /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The resource name of the book. @@ -24896,8 +24903,9 @@ namespace Google.Example.Library.V1 callSettings); /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The resource name of the book. @@ -24932,8 +24940,9 @@ namespace Google.Example.Library.V1 gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The resource name of the book. @@ -24968,8 +24977,9 @@ namespace Google.Example.Library.V1 callSettings); /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The request object containing all of the parameters for the API call. @@ -24988,8 +24998,9 @@ namespace Google.Example.Library.V1 } /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The request object containing all of the parameters for the API call. @@ -25007,8 +25018,9 @@ namespace Google.Example.Library.V1 gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The request object containing all of the parameters for the API call. @@ -26145,7 +26157,8 @@ namespace Google.Example.Library.V1 /// /// Test server streaming - /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option. + /// gRPC streaming methods don't have an HTTP equivalent and don't need to + /// have the google.api.http option. /// /// /// The request object containing all of the parameters for the API call. @@ -26184,7 +26197,8 @@ namespace Google.Example.Library.V1 /// /// Test server streaming, non-paged responses. - /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option. + /// gRPC streaming methods don't have an HTTP equivalent and don't need to + /// have the google.api.http option. /// /// /// The request object containing all of the parameters for the API call. @@ -26777,8 +26791,9 @@ namespace Google.Example.Library.V1 } /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The request object containing all of the parameters for the API call. @@ -26798,8 +26813,9 @@ namespace Google.Example.Library.V1 } /// - /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. - /// New APIs should always create a separate message for a request. + /// Test using resource messages as request objects. Only used by PubSub + /// (CreateSubscription) for historical reasons. New APIs should always create + /// a separate message for a request. /// /// /// The request object containing all of the parameters for the API call. @@ -27786,105 +27802,6 @@ namespace Google.Example.Library.V1 public static bool operator !=(ArchivedBookName a, ArchivedBookName b) => !(a == b); } - /// - /// Resource name for the 'book' resource. - /// - public sealed partial class BookName : gax::IResourceName, sys::IEquatable - { - private static readonly gax::PathTemplate s_template = new gax::PathTemplate("shelves/{shelf}/books/{book}"); - - /// - /// Parses the given book resource name in string form into a new - /// instance. - /// - /// The book resource name in string form. Must not be null. - /// The parsed if successful. - public static BookName Parse(string bookName) - { - gax::GaxPreconditions.CheckNotNull(bookName, nameof(bookName)); - gax::TemplatedResourceName resourceName = s_template.ParseName(bookName); - return new BookName(resourceName[0], resourceName[1]); - } - - /// - /// Tries to parse the given book resource name in string form into a new - /// instance. - /// - /// - /// This method still throws if is null, - /// as this would usually indicate a programming error rather than a data error. - /// - /// The book resource name in string form. Must not be null. - /// When this method returns, the parsed , - /// or null if parsing fails. - /// true if the name was parsed successfully; false otherwise. - public static bool TryParse(string bookName, out BookName result) - { - gax::GaxPreconditions.CheckNotNull(bookName, nameof(bookName)); - gax::TemplatedResourceName resourceName; - if (s_template.TryParseName(bookName, out resourceName)) - { - result = new BookName(resourceName[0], resourceName[1]); - return true; - } - else - { - result = null; - return false; - } - } - - /// Formats the IDs into the string representation of the . - /// The shelf ID. Must not be null. - /// The book ID. Must not be null. - /// The string representation of the . - public static string Format(string shelfId, string bookId) => - s_template.Expand(gax::GaxPreconditions.CheckNotNull(shelfId, nameof(shelfId)), gax::GaxPreconditions.CheckNotNull(bookId, nameof(bookId))); - - /// - /// Constructs a new instance of the resource name class - /// from its component parts. - /// - /// The shelf ID. Must not be null. - /// The book ID. Must not be null. - public BookName(string shelfId, string bookId) - { - ShelfId = gax::GaxPreconditions.CheckNotNull(shelfId, nameof(shelfId)); - BookId = gax::GaxPreconditions.CheckNotNull(bookId, nameof(bookId)); - } - - /// - /// The shelf ID. Never null. - /// - public string ShelfId { get; } - - /// - /// The book ID. Never null. - /// - public string BookId { get; } - - /// - public gax::ResourceNameKind Kind => gax::ResourceNameKind.Simple; - - /// - public override string ToString() => s_template.Expand(ShelfId, BookId); - - /// - public override int GetHashCode() => ToString().GetHashCode(); - - /// - public override bool Equals(object obj) => Equals(obj as BookName); - - /// - public bool Equals(BookName other) => ToString() == other?.ToString(); - - /// - public static bool operator ==(BookName a, BookName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); - - /// - public static bool operator !=(BookName a, BookName b) => !(a == b); - } - /// /// Resource name for the 'book_from_archive' resource. /// @@ -27990,7 +27907,6 @@ namespace Google.Example.Library.V1 /// /// This resource name will contain one of the following: /// - /// BookName: A resource of type 'book'. /// BookFromArchiveName: A resource of type 'book_from_archive'. /// ProjectBookName: A resource of type 'project_book'. /// @@ -28007,20 +27923,15 @@ namespace Google.Example.Library.V1 /// Unknown = 0, - /// - /// A resource of type 'book'. - /// - BookName = 1, - /// /// A resource of type 'book_from_archive'. /// - BookFromArchiveName = 2, + BookFromArchiveName = 1, /// /// A resource of type 'project_book'. /// - ProjectBookName = 3, + ProjectBookName = 2, } /// @@ -28029,7 +27940,6 @@ namespace Google.Example.Library.V1 /// /// To parse successfully the resource name must be one of the following: /// - /// BookName: A resource of type 'book'. /// BookFromArchiveName: A resource of type 'book_from_archive'. /// ProjectBookName: A resource of type 'project_book'. /// @@ -28056,7 +27966,6 @@ namespace Google.Example.Library.V1 /// /// To parse successfully the resource name must be one of the following: /// - /// BookName: A resource of type 'book'. /// BookFromArchiveName: A resource of type 'book_from_archive'. /// ProjectBookName: A resource of type 'project_book'. /// @@ -28071,12 +27980,6 @@ namespace Google.Example.Library.V1 public static bool TryParse(string name, bool allowUnknown, out BookNameOneof result) { gax::GaxPreconditions.CheckNotNull(name, nameof(name)); - BookName bookName; - if (BookName.TryParse(name, out bookName)) - { - result = new BookNameOneof(OneofType.BookName, bookName); - return true; - } BookFromArchiveName bookFromArchiveName; if (BookFromArchiveName.TryParse(name, out bookFromArchiveName)) { @@ -28102,14 +28005,6 @@ namespace Google.Example.Library.V1 return false; } - /// - /// Construct a new instance of from the provided - /// - /// The to be contained within - /// the returned . Must not be null. - /// A new , containing . - public static BookNameOneof From(BookName bookName) => new BookNameOneof(OneofType.BookName, bookName); - /// /// Construct a new instance of from the provided /// @@ -28131,7 +28026,6 @@ namespace Google.Example.Library.V1 switch (type) { case OneofType.Unknown: return true; // Anything goes with Unknown. - case OneofType.BookName: return name is BookName; case OneofType.BookFromArchiveName: return name is BookFromArchiveName; case OneofType.ProjectBookName: return name is ProjectBookName; default: return false; @@ -28171,15 +28065,6 @@ namespace Google.Example.Library.V1 return (T)Name; } - /// - /// Get the contained as . - /// - /// - /// An will be thrown if this does not - /// contain an instance of . - /// - public BookName BookName => CheckAndReturn(OneofType.BookName); - /// /// Get the contained as . /// diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/go_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/go_library.baseline index 2d63ee0e8c..62c8283e5a 100644 --- a/src/test/java/com/google/api/codegen/protoannotations/testdata/go_library.baseline +++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/go_library.baseline @@ -56,7 +56,7 @@ func TestLibClientSmoke(t *testing.T) { t.Fatal(err) } - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "testShelf-" + strconv.FormatInt(time.Now().UnixNano(), 10) + "", projectId) + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", projectId) var rating librarypb.Book_Rating = librarypb.Book_GOOD var book = &librarypb.Book{ Rating: rating, @@ -743,7 +743,8 @@ func (c *LibClient) UpdateBookIndex(ctx context.Context, req *librarypb.UpdateBo } // StreamShelves test server streaming -// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option. +// gRPC streaming methods don't have an HTTP equivalent and don't need to +// have the google.api.http option. func (c *LibClient) StreamShelves(ctx context.Context, req *librarypb.StreamShelvesRequest, opts ...gax.CallOption) (librarypb.LibraryService_StreamShelvesClient, error) { ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append(c.CallOptions.StreamShelves[0:len(c.CallOptions.StreamShelves):len(c.CallOptions.StreamShelves)], opts...) @@ -760,7 +761,8 @@ func (c *LibClient) StreamShelves(ctx context.Context, req *librarypb.StreamShel } // StreamBooks test server streaming, non-paged responses. -// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option. +// gRPC streaming methods don't have an HTTP equivalent and don't need to +// have the google.api.http option. func (c *LibClient) StreamBooks(ctx context.Context, req *librarypb.StreamBooksRequest, opts ...gax.CallOption) (librarypb.LibraryService_StreamBooksClient, error) { ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append(c.CallOptions.StreamBooks[0:len(c.CallOptions.StreamBooks):len(c.CallOptions.StreamBooks)], opts...) @@ -808,8 +810,10 @@ func (c *LibClient) MonologAboutBook(ctx context.Context, opts ...gax.CallOption return resp, nil } -// BabbleAboutBook test samplegen response handling when a client streaming method returns Empty. -// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option. +// BabbleAboutBook test samplegen response handling when a client streaming method returns +// Empty. +// gRPC streaming methods don't have an HTTP equivalent and don't need to +// have the google.api.http option. func (c *LibClient) BabbleAboutBook(ctx context.Context, opts ...gax.CallOption) (librarypb.LibraryService_BabbleAboutBookClient, error) { ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append(c.CallOptions.BabbleAboutBook[0:len(c.CallOptions.BabbleAboutBook):len(c.CallOptions.BabbleAboutBook)], opts...) @@ -1020,8 +1024,9 @@ func (c *LibClient) StreamingArchiveBooks(ctx context.Context, opts ...gax.CallO return resp, nil } -// SaveBook test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons. -// New APIs should always create a separate message for a request. +// SaveBook test using resource messages as request objects. Only used by PubSub +// (CreateSubscription) for historical reasons. New APIs should always create +// a separate message for a request. func (c *LibClient) SaveBook(ctx context.Context, req *librarypb.Book, opts ...gax.CallOption) error { ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append(c.CallOptions.SaveBook[0:len(c.CallOptions.SaveBook):len(c.CallOptions.SaveBook)], opts...) @@ -3200,7 +3205,7 @@ func TestLibraryServiceGetBook(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.GetBookRequest{ Name: formattedName, } @@ -3229,7 +3234,7 @@ func TestLibraryServiceGetBookError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.GetBookRequest{ Name: formattedName, } @@ -3332,7 +3337,7 @@ func TestLibraryServiceDeleteBook(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.DeleteBookRequest{ Name: formattedName, } @@ -3358,7 +3363,7 @@ func TestLibraryServiceDeleteBookError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.DeleteBookRequest{ Name: formattedName, } @@ -3395,7 +3400,7 @@ func TestLibraryServiceUpdateBook(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var book *librarypb.Book = &librarypb.Book{} var request = &librarypb.UpdateBookRequest{ Name: formattedName, @@ -3426,7 +3431,7 @@ func TestLibraryServiceUpdateBookError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var book *librarypb.Book = &librarypb.Book{} var request = &librarypb.UpdateBookRequest{ Name: formattedName, @@ -3466,7 +3471,7 @@ func TestLibraryServiceMoveBook(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var formattedOtherShelfName string = fmt.Sprintf("shelves/%s", "[SHELF]") var request = &librarypb.MoveBookRequest{ Name: formattedName, @@ -3497,7 +3502,7 @@ func TestLibraryServiceMoveBookError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var formattedOtherShelfName string = fmt.Sprintf("shelves/%s", "[SHELF]") var request = &librarypb.MoveBookRequest{ Name: formattedName, @@ -3592,7 +3597,7 @@ func TestLibraryServiceAddComments(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var comment []byte = []byte("95") var stage librarypb.Comment_Stage = librarypb.Comment_UNSET var alignment librarypb.SomeMessage2_SomeMessage3_Alignment = librarypb.SomeMessage2_SomeMessage3_CHAR @@ -3628,7 +3633,7 @@ func TestLibraryServiceAddCommentsError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var comment []byte = []byte("95") var stage librarypb.Comment_Stage = librarypb.Comment_UNSET var alignment librarypb.SomeMessage2_SomeMessage3_Alignment = librarypb.SomeMessage2_SomeMessage3_CHAR @@ -3673,8 +3678,8 @@ func TestLibraryServiceGetBookFromAnywhere(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") - var formattedAltBookName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") + var formattedAltBookName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var formattedPlace string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") var formattedFolder string = fmt.Sprintf("folders/%s", "[FOLDER]") var request = &librarypb.GetBookFromAnywhereRequest{ @@ -3708,8 +3713,8 @@ func TestLibraryServiceGetBookFromAnywhereError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") - var formattedAltBookName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") + var formattedAltBookName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var formattedPlace string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") var formattedFolder string = fmt.Sprintf("folders/%s", "[FOLDER]") var request = &librarypb.GetBookFromAnywhereRequest{ @@ -3750,7 +3755,7 @@ func TestLibraryServiceGetBookFromAbsolutelyAnywhere(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.GetBookFromAbsolutelyAnywhereRequest{ Name: formattedName, } @@ -3779,7 +3784,7 @@ func TestLibraryServiceGetBookFromAbsolutelyAnywhereError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.GetBookFromAbsolutelyAnywhereRequest{ Name: formattedName, } @@ -3806,7 +3811,7 @@ func TestLibraryServiceUpdateBookIndex(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var indexName string = "default index" var indexMapItem string = "indexMapItem1918721251" var indexMap = map[string]string{ @@ -3839,7 +3844,7 @@ func TestLibraryServiceUpdateBookIndexError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var indexName string = "default index" var indexMapItem string = "indexMapItem1918721251" var indexMap = map[string]string{ @@ -4020,7 +4025,7 @@ func TestLibraryServiceDiscussBook(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.DiscussBookRequest{ Name: formattedName, } @@ -4059,7 +4064,7 @@ func TestLibraryServiceDiscussBookError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.DiscussBookRequest{ Name: formattedName, } @@ -4101,7 +4106,7 @@ func TestLibraryServiceMonologAboutBook(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.DiscussBookRequest{ Name: formattedName, } @@ -4137,7 +4142,7 @@ func TestLibraryServiceMonologAboutBookError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.DiscussBookRequest{ Name: formattedName, } @@ -4171,7 +4176,7 @@ func TestLibraryServiceBabbleAboutBook(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.DiscussBookRequest{ Name: formattedName, } @@ -4204,7 +4209,7 @@ func TestLibraryServiceBabbleAboutBookError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.DiscussBookRequest{ Name: formattedName, } @@ -4394,7 +4399,7 @@ func TestLibraryServiceGetBigBook(t *testing.T) { Result: &longrunningpb.Operation_Response{ Response: any }, }) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.GetBookRequest{ Name: formattedName, } @@ -4437,7 +4442,7 @@ func TestLibraryServiceGetBigBookError(t *testing.T) { }, }) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.GetBookRequest{ Name: formattedName, } @@ -4476,7 +4481,7 @@ func TestLibraryServiceGetBigNothing(t *testing.T) { Result: &longrunningpb.Operation_Response{ Response: any }, }) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.GetBookRequest{ Name: formattedName, } @@ -4516,7 +4521,7 @@ func TestLibraryServiceGetBigNothingError(t *testing.T) { }, }) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.GetBookRequest{ Name: formattedName, } @@ -4555,8 +4560,8 @@ func TestLibraryServiceTestOptionalRequiredFlatteningParams(t *testing.T) { var requiredSingularString string = "requiredSingularString-1949894503" var requiredSingularBytes []byte = []byte("-29") var requiredSingularMessage *librarypb.TestOptionalRequiredFlatteningParamsRequest_InnerMessage = &librarypb.TestOptionalRequiredFlatteningParamsRequest_InnerMessage{} - var formattedRequiredSingularResourceName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") - var formattedRequiredSingularResourceNameOneof string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedRequiredSingularResourceName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") + var formattedRequiredSingularResourceNameOneof string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var requiredSingularResourceNameCommon string = "requiredSingularResourceNameCommon-1126805002" var requiredSingularFixed32 int32 = 720656715 var requiredSingularFixed64 int64 = 720656810 @@ -4704,8 +4709,8 @@ func TestLibraryServiceTestOptionalRequiredFlatteningParamsError(t *testing.T) { var requiredSingularString string = "requiredSingularString-1949894503" var requiredSingularBytes []byte = []byte("-29") var requiredSingularMessage *librarypb.TestOptionalRequiredFlatteningParamsRequest_InnerMessage = &librarypb.TestOptionalRequiredFlatteningParamsRequest_InnerMessage{} - var formattedRequiredSingularResourceName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") - var formattedRequiredSingularResourceNameOneof string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedRequiredSingularResourceName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") + var formattedRequiredSingularResourceNameOneof string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var requiredSingularResourceNameCommon string = "requiredSingularResourceNameCommon-1126805002" var requiredSingularFixed32 int32 = 720656715 var requiredSingularFixed64 int64 = 720656810 @@ -5171,7 +5176,7 @@ func TestLibraryServiceSaveBook(t *testing.T) { mockLibrary.resps = append(mockLibrary.resps[:0], expectedResponse) - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.Book{ Name: formattedName, } @@ -5197,7 +5202,7 @@ func TestLibraryServiceSaveBookError(t *testing.T) { errCode := codes.PermissionDenied mockLibrary.err = gstatus.Error(errCode, "test error") - var formattedName string = fmt.Sprintf("shelves/%s/books/%s", "[SHELF]", "[BOOK]") + var formattedName string = fmt.Sprintf("archives/%s/books/%s", "[ARCHIVE]", "[BOOK]") var request = &librarypb.Book{ Name: formattedName, } diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library.baseline index 6c90595ee1..95a9aabfaf 100644 --- a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library.baseline +++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library.baseline @@ -248,7 +248,7 @@ public class BabbleAboutBookCallableCallableStreamingClientEmptyResponseTypeWith ApiStreamObserver requestObserver = libraryClient.babbleAboutBookCallable().clientStreamingCall(responseObserver); - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); DiscussBookRequest request = DiscussBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -324,7 +324,7 @@ public class BabbleAboutBookCallableCallableStreamingClientEmptyResponseTypeWith ApiStreamObserver requestObserver = libraryClient.babbleAboutBookCallable().clientStreamingCall(responseObserver); - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); DiscussBookRequest request = DiscussBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -732,7 +732,7 @@ public class FindRelatedBooksCallableCallableListOdyssey { /** Testing calling forms */ public static void sampleFindRelatedBooks() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); List names = Arrays.asList(namesElement); ShelfName shelvesElement = ShelfName.of("[SHELF]"); List shelves = Arrays.asList(shelvesElement); @@ -883,7 +883,7 @@ public class FindRelatedBooksPagedCallableCallablePagedOdyssey { /** Testing calling forms */ public static void sampleFindRelatedBooks() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); List names = Arrays.asList(namesElement); ShelfName shelvesElement = ShelfName.of("[SHELF]"); List shelves = Arrays.asList(shelvesElement); @@ -956,7 +956,7 @@ public class FindRelatedBooksRequestPagedOdyssey { /** Testing calling forms */ public static void sampleFindRelatedBooks() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); List names = Arrays.asList(namesElement); ShelfName shelvesElement = ShelfName.of("[SHELF]"); List shelves = Arrays.asList(shelvesElement); @@ -1037,7 +1037,7 @@ public class GetBigBookAsyncLongRunningFlattenedAsyncWap { /** Testing calling forms */ public static void sampleGetBigBook(String shelf) { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName(shelf, "War and Peace"); + BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]"); OperationFuture future = libraryClient.getBigBookAsync(name.toString()); System.out.println("Waiting for operation to complete..."); @@ -1144,7 +1144,7 @@ public class GetBigBookAsyncLongRunningFlattenedAsyncWap2 { */ public static void sampleGetBigBook(String shelf, String bigBookName) { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName(shelf, bigBookName); + BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]"); OperationFuture future = libraryClient.getBigBookAsync(name.toString()); System.out.println("Waiting for operation to complete..."); @@ -1239,7 +1239,7 @@ public class GetBigBookAsyncLongRunningRequestAsyncWap { /** Testing calling forms */ public static void sampleGetBigBook(String shelf) { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName(shelf, "War and Peace"); + BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -1351,7 +1351,7 @@ public class GetBigBookAsyncLongRunningRequestAsyncWap2 { */ public static void sampleGetBigBook(String shelf, String bigBookName) { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName(shelf, bigBookName); + BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -1447,7 +1447,7 @@ public class GetBigBookCallableCallableWap { /** Testing calling forms */ public static void sampleGetBigBook(String shelf) { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName(shelf, "War and Peace"); + BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -1558,7 +1558,7 @@ public class GetBigBookCallableCallableWap2 { */ public static void sampleGetBigBook(String shelf, String bigBookName) { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName(shelf, bigBookName); + BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -1657,7 +1657,7 @@ public class GetBigBookOperationCallableLongRunningCallableWap { /** Testing calling forms */ public static void sampleGetBigBook(String shelf) { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName(shelf, "War and Peace"); + BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -1770,7 +1770,7 @@ public class GetBigBookOperationCallableLongRunningCallableWap2 { */ public static void sampleGetBigBook(String shelf, String bigBookName) { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName(shelf, bigBookName); + BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -1853,7 +1853,7 @@ public class GetBigNothingAsyncLongRunningFlattenedAsyncEmptyResponseTypeWithRes /** Test response handling for methods that return empty */ public static void sampleGetBigNothing() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); OperationFuture future = libraryClient.getBigNothingAsync(name.toString()); System.out.println("Waiting for operation to complete..."); @@ -1915,7 +1915,7 @@ public class GetBigNothingAsyncLongRunningFlattenedAsyncEmptyResponseTypeWithout /** Test default response handling is turned off for methods that return empty */ public static void sampleGetBigNothing() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); OperationFuture future = libraryClient.getBigNothingAsync(name.toString()); System.out.println("Waiting for operation to complete..."); @@ -1977,7 +1977,7 @@ public class GetBigNothingAsyncLongRunningRequestAsyncEmptyResponseTypeWithRespo /** Test response handling for methods that return empty */ public static void sampleGetBigNothing() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -2044,7 +2044,7 @@ public class GetBigNothingAsyncLongRunningRequestAsyncEmptyResponseTypeWithoutRe /** Test default response handling is turned off for methods that return empty */ public static void sampleGetBigNothing() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -2107,7 +2107,7 @@ public class GetBigNothingCallableCallableEmptyResponseTypeWithResponseHandling /** Test response handling for methods that return empty */ public static void sampleGetBigNothing() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -2173,7 +2173,7 @@ public class GetBigNothingCallableCallableEmptyResponseTypeWithoutResponseHandli /** Test default response handling is turned off for methods that return empty */ public static void sampleGetBigNothing() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -2239,7 +2239,7 @@ public class GetBigNothingOperationCallableLongRunningCallableEmptyResponseTypeW /** Test response handling for methods that return empty */ public static void sampleGetBigNothing() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -2307,7 +2307,7 @@ public class GetBigNothingOperationCallableLongRunningCallableEmptyResponseTypeW /** Test default response handling is turned off for methods that return empty */ public static void sampleGetBigNothing() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -2372,7 +2372,7 @@ public class GetBookCallableCallableTestOnSuccessMap { public static void sampleGetBook() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -2437,7 +2437,7 @@ public class GetBookFlattenedTestOnSuccessMap { public static void sampleGetBook() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); Book response = libraryClient.getBook(name.toString()); String intKeyVal = response.getMapStringValueMap().get(123); String booleanKeyVal = response.getMapBoolKeyMap().get(true); @@ -2497,7 +2497,7 @@ public class GetBookRequestTestOnSuccessMap { public static void sampleGetBook() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -2582,7 +2582,7 @@ public class MonologAboutBookCallableCallableStreamingClientProg { ApiStreamObserver requestObserver = libraryClient.monologAboutBookCallable().clientStreamingCall(responseObserver); - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); DiscussBookRequest request = DiscussBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -3686,8 +3686,8 @@ public class TestFloatAndInt64 { String requiredSingularString = ""; ByteString requiredSingularBytes = ByteString.copyFromUtf8(""); TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build(); - BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); - BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); + BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); String requiredSingularResourceNameCommon = ""; int requiredSingularFixed32 = 0; long requiredSingularFixed64 = 0L; @@ -3878,7 +3878,7 @@ public class TestResourceNameOneof { public static void sampleGetBookFromAbsolutelyAnywhere() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("[SHELF]", "The ID of the book"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder() .setName(name.toString()) .build(); @@ -3935,7 +3935,7 @@ public class TestResourceNameOneof2 { public static void sampleGetBookFromAbsolutelyAnywhere() { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName("The Shelf to search for the book", "The ID of the book"); + BookName name = BookName.ofShelfBookOneBookTwoName("The Shelf to search for the book", "[BOOK_ONE]", "[BOOK_TWO]"); GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder() .setName(name.toString()) .build(); @@ -4081,7 +4081,7 @@ public class ThisTagShouldBeTheNameOfTheFile { /** Testing calling forms */ public static void sampleGetBigBook(String shelf) { try (LibraryClient libraryClient = LibraryClient.create()) { - BookName name = BookName.ofShelfBookName(shelf, "War and Peace"); + BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]"); GetBookRequest request = GetBookRequest.newBuilder() .setName(name.toString()) .build(); @@ -4196,7 +4196,7 @@ public class TuringProgCallableStreamingBidi { BidiStream bidiStream = libraryClient.discussBookCallable().call(); - BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]"); + BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]"); Path path = Paths.get("comment_file"); byte[] data = Files.readAllBytes(path); ByteString comment = ByteString.copyFrom(data); @@ -4418,7 +4418,7 @@ public class LibraryClient implements BackgroundResource { PathTemplate.createWithoutUrlEncoding("archives/{archive}/books/{book}"); private static final PathTemplate BOOK_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("shelves/{shelf}/books/{book}"); + PathTemplate.createWithoutUrlEncoding("shelves/{shelf}/books/{book_one}~{book_two}"); private static final PathTemplate BOOK_FROM_ARCHIVE_PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("archives/{archive}/books/{book}"); @@ -4479,10 +4479,11 @@ public class LibraryClient implements BackgroundResource { * @deprecated Use the {@link BookName} class instead. */ @Deprecated - public static final String formatBookName(String shelf, String book) { + public static final String formatBookName(String shelf, String bookOne, String bookTwo) { return BOOK_PATH_TEMPLATE.instantiate( "shelf", shelf, - "book", book); + "book_one", bookOne, + "book_two", bookTwo); } /** @@ -4646,14 +4647,25 @@ public class LibraryClient implements BackgroundResource { } /** - * Parses the book from the given fully-qualified path which + * Parses the book_one from the given fully-qualified path which + * represents a book resource. + * + * @deprecated Use the {@link BookName} class instead. + */ + @Deprecated + public static final String parseBookOneFromBookName(String bookName) { + return BOOK_PATH_TEMPLATE.parse(bookName).get("book_one"); + } + + /** + * Parses the book_two from the given fully-qualified path which * represents a book resource. * * @deprecated Use the {@link BookName} class instead. */ @Deprecated - public static final String parseBookFromBookName(String bookName) { - return BOOK_PATH_TEMPLATE.parse(bookName).get("book"); + public static final String parseBookTwoFromBookName(String bookName) { + return BOOK_PATH_TEMPLATE.parse(bookName).get("book_two"); } /** @@ -5701,7 +5713,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryClient.getBook(name);
    * }
    * 
@@ -5724,7 +5736,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryClient.getBook(name.toString());
    * }
    * 
@@ -5747,7 +5759,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -5769,7 +5781,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -5930,7 +5942,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryClient.deleteBook(name);
    * }
    * 
@@ -5953,7 +5965,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryClient.deleteBook(name.toString());
    * }
    * 
@@ -5976,7 +5988,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DeleteBookRequest request = DeleteBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -5998,7 +6010,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DeleteBookRequest request = DeleteBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -6019,7 +6031,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   Book response = libraryClient.updateBook(name, book);
    * }
@@ -6045,7 +6057,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   Book response = libraryClient.updateBook(name.toString(), book);
    * }
@@ -6071,7 +6083,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalFoo = "";
    *   Book book = Book.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -6106,7 +6118,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalFoo = "";
    *   Book book = Book.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -6141,7 +6153,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   UpdateBookRequest request = UpdateBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -6165,7 +6177,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   UpdateBookRequest request = UpdateBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -6188,7 +6200,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   Book response = libraryClient.moveBook(name, otherShelfName);
    * }
@@ -6214,7 +6226,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   Book response = libraryClient.moveBook(name.toString(), otherShelfName.toString());
    * }
@@ -6240,7 +6252,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   MoveBookRequest request = MoveBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -6264,7 +6276,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   MoveBookRequest request = MoveBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -6427,7 +6439,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ByteString comment = ByteString.copyFromUtf8("");
    *   Comment.Stage stage = Comment.Stage.UNSET;
    *   SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -6461,7 +6473,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ByteString comment = ByteString.copyFromUtf8("");
    *   Comment.Stage stage = Comment.Stage.UNSET;
    *   SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -6495,7 +6507,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ByteString comment = ByteString.copyFromUtf8("");
    *   Comment.Stage stage = Comment.Stage.UNSET;
    *   SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -6527,7 +6539,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ByteString comment = ByteString.copyFromUtf8("");
    *   Comment.Stage stage = Comment.Stage.UNSET;
    *   SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -6657,8 +6669,8 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   BookFromAnywhere response = libraryClient.getBookFromAnywhere(name, altBookName, place, folder);
@@ -6690,8 +6702,8 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   BookFromAnywhere response = libraryClient.getBookFromAnywhere(name.toString(), altBookName.toString(), place.toString(), folder.toString());
@@ -6723,8 +6735,8 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   GetBookFromAnywhereRequest request = GetBookFromAnywhereRequest.newBuilder()
@@ -6751,8 +6763,8 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   GetBookFromAnywhereRequest request = GetBookFromAnywhereRequest.newBuilder()
@@ -6778,7 +6790,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   BookFromAnywhere response = libraryClient.getBookFromAbsolutelyAnywhere(name);
    * }
    * 
@@ -6801,7 +6813,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   BookFromAnywhere response = libraryClient.getBookFromAbsolutelyAnywhere(name.toString());
    * }
    * 
@@ -6824,7 +6836,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -6846,7 +6858,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -6867,7 +6879,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "default index";
    *   String indexMapItem = "";
    *   Map<String, String> indexMap = new HashMap<>();
@@ -6898,7 +6910,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "default index";
    *   String indexMapItem = "";
    *   Map<String, String> indexMap = new HashMap<>();
@@ -6929,7 +6941,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "default index";
    *   String indexMapItem = "";
    *   Map<String, String> indexMap = new HashMap<>();
@@ -6957,7 +6969,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "default index";
    *   String indexMapItem = "";
    *   Map<String, String> indexMap = new HashMap<>();
@@ -6980,7 +6992,8 @@ public class LibraryClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7004,7 +7017,8 @@ public class LibraryClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming, non-paged responses.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7035,7 +7049,7 @@ public class LibraryClient implements BackgroundResource {
    *   BidiStream<DiscussBookRequest, Comment> bidiStream =
    *       libraryClient.discussBookCallable().call();
    *
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DiscussBookRequest request = DiscussBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7077,7 +7091,7 @@ public class LibraryClient implements BackgroundResource {
    *   ApiStreamObserver<DiscussBookRequest> requestObserver =
    *       libraryClient.monologAboutBookCallable().clientStreamingCall(responseObserver);
    *
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DiscussBookRequest request = DiscussBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7091,8 +7105,10 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test samplegen response handling when a client streaming method returns Empty.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * Test samplegen response handling when a client streaming method returns
+   * Empty.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7117,7 +7133,7 @@ public class LibraryClient implements BackgroundResource {
    *   ApiStreamObserver<DiscussBookRequest> requestObserver =
    *       libraryClient.babbleAboutBookCallable().clientStreamingCall(responseObserver);
    *
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DiscussBookRequest request = DiscussBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7165,7 +7181,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<BookName> names = Arrays.asList(namesElement);
    *   List<ShelfName> shelves = new ArrayList<>();
    *   FindRelatedBooksRequest request = FindRelatedBooksRequest.newBuilder()
@@ -7193,7 +7209,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<BookName> names = Arrays.asList(namesElement);
    *   List<ShelfName> shelves = new ArrayList<>();
    *   FindRelatedBooksRequest request = FindRelatedBooksRequest.newBuilder()
@@ -7219,7 +7235,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<BookName> names = Arrays.asList(namesElement);
    *   List<ShelfName> shelves = new ArrayList<>();
    *   FindRelatedBooksRequest request = FindRelatedBooksRequest.newBuilder()
@@ -7301,7 +7317,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryClient.getBigBookAsync(name).get();
    * }
    * 
@@ -7325,7 +7341,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryClient.getBigBookAsync(name.toString()).get();
    * }
    * 
@@ -7349,7 +7365,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7372,7 +7388,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7394,7 +7410,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7415,7 +7431,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryClient.getBigNothingAsync(name).get();
    * }
    * 
@@ -7439,7 +7455,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryClient.getBigNothingAsync(name.toString()).get();
    * }
    * 
@@ -7463,7 +7479,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7486,7 +7502,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7508,7 +7524,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7557,8 +7573,8 @@ public class LibraryClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -7618,8 +7634,8 @@ public class LibraryClient implements BackgroundResource {
    *   String optionalSingularString = "";
    *   ByteString optionalSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalSingularResourceNameCommon = "";
    *   int optionalSingularFixed32 = 0;
    *   long optionalSingularFixed64 = 0L;
@@ -7943,8 +7959,8 @@ public class LibraryClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -8004,8 +8020,8 @@ public class LibraryClient implements BackgroundResource {
    *   String optionalSingularString = "";
    *   ByteString optionalSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalSingularResourceNameCommon = "";
    *   int optionalSingularFixed32 = 0;
    *   long optionalSingularFixed64 = 0L;
@@ -8329,8 +8345,8 @@ public class LibraryClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -8471,8 +8487,8 @@ public class LibraryClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -9685,13 +9701,14 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String author = "";
    *   String title = "";
    *   Book.Rating rating = Book.Rating.GOOD;
@@ -9720,13 +9737,14 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String author = "";
    *   String title = "";
    *   Book.Rating rating = Book.Rating.GOOD;
@@ -9755,13 +9773,14 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book request = Book.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -9778,13 +9797,14 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book request = Book.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -16029,7 +16049,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void createBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16143,7 +16163,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16157,7 +16177,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     Book actualResponse =
         client.getBook(name);
@@ -16181,7 +16201,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBook(name);
       Assert.fail("No exception raised");
@@ -16246,7 +16266,7 @@ public class LibraryClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     client.deleteBook(name);
 
@@ -16268,7 +16288,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.deleteBook(name);
       Assert.fail("No exception raised");
@@ -16280,7 +16300,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void updateBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16294,7 +16314,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     Book book = Book.newBuilder().build();
 
     Book actualResponse =
@@ -16320,7 +16340,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       Book book = Book.newBuilder().build();
 
       client.updateBook(name, book);
@@ -16333,7 +16353,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void updateBookTest2() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16347,7 +16367,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String optionalFoo = "optionalFoo1822578535";
     Book book = Book.newBuilder().build();
     FieldMask updateMask = FieldMask.newBuilder().build();
@@ -16379,7 +16399,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String optionalFoo = "optionalFoo1822578535";
       Book book = Book.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
@@ -16395,7 +16415,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void moveBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16409,7 +16429,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     ShelfName otherShelfName = ShelfName.of("[SHELF]");
 
     Book actualResponse =
@@ -16435,7 +16455,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       ShelfName otherShelfName = ShelfName.of("[SHELF]");
 
       client.moveBook(name, otherShelfName);
@@ -16548,7 +16568,7 @@ public class LibraryClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     ByteString comment = ByteString.copyFromUtf8("95");
     Comment.Stage stage = Comment.Stage.UNSET;
     SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -16580,7 +16600,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       ByteString comment = ByteString.copyFromUtf8("95");
       Comment.Stage stage = Comment.Stage.UNSET;
       SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -16652,7 +16672,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBookFromAnywhereTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16664,8 +16684,8 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-    BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+    BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
     FolderName folder = FolderName.of("[FOLDER]");
 
@@ -16694,8 +16714,8 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
       FolderName folder = FolderName.of("[FOLDER]");
 
@@ -16709,7 +16729,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBookFromAbsolutelyAnywhereTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16721,7 +16741,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     BookFromAnywhere actualResponse =
         client.getBookFromAbsolutelyAnywhere(name);
@@ -16745,7 +16765,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBookFromAbsolutelyAnywhere(name);
       Assert.fail("No exception raised");
@@ -16760,7 +16780,7 @@ public class LibraryClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String indexName = "default index";
     String indexMapItem = "indexMapItem1918721251";
     Map indexMap = new HashMap<>();
@@ -16788,7 +16808,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String indexName = "default index";
       String indexMapItem = "indexMapItem1918721251";
       Map indexMap = new HashMap<>();
@@ -16855,7 +16875,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void streamBooksTest() throws Exception {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16920,7 +16940,7 @@ public class LibraryClientTest {
       .setComment(comment)
       .build();
     mockLibraryService.addResponse(expectedResponse);
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     DiscussBookRequest request = DiscussBookRequest.newBuilder()
       .setName(name.toString())
       .build();
@@ -16945,7 +16965,7 @@ public class LibraryClientTest {
   public void discussBookExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockLibraryService.addException(exception);
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     DiscussBookRequest request = DiscussBookRequest.newBuilder()
       .setName(name.toString())
       .build();
@@ -16973,7 +16993,7 @@ public class LibraryClientTest {
   @SuppressWarnings("all")
   public void findRelatedBooksTest() {
     String nextPageToken = "";
-    BookName namesElement2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName namesElement2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     List names2 = Arrays.asList(namesElement2);
     FindRelatedBooksResponse expectedResponse = FindRelatedBooksResponse.newBuilder()
       .setNextPageToken(nextPageToken)
@@ -17078,7 +17098,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBigBookTest() throws Exception {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -17098,7 +17118,7 @@ public class LibraryClientTest {
             .build();
     mockLibraryService.addResponse(resultOperation);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     Book actualResponse =
         client.getBigBookAsync(name).get();
@@ -17122,7 +17142,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBigBookAsync(name).get();
       Assert.fail("No exception raised");
@@ -17146,7 +17166,7 @@ public class LibraryClientTest {
             .build();
     mockLibraryService.addResponse(resultOperation);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     Empty actualResponse =
         client.getBigNothingAsync(name).get();
@@ -17170,7 +17190,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBigNothingAsync(name).get();
       Assert.fail("No exception raised");
@@ -17231,8 +17251,8 @@ public class LibraryClientTest {
     String requiredSingularString = "requiredSingularString-1949894503";
     ByteString requiredSingularBytes = ByteString.copyFromUtf8("-29");
     TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-    BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-    BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+    BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String requiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002";
     int requiredSingularFixed32 = 720656715;
     long requiredSingularFixed64 = 720656810;
@@ -17292,8 +17312,8 @@ public class LibraryClientTest {
     String optionalSingularString = "optionalSingularString1852995162";
     ByteString optionalSingularBytes = ByteString.copyFromUtf8("2");
     TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-    BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-    BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+    BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String optionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657";
     int optionalSingularFixed32 = 1648847958;
     long optionalSingularFixed64 = 1648847863;
@@ -17497,8 +17517,8 @@ public class LibraryClientTest {
       String requiredSingularString = "requiredSingularString-1949894503";
       ByteString requiredSingularBytes = ByteString.copyFromUtf8("-29");
       TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-      BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String requiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002";
       int requiredSingularFixed32 = 720656715;
       long requiredSingularFixed64 = 720656810;
@@ -17558,8 +17578,8 @@ public class LibraryClientTest {
       String optionalSingularString = "optionalSingularString1852995162";
       ByteString optionalSingularBytes = ByteString.copyFromUtf8("2");
       TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-      BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String optionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657";
       int optionalSingularFixed32 = 1648847958;
       long optionalSingularFixed64 = 1648847863;
@@ -17879,7 +17899,7 @@ public class LibraryClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     Book.Rating rating = Book.Rating.GOOD;
@@ -17907,7 +17927,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String author = "author-1406328437";
       String title = "title110371416";
       Book.Rating rating = Book.Rating.GOOD;
@@ -17922,7 +17942,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void privateListShelvesTest() {
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -18005,7 +18025,7 @@ public class LibrarySmokeTest {
   public static void main(String args[]) {
     Logger.getLogger("").setLevel(Level.WARNING);
     try {
-      executeNoCatch(getProjectId());
+      executeNoCatch();
       System.out.println("OK");
     } catch (Exception e) {
       System.err.println("Failed with exception:");
@@ -18014,9 +18034,9 @@ public class LibrarySmokeTest {
     }
   }
 
-  public static void executeNoCatch(String projectId) throws Exception {
+  public static void executeNoCatch() throws Exception {
     try (LibraryClient client = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("testShelf-" + System.currentTimeMillis(), projectId);
+      BookName name = BookName.ofShelfBookOneBookTwoName("testShelf-" + System.currentTimeMillis(), "[BOOK_ONE]", "[BOOK_TWO]");
       Book.Rating rating = Book.Rating.GOOD;
       Book book = Book.newBuilder()
         .setRating(rating)
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_no_gapic_config.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_no_gapic_config.baseline
index 150e34ca6d..1fe00762a3 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_no_gapic_config.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_no_gapic_config.baseline
@@ -1178,7 +1178,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryServiceClient.getBook(name);
    * }
    * 
@@ -1201,7 +1201,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryServiceClient.getBook(name.toString());
    * }
    * 
@@ -1224,7 +1224,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -1246,7 +1246,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -1401,7 +1401,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryServiceClient.deleteBook(name);
    * }
    * 
@@ -1424,7 +1424,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryServiceClient.deleteBook(name.toString());
    * }
    * 
@@ -1447,7 +1447,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DeleteBookRequest request = DeleteBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -1469,7 +1469,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DeleteBookRequest request = DeleteBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -1490,7 +1490,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   Book response = libraryServiceClient.updateBook(name, book);
    * }
@@ -1516,7 +1516,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   Book response = libraryServiceClient.updateBook(name.toString(), book);
    * }
@@ -1542,7 +1542,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalFoo = "";
    *   Book book = Book.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -1577,7 +1577,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalFoo = "";
    *   Book book = Book.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -1612,7 +1612,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   UpdateBookRequest request = UpdateBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -1636,7 +1636,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   UpdateBookRequest request = UpdateBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -1659,7 +1659,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   Book response = libraryServiceClient.moveBook(name, otherShelfName);
    * }
@@ -1685,7 +1685,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   Book response = libraryServiceClient.moveBook(name.toString(), otherShelfName.toString());
    * }
@@ -1711,7 +1711,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   MoveBookRequest request = MoveBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -1735,7 +1735,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   MoveBookRequest request = MoveBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -1898,7 +1898,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<Comment> comments = new ArrayList<>();
    *   libraryServiceClient.addComments(name, comments);
    * }
@@ -1924,7 +1924,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<Comment> comments = new ArrayList<>();
    *   libraryServiceClient.addComments(name.toString(), comments);
    * }
@@ -1950,7 +1950,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<Comment> comments = new ArrayList<>();
    *   AddCommentsRequest request = AddCommentsRequest.newBuilder()
    *     .setName(name.toString())
@@ -1974,7 +1974,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<Comment> comments = new ArrayList<>();
    *   AddCommentsRequest request = AddCommentsRequest.newBuilder()
    *     .setName(name.toString())
@@ -2096,8 +2096,8 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   BookFromAnywhere response = libraryServiceClient.getBookFromAnywhere(name, altBookName, place, folder);
@@ -2129,8 +2129,8 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   BookFromAnywhere response = libraryServiceClient.getBookFromAnywhere(name.toString(), altBookName.toString(), place.toString(), folder.toString());
@@ -2162,8 +2162,8 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   GetBookFromAnywhereRequest request = GetBookFromAnywhereRequest.newBuilder()
@@ -2190,8 +2190,8 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   GetBookFromAnywhereRequest request = GetBookFromAnywhereRequest.newBuilder()
@@ -2217,7 +2217,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   BookFromAnywhere response = libraryServiceClient.getBookFromAbsolutelyAnywhere(name);
    * }
    * 
@@ -2240,7 +2240,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   BookFromAnywhere response = libraryServiceClient.getBookFromAbsolutelyAnywhere(name.toString());
    * }
    * 
@@ -2263,7 +2263,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2285,7 +2285,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2306,7 +2306,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "";
    *   Map<String, String> indexMap = new HashMap<>();
    *   libraryServiceClient.updateBookIndex(name, indexName, indexMap);
@@ -2335,7 +2335,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "";
    *   Map<String, String> indexMap = new HashMap<>();
    *   libraryServiceClient.updateBookIndex(name.toString(), indexName, indexMap);
@@ -2364,7 +2364,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "";
    *   Map<String, String> indexMap = new HashMap<>();
    *   UpdateBookIndexRequest request = UpdateBookIndexRequest.newBuilder()
@@ -2390,7 +2390,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "";
    *   Map<String, String> indexMap = new HashMap<>();
    *   UpdateBookIndexRequest request = UpdateBookIndexRequest.newBuilder()
@@ -2411,7 +2411,8 @@ public class LibraryServiceClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * Sample code:
    * 

@@ -2435,7 +2436,8 @@ public class LibraryServiceClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming, non-paged responses.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * Sample code:
    * 

@@ -2466,7 +2468,7 @@ public class LibraryServiceClient implements BackgroundResource {
    *   BidiStream<DiscussBookRequest, Comment> bidiStream =
    *       libraryServiceClient.discussBookCallable().call();
    *
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DiscussBookRequest request = DiscussBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2508,7 +2510,7 @@ public class LibraryServiceClient implements BackgroundResource {
    *   ApiStreamObserver<DiscussBookRequest> requestObserver =
    *       libraryServiceClient.monologAboutBookCallable().clientStreamingCall(responseObserver);
    *
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DiscussBookRequest request = DiscussBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2522,8 +2524,10 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test samplegen response handling when a client streaming method returns Empty.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * Test samplegen response handling when a client streaming method returns
+   * Empty.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * Sample code:
    * 

@@ -2548,7 +2552,7 @@ public class LibraryServiceClient implements BackgroundResource {
    *   ApiStreamObserver<DiscussBookRequest> requestObserver =
    *       libraryServiceClient.babbleAboutBookCallable().clientStreamingCall(responseObserver);
    *
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DiscussBookRequest request = DiscussBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2780,7 +2784,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryServiceClient.getBigBookAsync(name).get();
    * }
    * 
@@ -2804,7 +2808,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryServiceClient.getBigBookAsync(name.toString()).get();
    * }
    * 
@@ -2828,7 +2832,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2851,7 +2855,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2873,7 +2877,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2894,7 +2898,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryServiceClient.getBigNothingAsync(name).get();
    * }
    * 
@@ -2918,7 +2922,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryServiceClient.getBigNothingAsync(name.toString()).get();
    * }
    * 
@@ -2942,7 +2946,7 @@ public class LibraryServiceClient implements BackgroundResource { * Sample code: *

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2965,7 +2969,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -2987,7 +2991,7 @@ public class LibraryServiceClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -3965,13 +3969,14 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String author = "";
    *   String title = "";
    *   Book.Rating rating = Book.Rating.GOOD;
@@ -4000,13 +4005,14 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String author = "";
    *   String title = "";
    *   Book.Rating rating = Book.Rating.GOOD;
@@ -4035,13 +4041,14 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book request = Book.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -4058,13 +4065,14 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryServiceClient libraryServiceClient = LibraryServiceClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book request = Book.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -4113,8 +4121,8 @@ public class LibraryServiceClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -4174,8 +4182,8 @@ public class LibraryServiceClient implements BackgroundResource {
    *   String optionalSingularString = "";
    *   ByteString optionalSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalSingularResourceNameCommon = "";
    *   int optionalSingularFixed32 = 0;
    *   long optionalSingularFixed64 = 0L;
@@ -4499,8 +4507,8 @@ public class LibraryServiceClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -4560,8 +4568,8 @@ public class LibraryServiceClient implements BackgroundResource {
    *   String optionalSingularString = "";
    *   ByteString optionalSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalSingularResourceNameCommon = "";
    *   int optionalSingularFixed32 = 0;
    *   long optionalSingularFixed64 = 0L;
@@ -4885,8 +4893,8 @@ public class LibraryServiceClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -5027,8 +5035,8 @@ public class LibraryServiceClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -11055,7 +11063,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void createBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -11213,7 +11221,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -11227,7 +11235,7 @@ public class LibraryServiceClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     Book actualResponse =
         client.getBook(name);
@@ -11251,7 +11259,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBook(name);
       Assert.fail("No exception raised");
@@ -11316,7 +11324,7 @@ public class LibraryServiceClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     client.deleteBook(name);
 
@@ -11338,7 +11346,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.deleteBook(name);
       Assert.fail("No exception raised");
@@ -11350,7 +11358,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void updateBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -11364,7 +11372,7 @@ public class LibraryServiceClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     Book book = Book.newBuilder().build();
 
     Book actualResponse =
@@ -11390,7 +11398,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       Book book = Book.newBuilder().build();
 
       client.updateBook(name, book);
@@ -11403,7 +11411,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void updateBookTest2() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -11417,7 +11425,7 @@ public class LibraryServiceClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String optionalFoo = "optionalFoo1822578535";
     Book book = Book.newBuilder().build();
     FieldMask updateMask = FieldMask.newBuilder().build();
@@ -11449,7 +11457,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String optionalFoo = "optionalFoo1822578535";
       Book book = Book.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
@@ -11465,7 +11473,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void moveBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -11479,7 +11487,7 @@ public class LibraryServiceClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     ShelfName otherShelfName = ShelfName.of("[SHELF]");
 
     Book actualResponse =
@@ -11505,7 +11513,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       ShelfName otherShelfName = ShelfName.of("[SHELF]");
 
       client.moveBook(name, otherShelfName);
@@ -11618,7 +11626,7 @@ public class LibraryServiceClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     List comments = new ArrayList<>();
 
     client.addComments(name, comments);
@@ -11642,7 +11650,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       List comments = new ArrayList<>();
 
       client.addComments(name, comments);
@@ -11706,7 +11714,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBookFromAnywhereTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -11718,8 +11726,8 @@ public class LibraryServiceClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-    BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+    BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
     FolderName folder = FolderName.of("[FOLDER]");
 
@@ -11748,8 +11756,8 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
       FolderName folder = FolderName.of("[FOLDER]");
 
@@ -11763,7 +11771,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBookFromAbsolutelyAnywhereTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -11775,7 +11783,7 @@ public class LibraryServiceClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     BookFromAnywhere actualResponse =
         client.getBookFromAbsolutelyAnywhere(name);
@@ -11799,7 +11807,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBookFromAbsolutelyAnywhere(name);
       Assert.fail("No exception raised");
@@ -11814,7 +11822,7 @@ public class LibraryServiceClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String indexName = "indexName746962392";
     Map indexMap = new HashMap<>();
 
@@ -11840,7 +11848,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String indexName = "indexName746962392";
       Map indexMap = new HashMap<>();
 
@@ -11901,7 +11909,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void streamBooksTest() throws Exception {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -11966,7 +11974,7 @@ public class LibraryServiceClientTest {
       .setComment(comment)
       .build();
     mockLibraryService.addResponse(expectedResponse);
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     DiscussBookRequest request = DiscussBookRequest.newBuilder()
       .setName(name.toString())
       .build();
@@ -11991,7 +11999,7 @@ public class LibraryServiceClientTest {
   public void discussBookExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockLibraryService.addException(exception);
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     DiscussBookRequest request = DiscussBookRequest.newBuilder()
       .setName(name.toString())
       .build();
@@ -12019,7 +12027,7 @@ public class LibraryServiceClientTest {
   @SuppressWarnings("all")
   public void findRelatedBooksTest() {
     String nextPageToken = "";
-    BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     List names2 = Arrays.asList(namesElement);
     FindRelatedBooksResponse expectedResponse = FindRelatedBooksResponse.newBuilder()
       .setNextPageToken(nextPageToken)
@@ -12114,7 +12122,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBigBookTest() throws Exception {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -12134,7 +12142,7 @@ public class LibraryServiceClientTest {
             .build();
     mockLibraryService.addResponse(resultOperation);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     Book actualResponse =
         client.getBigBookAsync(name).get();
@@ -12158,7 +12166,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBigBookAsync(name).get();
       Assert.fail("No exception raised");
@@ -12182,7 +12190,7 @@ public class LibraryServiceClientTest {
             .build();
     mockLibraryService.addResponse(resultOperation);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     Empty actualResponse =
         client.getBigNothingAsync(name).get();
@@ -12206,7 +12214,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBigNothingAsync(name).get();
       Assert.fail("No exception raised");
@@ -12425,7 +12433,7 @@ public class LibraryServiceClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     Book.Rating rating = Book.Rating.GOOD;
@@ -12453,7 +12461,7 @@ public class LibraryServiceClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String author = "author-1406328437";
       String title = "title110371416";
       Book.Rating rating = Book.Rating.GOOD;
@@ -12514,8 +12522,8 @@ public class LibraryServiceClientTest {
     String requiredSingularString = "requiredSingularString-1949894503";
     ByteString requiredSingularBytes = ByteString.copyFromUtf8("-29");
     TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-    BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-    BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+    BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String requiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002";
     int requiredSingularFixed32 = 720656715;
     long requiredSingularFixed64 = 720656810;
@@ -12575,8 +12583,8 @@ public class LibraryServiceClientTest {
     String optionalSingularString = "optionalSingularString1852995162";
     ByteString optionalSingularBytes = ByteString.copyFromUtf8("2");
     TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-    BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-    BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+    BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String optionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657";
     int optionalSingularFixed32 = 1648847958;
     long optionalSingularFixed64 = 1648847863;
@@ -12780,8 +12788,8 @@ public class LibraryServiceClientTest {
       String requiredSingularString = "requiredSingularString-1949894503";
       ByteString requiredSingularBytes = ByteString.copyFromUtf8("-29");
       TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-      BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String requiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002";
       int requiredSingularFixed32 = 720656715;
       long requiredSingularFixed64 = 720656810;
@@ -12841,8 +12849,8 @@ public class LibraryServiceClientTest {
       String optionalSingularString = "optionalSingularString1852995162";
       ByteString optionalSingularBytes = ByteString.copyFromUtf8("2");
       TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-      BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String optionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657";
       int optionalSingularFixed32 = 1648847958;
       long optionalSingularFixed64 = 1648847863;
@@ -12904,7 +12912,7 @@ public class LibraryServiceClientTest {
   @Test
   @SuppressWarnings("all")
   public void privateListShelvesTest() {
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_with_grpc_service_config.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_with_grpc_service_config.baseline
index 617107fd55..7f336a40d0 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_with_grpc_service_config.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_with_grpc_service_config.baseline
@@ -248,7 +248,7 @@ public class BabbleAboutBookCallableCallableStreamingClientEmptyResponseTypeWith
       ApiStreamObserver requestObserver =
           libraryClient.babbleAboutBookCallable().clientStreamingCall(responseObserver);
 
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       DiscussBookRequest request = DiscussBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -324,7 +324,7 @@ public class BabbleAboutBookCallableCallableStreamingClientEmptyResponseTypeWith
       ApiStreamObserver requestObserver =
           libraryClient.babbleAboutBookCallable().clientStreamingCall(responseObserver);
 
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       DiscussBookRequest request = DiscussBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -732,7 +732,7 @@ public class FindRelatedBooksCallableCallableListOdyssey {
   /** Testing calling forms */
   public static void sampleFindRelatedBooks() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       List names = Arrays.asList(namesElement);
       ShelfName shelvesElement = ShelfName.of("[SHELF]");
       List shelves = Arrays.asList(shelvesElement);
@@ -883,7 +883,7 @@ public class FindRelatedBooksPagedCallableCallablePagedOdyssey {
   /** Testing calling forms */
   public static void sampleFindRelatedBooks() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       List names = Arrays.asList(namesElement);
       ShelfName shelvesElement = ShelfName.of("[SHELF]");
       List shelves = Arrays.asList(shelvesElement);
@@ -956,7 +956,7 @@ public class FindRelatedBooksRequestPagedOdyssey {
   /** Testing calling forms */
   public static void sampleFindRelatedBooks() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       List names = Arrays.asList(namesElement);
       ShelfName shelvesElement = ShelfName.of("[SHELF]");
       List shelves = Arrays.asList(shelvesElement);
@@ -1037,7 +1037,7 @@ public class GetBigBookAsyncLongRunningFlattenedAsyncWap {
   /** Testing calling forms */
   public static void sampleGetBigBook(String shelf) {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName(shelf, "War and Peace");
+      BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]");
       OperationFuture future = libraryClient.getBigBookAsync(name.toString());
 
       System.out.println("Waiting for operation to complete...");
@@ -1144,7 +1144,7 @@ public class GetBigBookAsyncLongRunningFlattenedAsyncWap2 {
    */
   public static void sampleGetBigBook(String shelf, String bigBookName) {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName(shelf, bigBookName);
+      BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]");
       OperationFuture future = libraryClient.getBigBookAsync(name.toString());
 
       System.out.println("Waiting for operation to complete...");
@@ -1239,7 +1239,7 @@ public class GetBigBookAsyncLongRunningRequestAsyncWap {
   /** Testing calling forms */
   public static void sampleGetBigBook(String shelf) {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName(shelf, "War and Peace");
+      BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -1351,7 +1351,7 @@ public class GetBigBookAsyncLongRunningRequestAsyncWap2 {
    */
   public static void sampleGetBigBook(String shelf, String bigBookName) {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName(shelf, bigBookName);
+      BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -1447,7 +1447,7 @@ public class GetBigBookCallableCallableWap {
   /** Testing calling forms */
   public static void sampleGetBigBook(String shelf) {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName(shelf, "War and Peace");
+      BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -1558,7 +1558,7 @@ public class GetBigBookCallableCallableWap2 {
    */
   public static void sampleGetBigBook(String shelf, String bigBookName) {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName(shelf, bigBookName);
+      BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -1657,7 +1657,7 @@ public class GetBigBookOperationCallableLongRunningCallableWap {
   /** Testing calling forms */
   public static void sampleGetBigBook(String shelf) {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName(shelf, "War and Peace");
+      BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -1770,7 +1770,7 @@ public class GetBigBookOperationCallableLongRunningCallableWap2 {
    */
   public static void sampleGetBigBook(String shelf, String bigBookName) {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName(shelf, bigBookName);
+      BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -1853,7 +1853,7 @@ public class GetBigNothingAsyncLongRunningFlattenedAsyncEmptyResponseTypeWithRes
   /** Test response handling for methods that return empty */
   public static void sampleGetBigNothing() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       OperationFuture future = libraryClient.getBigNothingAsync(name.toString());
 
       System.out.println("Waiting for operation to complete...");
@@ -1915,7 +1915,7 @@ public class GetBigNothingAsyncLongRunningFlattenedAsyncEmptyResponseTypeWithout
   /** Test default response handling is turned off for methods that return empty */
   public static void sampleGetBigNothing() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       OperationFuture future = libraryClient.getBigNothingAsync(name.toString());
 
       System.out.println("Waiting for operation to complete...");
@@ -1977,7 +1977,7 @@ public class GetBigNothingAsyncLongRunningRequestAsyncEmptyResponseTypeWithRespo
   /** Test response handling for methods that return empty */
   public static void sampleGetBigNothing() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -2044,7 +2044,7 @@ public class GetBigNothingAsyncLongRunningRequestAsyncEmptyResponseTypeWithoutRe
   /** Test default response handling is turned off for methods that return empty */
   public static void sampleGetBigNothing() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -2107,7 +2107,7 @@ public class GetBigNothingCallableCallableEmptyResponseTypeWithResponseHandling
   /** Test response handling for methods that return empty */
   public static void sampleGetBigNothing() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -2173,7 +2173,7 @@ public class GetBigNothingCallableCallableEmptyResponseTypeWithoutResponseHandli
   /** Test default response handling is turned off for methods that return empty */
   public static void sampleGetBigNothing() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -2239,7 +2239,7 @@ public class GetBigNothingOperationCallableLongRunningCallableEmptyResponseTypeW
   /** Test response handling for methods that return empty */
   public static void sampleGetBigNothing() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -2307,7 +2307,7 @@ public class GetBigNothingOperationCallableLongRunningCallableEmptyResponseTypeW
   /** Test default response handling is turned off for methods that return empty */
   public static void sampleGetBigNothing() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -2372,7 +2372,7 @@ public class GetBookCallableCallableTestOnSuccessMap {
 
   public static void sampleGetBook() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -2437,7 +2437,7 @@ public class GetBookFlattenedTestOnSuccessMap {
 
   public static void sampleGetBook() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       Book response = libraryClient.getBook(name.toString());
       String intKeyVal = response.getMapStringValueMap().get(123);
       String booleanKeyVal = response.getMapBoolKeyMap().get(true);
@@ -2497,7 +2497,7 @@ public class GetBookRequestTestOnSuccessMap {
 
   public static void sampleGetBook() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -2582,7 +2582,7 @@ public class MonologAboutBookCallableCallableStreamingClientProg {
       ApiStreamObserver requestObserver =
           libraryClient.monologAboutBookCallable().clientStreamingCall(responseObserver);
 
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       DiscussBookRequest request = DiscussBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -3686,8 +3686,8 @@ public class TestFloatAndInt64 {
       String requiredSingularString = "";
       ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
       TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-      BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String requiredSingularResourceNameCommon = "";
       int requiredSingularFixed32 = 0;
       long requiredSingularFixed64 = 0L;
@@ -3878,7 +3878,7 @@ public class TestResourceNameOneof {
 
   public static void sampleGetBookFromAbsolutelyAnywhere() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "The ID of the book");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -3935,7 +3935,7 @@ public class TestResourceNameOneof2 {
 
   public static void sampleGetBookFromAbsolutelyAnywhere() {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("The Shelf to search for the book", "The ID of the book");
+      BookName name = BookName.ofShelfBookOneBookTwoName("The Shelf to search for the book", "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -4081,7 +4081,7 @@ public class ThisTagShouldBeTheNameOfTheFile {
   /** Testing calling forms */
   public static void sampleGetBigBook(String shelf) {
     try (LibraryClient libraryClient = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName(shelf, "War and Peace");
+      BookName name = BookName.ofShelfBookOneBookTwoName(shelf, "[BOOK_ONE]", "[BOOK_TWO]");
       GetBookRequest request = GetBookRequest.newBuilder()
         .setName(name.toString())
         .build();
@@ -4196,7 +4196,7 @@ public class TuringProgCallableStreamingBidi {
       BidiStream bidiStream =
           libraryClient.discussBookCallable().call();
 
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       Path path = Paths.get("comment_file");
       byte[] data = Files.readAllBytes(path);
       ByteString comment = ByteString.copyFrom(data);
@@ -4418,7 +4418,7 @@ public class LibraryClient implements BackgroundResource {
       PathTemplate.createWithoutUrlEncoding("archives/{archive}/books/{book}");
 
   private static final PathTemplate BOOK_PATH_TEMPLATE =
-      PathTemplate.createWithoutUrlEncoding("shelves/{shelf}/books/{book}");
+      PathTemplate.createWithoutUrlEncoding("shelves/{shelf}/books/{book_one}~{book_two}");
 
   private static final PathTemplate BOOK_FROM_ARCHIVE_PATH_TEMPLATE =
       PathTemplate.createWithoutUrlEncoding("archives/{archive}/books/{book}");
@@ -4479,10 +4479,11 @@ public class LibraryClient implements BackgroundResource {
    * @deprecated Use the {@link BookName} class instead.
    */
   @Deprecated
-  public static final String formatBookName(String shelf, String book) {
+  public static final String formatBookName(String shelf, String bookOne, String bookTwo) {
     return BOOK_PATH_TEMPLATE.instantiate(
         "shelf", shelf,
-        "book", book);
+        "book_one", bookOne,
+        "book_two", bookTwo);
   }
 
   /**
@@ -4646,14 +4647,25 @@ public class LibraryClient implements BackgroundResource {
   }
 
   /**
-   * Parses the book from the given fully-qualified path which
+   * Parses the book_one from the given fully-qualified path which
+   * represents a book resource.
+   *
+   * @deprecated Use the {@link BookName} class instead.
+   */
+  @Deprecated
+  public static final String parseBookOneFromBookName(String bookName) {
+    return BOOK_PATH_TEMPLATE.parse(bookName).get("book_one");
+  }
+
+  /**
+   * Parses the book_two from the given fully-qualified path which
    * represents a book resource.
    *
    * @deprecated Use the {@link BookName} class instead.
    */
   @Deprecated
-  public static final String parseBookFromBookName(String bookName) {
-    return BOOK_PATH_TEMPLATE.parse(bookName).get("book");
+  public static final String parseBookTwoFromBookName(String bookName) {
+    return BOOK_PATH_TEMPLATE.parse(bookName).get("book_two");
   }
 
   /**
@@ -5701,7 +5713,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryClient.getBook(name);
    * }
    * 
@@ -5724,7 +5736,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryClient.getBook(name.toString());
    * }
    * 
@@ -5747,7 +5759,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -5769,7 +5781,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -5930,7 +5942,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryClient.deleteBook(name);
    * }
    * 
@@ -5953,7 +5965,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryClient.deleteBook(name.toString());
    * }
    * 
@@ -5976,7 +5988,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DeleteBookRequest request = DeleteBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -5998,7 +6010,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DeleteBookRequest request = DeleteBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -6019,7 +6031,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   Book response = libraryClient.updateBook(name, book);
    * }
@@ -6045,7 +6057,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   Book response = libraryClient.updateBook(name.toString(), book);
    * }
@@ -6071,7 +6083,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalFoo = "";
    *   Book book = Book.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -6106,7 +6118,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalFoo = "";
    *   Book book = Book.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -6141,7 +6153,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   UpdateBookRequest request = UpdateBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -6165,7 +6177,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book book = Book.newBuilder().build();
    *   UpdateBookRequest request = UpdateBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -6188,7 +6200,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   Book response = libraryClient.moveBook(name, otherShelfName);
    * }
@@ -6214,7 +6226,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   Book response = libraryClient.moveBook(name.toString(), otherShelfName.toString());
    * }
@@ -6240,7 +6252,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   MoveBookRequest request = MoveBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -6264,7 +6276,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ShelfName otherShelfName = ShelfName.of("[SHELF]");
    *   MoveBookRequest request = MoveBookRequest.newBuilder()
    *     .setName(name.toString())
@@ -6427,7 +6439,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ByteString comment = ByteString.copyFromUtf8("");
    *   Comment.Stage stage = Comment.Stage.UNSET;
    *   SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -6461,7 +6473,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ByteString comment = ByteString.copyFromUtf8("");
    *   Comment.Stage stage = Comment.Stage.UNSET;
    *   SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -6495,7 +6507,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ByteString comment = ByteString.copyFromUtf8("");
    *   Comment.Stage stage = Comment.Stage.UNSET;
    *   SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -6527,7 +6539,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   ByteString comment = ByteString.copyFromUtf8("");
    *   Comment.Stage stage = Comment.Stage.UNSET;
    *   SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -6657,8 +6669,8 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   BookFromAnywhere response = libraryClient.getBookFromAnywhere(name, altBookName, place, folder);
@@ -6690,8 +6702,8 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   BookFromAnywhere response = libraryClient.getBookFromAnywhere(name.toString(), altBookName.toString(), place.toString(), folder.toString());
@@ -6723,8 +6735,8 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   GetBookFromAnywhereRequest request = GetBookFromAnywhereRequest.newBuilder()
@@ -6751,8 +6763,8 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
    *   FolderName folder = FolderName.of("[FOLDER]");
    *   GetBookFromAnywhereRequest request = GetBookFromAnywhereRequest.newBuilder()
@@ -6778,7 +6790,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   BookFromAnywhere response = libraryClient.getBookFromAbsolutelyAnywhere(name);
    * }
    * 
@@ -6801,7 +6813,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   BookFromAnywhere response = libraryClient.getBookFromAbsolutelyAnywhere(name.toString());
    * }
    * 
@@ -6824,7 +6836,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -6846,7 +6858,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookFromAbsolutelyAnywhereRequest request = GetBookFromAbsolutelyAnywhereRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -6867,7 +6879,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "default index";
    *   String indexMapItem = "";
    *   Map<String, String> indexMap = new HashMap<>();
@@ -6898,7 +6910,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "default index";
    *   String indexMapItem = "";
    *   Map<String, String> indexMap = new HashMap<>();
@@ -6929,7 +6941,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "default index";
    *   String indexMapItem = "";
    *   Map<String, String> indexMap = new HashMap<>();
@@ -6957,7 +6969,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String indexName = "default index";
    *   String indexMapItem = "";
    *   Map<String, String> indexMap = new HashMap<>();
@@ -6980,7 +6992,8 @@ public class LibraryClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7004,7 +7017,8 @@ public class LibraryClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming, non-paged responses.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7035,7 +7049,7 @@ public class LibraryClient implements BackgroundResource {
    *   BidiStream<DiscussBookRequest, Comment> bidiStream =
    *       libraryClient.discussBookCallable().call();
    *
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DiscussBookRequest request = DiscussBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7077,7 +7091,7 @@ public class LibraryClient implements BackgroundResource {
    *   ApiStreamObserver<DiscussBookRequest> requestObserver =
    *       libraryClient.monologAboutBookCallable().clientStreamingCall(responseObserver);
    *
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DiscussBookRequest request = DiscussBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7091,8 +7105,10 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test samplegen response handling when a client streaming method returns Empty.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * Test samplegen response handling when a client streaming method returns
+   * Empty.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7117,7 +7133,7 @@ public class LibraryClient implements BackgroundResource {
    *   ApiStreamObserver<DiscussBookRequest> requestObserver =
    *       libraryClient.babbleAboutBookCallable().clientStreamingCall(responseObserver);
    *
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   DiscussBookRequest request = DiscussBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7165,7 +7181,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<BookName> names = Arrays.asList(namesElement);
    *   List<ShelfName> shelves = new ArrayList<>();
    *   FindRelatedBooksRequest request = FindRelatedBooksRequest.newBuilder()
@@ -7193,7 +7209,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<BookName> names = Arrays.asList(namesElement);
    *   List<ShelfName> shelves = new ArrayList<>();
    *   FindRelatedBooksRequest request = FindRelatedBooksRequest.newBuilder()
@@ -7219,7 +7235,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName namesElement = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName namesElement = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   List<BookName> names = Arrays.asList(namesElement);
    *   List<ShelfName> shelves = new ArrayList<>();
    *   FindRelatedBooksRequest request = FindRelatedBooksRequest.newBuilder()
@@ -7301,7 +7317,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryClient.getBigBookAsync(name).get();
    * }
    * 
@@ -7325,7 +7341,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book response = libraryClient.getBigBookAsync(name.toString()).get();
    * }
    * 
@@ -7349,7 +7365,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7372,7 +7388,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7394,7 +7410,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7415,7 +7431,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryClient.getBigNothingAsync(name).get();
    * }
    * 
@@ -7439,7 +7455,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   libraryClient.getBigNothingAsync(name.toString()).get();
    * }
    * 
@@ -7463,7 +7479,7 @@ public class LibraryClient implements BackgroundResource { * Sample code: *

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7486,7 +7502,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7508,7 +7524,7 @@ public class LibraryClient implements BackgroundResource {
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   GetBookRequest request = GetBookRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -7557,8 +7573,8 @@ public class LibraryClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -7618,8 +7634,8 @@ public class LibraryClient implements BackgroundResource {
    *   String optionalSingularString = "";
    *   ByteString optionalSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalSingularResourceNameCommon = "";
    *   int optionalSingularFixed32 = 0;
    *   long optionalSingularFixed64 = 0L;
@@ -7943,8 +7959,8 @@ public class LibraryClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -8004,8 +8020,8 @@ public class LibraryClient implements BackgroundResource {
    *   String optionalSingularString = "";
    *   ByteString optionalSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String optionalSingularResourceNameCommon = "";
    *   int optionalSingularFixed32 = 0;
    *   long optionalSingularFixed64 = 0L;
@@ -8329,8 +8345,8 @@ public class LibraryClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -8471,8 +8487,8 @@ public class LibraryClient implements BackgroundResource {
    *   String requiredSingularString = "";
    *   ByteString requiredSingularBytes = ByteString.copyFromUtf8("");
    *   TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-   *   BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+   *   BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String requiredSingularResourceNameCommon = "";
    *   int requiredSingularFixed32 = 0;
    *   long requiredSingularFixed64 = 0L;
@@ -9685,13 +9701,14 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String author = "";
    *   String title = "";
    *   Book.Rating rating = Book.Rating.GOOD;
@@ -9720,13 +9737,14 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   String author = "";
    *   String title = "";
    *   Book.Rating rating = Book.Rating.GOOD;
@@ -9755,13 +9773,14 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book request = Book.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -9778,13 +9797,14 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * Sample code:
    * 

    * try (LibraryClient libraryClient = LibraryClient.create()) {
-   *   BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+   *   BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
    *   Book request = Book.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -16033,7 +16053,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void createBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16147,7 +16167,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16161,7 +16181,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     Book actualResponse =
         client.getBook(name);
@@ -16185,7 +16205,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBook(name);
       Assert.fail("No exception raised");
@@ -16250,7 +16270,7 @@ public class LibraryClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     client.deleteBook(name);
 
@@ -16272,7 +16292,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.deleteBook(name);
       Assert.fail("No exception raised");
@@ -16284,7 +16304,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void updateBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16298,7 +16318,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     Book book = Book.newBuilder().build();
 
     Book actualResponse =
@@ -16324,7 +16344,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       Book book = Book.newBuilder().build();
 
       client.updateBook(name, book);
@@ -16337,7 +16357,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void updateBookTest2() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16351,7 +16371,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String optionalFoo = "optionalFoo1822578535";
     Book book = Book.newBuilder().build();
     FieldMask updateMask = FieldMask.newBuilder().build();
@@ -16383,7 +16403,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String optionalFoo = "optionalFoo1822578535";
       Book book = Book.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
@@ -16399,7 +16419,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void moveBookTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16413,7 +16433,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     ShelfName otherShelfName = ShelfName.of("[SHELF]");
 
     Book actualResponse =
@@ -16439,7 +16459,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       ShelfName otherShelfName = ShelfName.of("[SHELF]");
 
       client.moveBook(name, otherShelfName);
@@ -16552,7 +16572,7 @@ public class LibraryClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     ByteString comment = ByteString.copyFromUtf8("95");
     Comment.Stage stage = Comment.Stage.UNSET;
     SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -16584,7 +16604,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       ByteString comment = ByteString.copyFromUtf8("95");
       Comment.Stage stage = Comment.Stage.UNSET;
       SomeMessage2.SomeMessage3.Alignment alignment = SomeMessage2.SomeMessage3.Alignment.CHAR;
@@ -16656,7 +16676,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBookFromAnywhereTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16668,8 +16688,8 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-    BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+    BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
     FolderName folder = FolderName.of("[FOLDER]");
 
@@ -16698,8 +16718,8 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName altBookName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName altBookName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       LocationName place = LocationName.of("[PROJECT]", "[LOCATION]");
       FolderName folder = FolderName.of("[FOLDER]");
 
@@ -16713,7 +16733,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBookFromAbsolutelyAnywhereTest() {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16725,7 +16745,7 @@ public class LibraryClientTest {
       .build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     BookFromAnywhere actualResponse =
         client.getBookFromAbsolutelyAnywhere(name);
@@ -16749,7 +16769,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBookFromAbsolutelyAnywhere(name);
       Assert.fail("No exception raised");
@@ -16764,7 +16784,7 @@ public class LibraryClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String indexName = "default index";
     String indexMapItem = "indexMapItem1918721251";
     Map indexMap = new HashMap<>();
@@ -16792,7 +16812,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String indexName = "default index";
       String indexMapItem = "indexMapItem1918721251";
       Map indexMap = new HashMap<>();
@@ -16859,7 +16879,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void streamBooksTest() throws Exception {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -16924,7 +16944,7 @@ public class LibraryClientTest {
       .setComment(comment)
       .build();
     mockLibraryService.addResponse(expectedResponse);
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     DiscussBookRequest request = DiscussBookRequest.newBuilder()
       .setName(name.toString())
       .build();
@@ -16949,7 +16969,7 @@ public class LibraryClientTest {
   public void discussBookExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockLibraryService.addException(exception);
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     DiscussBookRequest request = DiscussBookRequest.newBuilder()
       .setName(name.toString())
       .build();
@@ -16977,7 +16997,7 @@ public class LibraryClientTest {
   @SuppressWarnings("all")
   public void findRelatedBooksTest() {
     String nextPageToken = "";
-    BookName namesElement2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName namesElement2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     List names2 = Arrays.asList(namesElement2);
     FindRelatedBooksResponse expectedResponse = FindRelatedBooksResponse.newBuilder()
       .setNextPageToken(nextPageToken)
@@ -17082,7 +17102,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void getBigBookTest() throws Exception {
-    BookName name2 = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name2 = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -17102,7 +17122,7 @@ public class LibraryClientTest {
             .build();
     mockLibraryService.addResponse(resultOperation);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     Book actualResponse =
         client.getBigBookAsync(name).get();
@@ -17126,7 +17146,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBigBookAsync(name).get();
       Assert.fail("No exception raised");
@@ -17150,7 +17170,7 @@ public class LibraryClientTest {
             .build();
     mockLibraryService.addResponse(resultOperation);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
     Empty actualResponse =
         client.getBigNothingAsync(name).get();
@@ -17174,7 +17194,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
 
       client.getBigNothingAsync(name).get();
       Assert.fail("No exception raised");
@@ -17235,8 +17255,8 @@ public class LibraryClientTest {
     String requiredSingularString = "requiredSingularString-1949894503";
     ByteString requiredSingularBytes = ByteString.copyFromUtf8("-29");
     TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-    BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-    BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+    BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String requiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002";
     int requiredSingularFixed32 = 720656715;
     long requiredSingularFixed64 = 720656810;
@@ -17296,8 +17316,8 @@ public class LibraryClientTest {
     String optionalSingularString = "optionalSingularString1852995162";
     ByteString optionalSingularBytes = ByteString.copyFromUtf8("2");
     TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-    BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-    BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+    BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String optionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657";
     int optionalSingularFixed32 = 1648847958;
     long optionalSingularFixed64 = 1648847863;
@@ -17501,8 +17521,8 @@ public class LibraryClientTest {
       String requiredSingularString = "requiredSingularString-1949894503";
       ByteString requiredSingularBytes = ByteString.copyFromUtf8("-29");
       TestOptionalRequiredFlatteningParamsRequest.InnerMessage requiredSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-      BookName requiredSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName requiredSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName requiredSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName requiredSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String requiredSingularResourceNameCommon = "requiredSingularResourceNameCommon-1126805002";
       int requiredSingularFixed32 = 720656715;
       long requiredSingularFixed64 = 720656810;
@@ -17562,8 +17582,8 @@ public class LibraryClientTest {
       String optionalSingularString = "optionalSingularString1852995162";
       ByteString optionalSingularBytes = ByteString.copyFromUtf8("2");
       TestOptionalRequiredFlatteningParamsRequest.InnerMessage optionalSingularMessage = TestOptionalRequiredFlatteningParamsRequest.InnerMessage.newBuilder().build();
-      BookName optionalSingularResourceName = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
-      BookName optionalSingularResourceNameOneof = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName optionalSingularResourceName = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
+      BookName optionalSingularResourceNameOneof = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String optionalSingularResourceNameCommon = "optionalSingularResourceNameCommon-108123657";
       int optionalSingularFixed32 = 1648847958;
       long optionalSingularFixed64 = 1648847863;
@@ -17883,7 +17903,7 @@ public class LibraryClientTest {
     Empty expectedResponse = Empty.newBuilder().build();
     mockLibraryService.addResponse(expectedResponse);
 
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     Book.Rating rating = Book.Rating.GOOD;
@@ -17911,7 +17931,7 @@ public class LibraryClientTest {
     mockLibraryService.addException(exception);
 
     try {
-      BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+      BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
       String author = "author-1406328437";
       String title = "title110371416";
       Book.Rating rating = Book.Rating.GOOD;
@@ -17926,7 +17946,7 @@ public class LibraryClientTest {
   @Test
   @SuppressWarnings("all")
   public void privateListShelvesTest() {
-    BookName name = BookName.ofShelfBookName("[SHELF]", "[BOOK]");
+    BookName name = BookName.ofShelfBookOneBookTwoName("[SHELF]", "[BOOK_ONE]", "[BOOK_TWO]");
     String author = "author-1406328437";
     String title = "title110371416";
     boolean read = true;
@@ -18009,7 +18029,7 @@ public class LibrarySmokeTest {
   public static void main(String args[]) {
     Logger.getLogger("").setLevel(Level.WARNING);
     try {
-      executeNoCatch(getProjectId());
+      executeNoCatch();
       System.out.println("OK");
     } catch (Exception e) {
       System.err.println("Failed with exception:");
@@ -18018,9 +18038,9 @@ public class LibrarySmokeTest {
     }
   }
 
-  public static void executeNoCatch(String projectId) throws Exception {
+  public static void executeNoCatch() throws Exception {
     try (LibraryClient client = LibraryClient.create()) {
-      BookName name = BookName.ofShelfBookName("testShelf-" + System.currentTimeMillis(), projectId);
+      BookName name = BookName.ofShelfBookOneBookTwoName("testShelf-" + System.currentTimeMillis(), "[BOOK_ONE]", "[BOOK_TWO]");
       Book.Rating rating = Book.Rating.GOOD;
       Book book = Book.newBuilder()
         .setRating(rating)
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/nodejs_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/nodejs_library.baseline
index 59c253e106..0a5909ed8b 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/nodejs_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/nodejs_library.baseline
@@ -107,7 +107,7 @@ function sampleBabbleAboutBook() {
     // No one replied
     console.log(`No one replied.`);
   });
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
   const request = {
     name: formattedName,
   };
@@ -156,7 +156,7 @@ function sampleBabbleAboutBook() {
       return;
     }
   });
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
   const request = {
     name: formattedName,
   };
@@ -412,7 +412,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 function sampleGetBigBook(shelf) {
   const client = new LibraryServiceClient();
   // const shelf = 'Novel\\"`\b\t\n\r';
-  const formattedName = client.bookPath(shelf, 'War and Peace');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', 'War and Peace');
 
   // Handle the operation using the event emitter pattern.
   client.getBigBook({name: formattedName})
@@ -507,7 +507,7 @@ function sampleGetBigBook(shelf, bigBookName) {
   const client = new LibraryServiceClient();
   // const shelf = 'Novel';
   // const bigBookName = 'War and Peace';
-  const formattedName = client.bookPath(shelf, bigBookName);
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', bigBookName);
 
   // Handle the operation using the event emitter pattern.
   client.getBigBook({name: formattedName})
@@ -583,7 +583,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 async function sampleGetBigBook(shelf) {
   const client = new LibraryServiceClient();
   // const shelf = 'Novel\\"`\b\t\n\r';
-  const formattedName = client.bookPath(shelf, 'War and Peace');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', 'War and Peace');
 
   // Create a job whose results you can either wait for now, or get later
   const [operation] = await client.getBigBook({name: formattedName});
@@ -660,7 +660,7 @@ async function sampleGetBigBook(shelf, bigBookName) {
   const client = new LibraryServiceClient();
   // const shelf = 'Novel';
   // const bigBookName = 'War and Peace';
-  const formattedName = client.bookPath(shelf, bigBookName);
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', bigBookName);
 
   // Create a job whose results you can either wait for now, or get later
   const [operation] = await client.getBigBook({name: formattedName});
@@ -718,7 +718,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 function sampleGetBigBook(shelf) {
   const client = new LibraryServiceClient();
   // const shelf = 'Novel\\"`\b\t\n\r';
-  const formattedName = client.bookPath(shelf, 'War and Peace');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', 'War and Peace');
 
   // Handle the operation using the promise pattern.
   client.getBigBook({name: formattedName})
@@ -806,7 +806,7 @@ function sampleGetBigBook(shelf, bigBookName) {
   const client = new LibraryServiceClient();
   // const shelf = 'Novel';
   // const bigBookName = 'War and Peace';
-  const formattedName = client.bookPath(shelf, bigBookName);
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', bigBookName);
 
   // Handle the operation using the promise pattern.
   client.getBigBook({name: formattedName})
@@ -874,7 +874,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 /** Test response handling for methods that return empty */
 function sampleGetBigNothing() {
   const client = new LibraryServiceClient();
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
 
   // Handle the operation using the event emitter pattern.
   client.getBigNothing({name: formattedName})
@@ -939,7 +939,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 /** Test default response handling is turned off for methods that return empty */
 function sampleGetBigNothing() {
   const client = new LibraryServiceClient();
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
 
   // Handle the operation using the event emitter pattern.
   client.getBigNothing({name: formattedName})
@@ -1002,7 +1002,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 /** Test response handling for methods that return empty */
 async function sampleGetBigNothing() {
   const client = new LibraryServiceClient();
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
 
   // Create a job whose results you can either wait for now, or get later
   const [operation] = await client.getBigNothing({name: formattedName});
@@ -1049,7 +1049,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 /** Test default response handling is turned off for methods that return empty */
 async function sampleGetBigNothing() {
   const client = new LibraryServiceClient();
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
 
   // Create a job whose results you can either wait for now, or get later
   const [operation] = await client.getBigNothing({name: formattedName});
@@ -1094,7 +1094,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 /** Test response handling for methods that return empty */
 function sampleGetBigNothing() {
   const client = new LibraryServiceClient();
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
 
   // Handle the operation using the promise pattern.
   client.getBigNothing({name: formattedName})
@@ -1152,7 +1152,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 /** Test default response handling is turned off for methods that return empty */
 function sampleGetBigNothing() {
   const client = new LibraryServiceClient();
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
 
   // Handle the operation using the promise pattern.
   client.getBigNothing({name: formattedName})
@@ -1208,7 +1208,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 
 function sampleGetBook() {
   const client = new LibraryServiceClient();
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
   client.getBook({name: formattedName})
     .then(responses => {
       const response = responses[0];
@@ -1306,7 +1306,7 @@ function sampleMonologAboutBook() {
     }
     console.log(`The stage of the comment is: ${response.stage}`);
   });
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
   const request = {
     name: formattedName,
   };
@@ -1785,8 +1785,8 @@ function sampleTestOptionalRequiredFlatteningParams(paramFloat, paramLong) {
   const requiredSingularString = '';
   const requiredSingularBytes = Buffer.from('');
   const requiredSingularMessage = {};
-  const formattedRequiredSingularResourceName = client.bookPath('[SHELF]', '[BOOK]');
-  const formattedRequiredSingularResourceNameOneof = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedRequiredSingularResourceName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
+  const formattedRequiredSingularResourceNameOneof = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
   const requiredSingularResourceNameCommon = '';
   const requiredSingularFixed32 = 0;
   const requiredSingularFixed64 = 0;
@@ -1954,7 +1954,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 
 function sampleGetBookFromAbsolutelyAnywhere() {
   const client = new LibraryServiceClient();
-  const formattedName = client.bookPath('[SHELF]', 'The ID of the book');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', 'The ID of the book');
   client.getBookFromAbsolutelyAnywhere({name: formattedName})
     .then(responses => {
       const response = responses[0];
@@ -1998,7 +1998,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 
 function sampleGetBookFromAbsolutelyAnywhere() {
   const client = new LibraryServiceClient();
-  const formattedName = client.bookPath('The Shelf to search for the book', 'The ID of the book');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', 'The ID of the book');
   client.getBookFromAbsolutelyAnywhere({name: formattedName})
     .then(responses => {
       const response = responses[0];
@@ -2102,7 +2102,7 @@ const {LibraryServiceClient} = require('@google-cloud/library').v1;
 async function sampleGetBigBook(shelf) {
   const client = new LibraryServiceClient();
   // const shelf = 'Novel\\"`\b\t\n\r';
-  const formattedName = client.bookPath(shelf, 'War and Peace');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', 'War and Peace');
 
   // Create a job whose results you can either wait for now, or get later
   const [operation] = await client.getBigBook({name: formattedName});
@@ -2177,7 +2177,7 @@ function sampleDiscussBook(imageFileName, stage) {
   });
   // const imageFileName = 'image_file.jpg';
   // const stage = 'DRAFT';
-  const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+  const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
   const comment = fs.readFileSync('comment_file').toString('base64');
   const comment2 = {
     comment: comment,
@@ -2240,7 +2240,7 @@ describe('LibraryServiceSmokeTest', () => {
       // optional auth parameters.
     });
 
-    const formattedName = client.bookPath("testShelf-" + Date.now().toString(), projectId);
+    const formattedName = client.bookFromArchivePath('[ARCHIVE]', projectId);
     const rating = 'GOOD';
     const book = {
       rating: rating,
@@ -5158,7 +5158,7 @@ class LibraryServiceClient {
         'archives/{archive}/books/{book}'
       ),
       bookPathTemplate: new gaxModule.PathTemplate(
-        'shelves/{shelf}/books/{book}'
+        'shelves/{shelf}/books/{book_one}~{book_two}'
       ),
       bookFromArchivePathTemplate: new gaxModule.PathTemplate(
         'archives/{archive}/books/{book}'
@@ -5974,7 +5974,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * client.getBook({name: formattedName})
    *   .then(responses => {
    *     const response = responses[0];
@@ -6199,7 +6199,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * client.deleteBook({name: formattedName}).catch(err => {
    *   console.error(err);
    * });
@@ -6261,7 +6261,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * const book = {};
    * const request = {
    *   name: formattedName,
@@ -6321,7 +6321,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * const formattedOtherShelfName = client.shelfPath('[SHELF]');
    * const request = {
    *   name: formattedName,
@@ -6521,7 +6521,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * const comment = Buffer.from('');
    * const stage = 'UNSET';
    * const alignment = 'CHAR';
@@ -6646,8 +6646,8 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
-   * const formattedAltBookName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
+   * const formattedAltBookName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * const formattedPlace = client.locationPath('[PROJECT]', '[LOCATION]');
    * const formattedFolder = client.folderPath('[FOLDER]');
    * const request = {
@@ -6711,7 +6711,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * client.getBookFromAbsolutelyAnywhere({name: formattedName})
    *   .then(responses => {
    *     const response = responses[0];
@@ -6765,7 +6765,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * const indexName = 'default index';
    * const indexMapItem = '';
    * const indexMap = {'default_key' : indexMapItem};
@@ -6797,7 +6797,8 @@ class LibraryServiceClient {
 
   /**
    * Test server streaming
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * @param {Object} request
    *   The request object that will be sent.
@@ -6831,7 +6832,8 @@ class LibraryServiceClient {
 
   /**
    * Test server streaming, non-paged responses.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * @param {Object} request
    *   The request object that will be sent.
@@ -6885,7 +6887,7 @@ class LibraryServiceClient {
    * const stream = client.discussBook().on('data', response => {
    *   // doThingsWith(response)
    * });
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * const request = {
    *   name: formattedName,
    * };
@@ -6926,7 +6928,7 @@ class LibraryServiceClient {
    *   }
    *   // doThingsWith(response)
    * });
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * const request = {
    *   name: formattedName,
    * };
@@ -6944,8 +6946,10 @@ class LibraryServiceClient {
   }
 
   /**
-   * Test samplegen response handling when a client streaming method returns Empty.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+   * Test samplegen response handling when a client streaming method returns
+   * Empty.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to
+   * have the google.api.http option.
    *
    * @param {Object} [options]
    *   Optional parameters. You can override the default settings for this call, e.g, timeout,
@@ -6970,7 +6974,7 @@ class LibraryServiceClient {
    *   }
    *   // doThingsWith(response)
    * });
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * const request = {
    *   name: formattedName,
    * };
@@ -7239,7 +7243,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    *
    * // Handle the operation using the promise pattern.
    * client.getBigBook({name: formattedName})
@@ -7258,7 +7262,7 @@ class LibraryServiceClient {
    *     console.error(err);
    *   });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    *
    * // Handle the operation using the event emitter pattern.
    * client.getBigBook({name: formattedName})
@@ -7286,7 +7290,7 @@ class LibraryServiceClient {
    *     console.error(err);
    *   });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    *
    * // Handle the operation using the await pattern.
    * const [operation] = await client.getBigBook({name: formattedName});
@@ -7336,7 +7340,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    *
    * // Handle the operation using the promise pattern.
    * client.getBigNothing({name: formattedName})
@@ -7355,7 +7359,7 @@ class LibraryServiceClient {
    *     console.error(err);
    *   });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    *
    * // Handle the operation using the event emitter pattern.
    * client.getBigNothing({name: formattedName})
@@ -7383,7 +7387,7 @@ class LibraryServiceClient {
    *     console.error(err);
    *   });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    *
    * // Handle the operation using the await pattern.
    * const [operation] = await client.getBigNothing({name: formattedName});
@@ -7634,8 +7638,8 @@ class LibraryServiceClient {
    * const requiredSingularString = '';
    * const requiredSingularBytes = Buffer.from('');
    * const requiredSingularMessage = {};
-   * const formattedRequiredSingularResourceName = client.bookPath('[SHELF]', '[BOOK]');
-   * const formattedRequiredSingularResourceNameOneof = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedRequiredSingularResourceName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
+   * const formattedRequiredSingularResourceNameOneof = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * const requiredSingularResourceNameCommon = '';
    * const requiredSingularFixed32 = 0;
    * const requiredSingularFixed64 = 0;
@@ -8065,8 +8069,9 @@ class LibraryServiceClient {
   }
 
   /**
-   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-   * New APIs should always create a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub
+   * (CreateSubscription) for historical reasons. New APIs should always create
+   * a separate message for a request.
    *
    * @param {Object} request
    *   The request object that will be sent.
@@ -8155,7 +8160,7 @@ class LibraryServiceClient {
    *   // optional auth parameters.
    * });
    *
-   * const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+   * const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
    * client.saveBook({name: formattedName}).catch(err => {
    *   console.error(err);
    * });
@@ -8255,13 +8260,15 @@ class LibraryServiceClient {
    * Return a fully-qualified book resource name string.
    *
    * @param {String} shelf
-   * @param {String} book
+   * @param {String} bookOne
+   * @param {String} bookTwo
    * @returns {String}
    */
-  bookPath(shelf, book) {
+  bookPath(shelf, bookOne, bookTwo) {
     return this._pathTemplates.bookPathTemplate.render({
       shelf: shelf,
-      book: book,
+      book_one: bookOne,
+      book_two: bookTwo,
     });
   }
 
@@ -8448,12 +8455,25 @@ class LibraryServiceClient {
    *
    * @param {String} bookName
    *   A fully-qualified path representing a book resources.
-   * @returns {String} - A string representing the book.
+   * @returns {String} - A string representing the book_one.
    */
-  matchBookFromBookName(bookName) {
+  matchBookOneFromBookName(bookName) {
     return this._pathTemplates.bookPathTemplate
       .match(bookName)
-      .book;
+      .book_one;
+  }
+
+  /**
+   * Parse the bookName from a book resource.
+   *
+   * @param {String} bookName
+   *   A fully-qualified path representing a book resources.
+   * @returns {String} - A string representing the book_two.
+   */
+  matchBookTwoFromBookName(bookName) {
+    return this._pathTemplates.bookPathTemplate
+      .match(bookName)
+      .book_two;
   }
 
   /**
@@ -9779,7 +9799,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -9818,7 +9838,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -9914,7 +9934,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -9935,7 +9955,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -9963,7 +9983,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const book = {};
       const request = {
         name: formattedName,
@@ -10004,7 +10024,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const book = {};
       const request = {
         name: formattedName,
@@ -10035,7 +10055,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const formattedOtherShelfName = client.shelfPath('[SHELF]');
       const request = {
         name: formattedName,
@@ -10076,7 +10096,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const formattedOtherShelfName = client.shelfPath('[SHELF]');
       const request = {
         name: formattedName,
@@ -10164,7 +10184,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const comment = '95';
       const stage = 'UNSET';
       const alignment = 'CHAR';
@@ -10195,7 +10215,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const comment = '95';
       const stage = 'UNSET';
       const alignment = 'CHAR';
@@ -10303,8 +10323,8 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
-      const formattedAltBookName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
+      const formattedAltBookName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const formattedPlace = client.locationPath('[PROJECT]', '[LOCATION]');
       const formattedFolder = client.folderPath('[FOLDER]');
       const request = {
@@ -10346,8 +10366,8 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
-      const formattedAltBookName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
+      const formattedAltBookName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const formattedPlace = client.locationPath('[PROJECT]', '[LOCATION]');
       const formattedFolder = client.folderPath('[FOLDER]');
       const request = {
@@ -10381,7 +10401,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -10418,7 +10438,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -10447,7 +10467,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const indexName = 'default index';
       const indexMapItem = 'indexMapItem1918721251';
       const indexMap = {'default_key' : indexMapItem};
@@ -10473,7 +10493,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const indexName = 'default index';
       const indexMapItem = 'indexMapItem1918721251';
       const indexMap = {'default_key' : indexMapItem};
@@ -10641,7 +10661,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -10674,7 +10694,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -10832,7 +10852,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -10872,7 +10892,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -10910,7 +10930,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -10939,7 +10959,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -10986,8 +11006,8 @@ describe('LibraryServiceClient', () => {
       const requiredSingularString = 'requiredSingularString-1949894503';
       const requiredSingularBytes = '-29';
       const requiredSingularMessage = {};
-      const formattedRequiredSingularResourceName = client.bookPath('[SHELF]', '[BOOK]');
-      const formattedRequiredSingularResourceNameOneof = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedRequiredSingularResourceName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
+      const formattedRequiredSingularResourceNameOneof = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const requiredSingularResourceNameCommon = 'requiredSingularResourceNameCommon-1126805002';
       const requiredSingularFixed32 = 720656715;
       const requiredSingularFixed64 = 720656810;
@@ -11134,8 +11154,8 @@ describe('LibraryServiceClient', () => {
       const requiredSingularString = 'requiredSingularString-1949894503';
       const requiredSingularBytes = '-29';
       const requiredSingularMessage = {};
-      const formattedRequiredSingularResourceName = client.bookPath('[SHELF]', '[BOOK]');
-      const formattedRequiredSingularResourceNameOneof = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedRequiredSingularResourceName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
+      const formattedRequiredSingularResourceNameOneof = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const requiredSingularResourceNameCommon = 'requiredSingularResourceNameCommon-1126805002';
       const requiredSingularFixed32 = 720656715;
       const requiredSingularFixed64 = 720656810;
@@ -11571,7 +11591,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
@@ -11592,7 +11612,7 @@ describe('LibraryServiceClient', () => {
       });
 
       // Mock request
-      const formattedName = client.bookPath('[SHELF]', '[BOOK]');
+      const formattedName = client.bookFromArchivePath('[ARCHIVE]', '[BOOK]');
       const request = {
         name: formattedName,
       };
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library.baseline
index 98d4e9088b..ee51cd1832 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library.baseline
@@ -57,7 +57,7 @@ function sampleBabbleAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -116,7 +116,7 @@ function sampleBabbleAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -173,7 +173,7 @@ function sampleBabbleAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -229,7 +229,7 @@ function sampleBabbleAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -496,7 +496,7 @@ function sampleGetBigBook($shelf)
     $libraryServiceClient = new LibraryServiceClient();
 
     // $shelf = 'Novel\\"`\b\t\n\r';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, 'War and Peace');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         // start the operation, keep the operation name, and resume later
@@ -596,7 +596,7 @@ function sampleGetBigBook($shelf, $bigBookName)
 
     // $shelf = 'Novel';
     // $bigBookName = 'War and Peace';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, $bigBookName);
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         // start the operation, keep the operation name, and resume later
@@ -676,7 +676,7 @@ function sampleGetBigBook($shelf)
     $libraryServiceClient = new LibraryServiceClient();
 
     // $shelf = 'Novel\\"`\b\t\n\r';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, 'War and Peace');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigBook($formattedName);
@@ -769,7 +769,7 @@ function sampleGetBigBook($shelf, $bigBookName)
 
     // $shelf = 'Novel';
     // $bigBookName = 'War and Peace';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, $bigBookName);
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigBook($formattedName);
@@ -841,7 +841,7 @@ function sampleGetBigNothing()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         // start the operation, keep the operation name, and resume later
@@ -903,7 +903,7 @@ function sampleGetBigNothing()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         // start the operation, keep the operation name, and resume later
@@ -965,7 +965,7 @@ function sampleGetBigNothing()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigNothing($formattedName);
@@ -1020,7 +1020,7 @@ function sampleGetBigNothing()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigNothing($formattedName);
@@ -1076,7 +1076,7 @@ function sampleGetBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $response = $libraryServiceClient->getBook($formattedName);
@@ -1183,7 +1183,7 @@ function sampleMonologAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -1242,7 +1242,7 @@ function sampleMonologAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -1760,8 +1760,8 @@ function sampleTestOptionalRequiredFlatteningParams($paramFloat, $paramLong)
     $requiredSingularString = '';
     $requiredSingularBytes = '';
     $requiredSingularMessage = new InnerMessage();
-    $formattedRequiredSingularResourceName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
-    $formattedRequiredSingularResourceNameOneof = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedRequiredSingularResourceName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+    $formattedRequiredSingularResourceNameOneof = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $requiredSingularResourceNameCommon = '';
     $requiredSingularFixed32 = 0;
     $requiredSingularFixed64 = 0;
@@ -1874,7 +1874,7 @@ function sampleGetBookFromAbsolutelyAnywhere()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', 'The ID of the book');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $response = $libraryServiceClient->getBookFromAbsolutelyAnywhere($formattedName);
@@ -1921,7 +1921,7 @@ function sampleGetBookFromAbsolutelyAnywhere()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('The Shelf to search for the book', 'The ID of the book');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('The Shelf to search for the book', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $response = $libraryServiceClient->getBookFromAbsolutelyAnywhere($formattedName);
@@ -2027,7 +2027,7 @@ function sampleGetBigBook($shelf)
     $libraryServiceClient = new LibraryServiceClient();
 
     // $shelf = 'Novel\\"`\b\t\n\r';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, 'War and Peace');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigBook($formattedName);
@@ -2117,7 +2117,7 @@ function sampleDiscussBook($imageFileName, $stage)
 
     // $imageFileName = 'image_file.jpg';
     // $stage = Stage::DRAFT;
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $comment = file_get_contents('comment_file');
     $comment2 = new Comment();
     $comment2->setComment($comment);
@@ -2202,7 +2202,7 @@ function sampleDiscussBook($imageFileName, $stage)
 
     // $imageFileName = 'image_file.jpg';
     // $stage = Stage::DRAFT;
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $comment = file_get_contents('comment_file');
     $comment2 = new Comment();
     $comment2->setComment($comment);
@@ -2455,11 +2455,11 @@ class LibraryServiceGapicClient
     private static $projectBookNameTemplate;
     private static $projectLocationPublisherBookNameTemplate;
     private static $projectReaderNameTemplate;
-    private static $projectShelfReaderNameTemplate;
+    private static $projectShelfReaderSurnameReaderFirstNameNameTemplate;
     private static $publisherNameTemplate;
     private static $readerNameTemplate;
     private static $shelfNameTemplate;
-    private static $shelfBookNameTemplate;
+    private static $shelfBookOneBookTwoNameTemplate;
     private static $pathTemplateMap;
 
     private $operationsClient;
@@ -2512,7 +2512,7 @@ class LibraryServiceGapicClient
     private static function getBookNameTemplate()
     {
         if (self::$bookNameTemplate == null) {
-            self::$bookNameTemplate = new PathTemplate('shelves/{shelf}/books/{book}');
+            self::$bookNameTemplate = new PathTemplate('shelves/{shelf}/books/{book_one}~{book_two}');
         }
 
         return self::$bookNameTemplate;
@@ -2599,13 +2599,13 @@ class LibraryServiceGapicClient
         return self::$projectReaderNameTemplate;
     }
 
-    private static function getProjectShelfReaderNameTemplate()
+    private static function getProjectShelfReaderSurnameReaderFirstNameNameTemplate()
     {
-        if (self::$projectShelfReaderNameTemplate == null) {
-            self::$projectShelfReaderNameTemplate = new PathTemplate('projects/{project}/shelves/{shelf}/readers/{reader}');
+        if (self::$projectShelfReaderSurnameReaderFirstNameNameTemplate == null) {
+            self::$projectShelfReaderSurnameReaderFirstNameNameTemplate = new PathTemplate('projects/{project}/shelves/{shelf}/readers/{reader_surname}.{reader_first_name}');
         }
 
-        return self::$projectShelfReaderNameTemplate;
+        return self::$projectShelfReaderSurnameReaderFirstNameNameTemplate;
     }
 
     private static function getPublisherNameTemplate()
@@ -2635,13 +2635,13 @@ class LibraryServiceGapicClient
         return self::$shelfNameTemplate;
     }
 
-    private static function getShelfBookNameTemplate()
+    private static function getShelfBookOneBookTwoNameTemplate()
     {
-        if (self::$shelfBookNameTemplate == null) {
-            self::$shelfBookNameTemplate = new PathTemplate('shelves/{shelf}/books/{book}');
+        if (self::$shelfBookOneBookTwoNameTemplate == null) {
+            self::$shelfBookOneBookTwoNameTemplate = new PathTemplate('shelves/{shelf}/books/{book_one}~{book_two}');
         }
 
-        return self::$shelfBookNameTemplate;
+        return self::$shelfBookOneBookTwoNameTemplate;
     }
 
 
@@ -2662,11 +2662,11 @@ class LibraryServiceGapicClient
                 'projectBook' => self::getProjectBookNameTemplate(),
                 'projectLocationPublisherBook' => self::getProjectLocationPublisherBookNameTemplate(),
                 'projectReader' => self::getProjectReaderNameTemplate(),
-                'projectShelfReader' => self::getProjectShelfReaderNameTemplate(),
+                'projectShelfReaderSurnameReaderFirstName' => self::getProjectShelfReaderSurnameReaderFirstNameNameTemplate(),
                 'publisher' => self::getPublisherNameTemplate(),
                 'reader' => self::getReaderNameTemplate(),
                 'shelf' => self::getShelfNameTemplate(),
-                'shelfBook' => self::getShelfBookNameTemplate(),
+                'shelfBookOneBookTwo' => self::getShelfBookOneBookTwoNameTemplate(),
             ];
         }
         return self::$pathTemplateMap;
@@ -2725,15 +2725,17 @@ class LibraryServiceGapicClient
      * a book resource.
      *
      * @param string $shelf
-     * @param string $book
+     * @param string $bookOne
+     * @param string $bookTwo
      * @return string The formatted book resource.
      * @experimental
      */
-    public static function bookName($shelf, $book)
+    public static function bookName($shelf, $bookOne, $bookTwo)
     {
         return self::getBookNameTemplate()->render([
             'shelf' => $shelf,
-            'book' => $book,
+            'book_one' => $bookOne,
+            'book_two' => $bookTwo,
         ]);
     }
 
@@ -2893,20 +2895,22 @@ class LibraryServiceGapicClient
 
     /**
      * Formats a string containing the fully-qualified path to represent
-     * a project_shelf_reader resource.
+     * a project_shelf_reader_surname_reader_first_name resource.
      *
      * @param string $project
      * @param string $shelf
-     * @param string $reader
-     * @return string The formatted project_shelf_reader resource.
+     * @param string $readerSurname
+     * @param string $readerFirstName
+     * @return string The formatted project_shelf_reader_surname_reader_first_name resource.
      * @experimental
      */
-    public static function projectShelfReaderName($project, $shelf, $reader)
+    public static function projectShelfReaderSurnameReaderFirstNameName($project, $shelf, $readerSurname, $readerFirstName)
     {
-        return self::getProjectShelfReaderNameTemplate()->render([
+        return self::getProjectShelfReaderSurnameReaderFirstNameNameTemplate()->render([
             'project' => $project,
             'shelf' => $shelf,
-            'reader' => $reader,
+            'reader_surname' => $readerSurname,
+            'reader_first_name' => $readerFirstName,
         ]);
     }
 
@@ -2963,18 +2967,20 @@ class LibraryServiceGapicClient
 
     /**
      * Formats a string containing the fully-qualified path to represent
-     * a shelf_book resource.
+     * a shelf_book_one_book_two resource.
      *
      * @param string $shelf
-     * @param string $book
-     * @return string The formatted shelf_book resource.
+     * @param string $bookOne
+     * @param string $bookTwo
+     * @return string The formatted shelf_book_one_book_two resource.
      * @experimental
      */
-    public static function shelfBookName($shelf, $book)
+    public static function shelfBookOneBookTwoName($shelf, $bookOne, $bookTwo)
     {
-        return self::getShelfBookNameTemplate()->render([
+        return self::getShelfBookOneBookTwoNameTemplate()->render([
             'shelf' => $shelf,
-            'book' => $book,
+            'book_one' => $bookOne,
+            'book_two' => $bookTwo,
         ]);
     }
 
@@ -2985,7 +2991,7 @@ class LibraryServiceGapicClient
      * - archive: archives/{archive}
      * - archiveBook: archives/{archive}/books/{book}
      * - archivedBook: archives/{archive}/books/{book}
-     * - book: shelves/{shelf}/books/{book}
+     * - book: shelves/{shelf}/books/{book_one}~{book_two}
      * - bookFromArchive: archives/{archive}/books/{book}
      * - folder: folders/{folder}
      * - inventory: projects/{project}/locations/{location}/publishers/{publisher}/inventory
@@ -2995,11 +3001,11 @@ class LibraryServiceGapicClient
      * - projectBook: projects/{project}/books/{book}
      * - projectLocationPublisherBook: projects/{project}/locations/{location}/publishers/{publisher}/inventory/books/{book}
      * - projectReader: projects/{project}/readers/{reader}
-     * - projectShelfReader: projects/{project}/shelves/{shelf}/readers/{reader}
+     * - projectShelfReaderSurnameReaderFirstName: projects/{project}/shelves/{shelf}/readers/{reader_surname}.{reader_first_name}
      * - publisher: projects/{project}/locations/{location}/publishers/{publisher}
      * - reader: projects/{project}/readers/{reader}
      * - shelf: shelves/{shelf}
-     * - shelfBook: shelves/{shelf}/books/{book}
+     * - shelfBookOneBookTwo: shelves/{shelf}/books/{book_one}~{book_two}
      *
      * The optional $template argument can be supplied to specify a particular pattern, and must
      * match one of the templates listed above. If no $template argument is provided, or if the
@@ -3522,7 +3528,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $response = $libraryServiceClient->getBook($formattedName);
      * } finally {
      *     $libraryServiceClient->close();
@@ -3656,7 +3662,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $libraryServiceClient->deleteBook($formattedName);
      * } finally {
      *     $libraryServiceClient->close();
@@ -3703,7 +3709,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $book = new Book();
      *     $response = $libraryServiceClient->updateBook($formattedName, $book);
      * } finally {
@@ -3770,7 +3776,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $formattedOtherShelfName = $libraryServiceClient->shelfName('[SHELF]');
      *     $response = $libraryServiceClient->moveBook($formattedName, $formattedOtherShelfName);
      * } finally {
@@ -3895,7 +3901,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $comment = '';
      *     $stage = Stage::UNSET;
      *     $alignment = Alignment::CHAR;
@@ -4004,8 +4010,8 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
-     *     $formattedAltBookName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+     *     $formattedAltBookName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $formattedPlace = $libraryServiceClient->locationName('[PROJECT]', '[LOCATION]');
      *     $formattedFolder = $libraryServiceClient->folderName('[FOLDER]');
      *     $response = $libraryServiceClient->getBookFromAnywhere($formattedName, $formattedAltBookName, $formattedPlace, $formattedFolder);
@@ -4063,7 +4069,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $response = $libraryServiceClient->getBookFromAbsolutelyAnywhere($formattedName);
      * } finally {
      *     $libraryServiceClient->close();
@@ -4119,7 +4125,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $indexName = 'default index';
      *     $indexMapItem = '';
      *     $indexMap = ['default_key' => $indexMapItem];
@@ -4168,7 +4174,8 @@ class LibraryServiceGapicClient
 
     /**
      * Test server streaming
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to
+     * have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -4213,7 +4220,8 @@ class LibraryServiceGapicClient
 
     /**
      * Test server streaming, non-paged responses.
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to
+     * have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -4263,7 +4271,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $request = new DiscussBookRequest();
      *     $request->setName($formattedName);
      *     // Write all requests to the server, then read all responses until the
@@ -4329,7 +4337,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $request = new DiscussBookRequest();
      *     $request->setName($formattedName);
      *     // Write data to server and wait for a response
@@ -4377,14 +4385,16 @@ class LibraryServiceGapicClient
     }
 
     /**
-     * Test samplegen response handling when a client streaming method returns Empty.
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+     * Test samplegen response handling when a client streaming method returns
+     * Empty.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to
+     * have the google.api.http option.
      *
      * Sample code:
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $request = new DiscussBookRequest();
      *     $request->setName($formattedName);
      *     // Write data to server and wait for a response
@@ -4566,7 +4576,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $operationResponse = $libraryServiceClient->getBigBook($formattedName);
      *     $operationResponse->pollUntilComplete();
      *     if ($operationResponse->operationSucceeded()) {
@@ -4643,7 +4653,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $operationResponse = $libraryServiceClient->getBigNothing($formattedName);
      *     $operationResponse->pollUntilComplete();
      *     if ($operationResponse->operationSucceeded()) {
@@ -4727,8 +4737,8 @@ class LibraryServiceGapicClient
      *     $requiredSingularString = '';
      *     $requiredSingularBytes = '';
      *     $requiredSingularMessage = new InnerMessage();
-     *     $formattedRequiredSingularResourceName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
-     *     $formattedRequiredSingularResourceNameOneof = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedRequiredSingularResourceName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+     *     $formattedRequiredSingularResourceNameOneof = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $requiredSingularResourceNameCommon = '';
      *     $requiredSingularFixed32 = 0;
      *     $requiredSingularFixed64 = 0;
@@ -5504,14 +5514,15 @@ class LibraryServiceGapicClient
     }
 
     /**
-     * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-     * New APIs should always create a separate message for a request.
+     * Test using resource messages as request objects. Only used by PubSub
+     * (CreateSubscription) for historical reasons. New APIs should always create
+     * a separate message for a request.
      *
      * Sample code:
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $libraryServiceClient->saveBook($formattedName);
      * } finally {
      *     $libraryServiceClient->close();
@@ -6818,13 +6829,9 @@ class LibraryServiceSmokeTest extends GeneratedTest
      */
     public function updateBookTest()
     {
-        $projectId = getenv('PROJECT_ID');
-        if ($projectId === false) {
-            $this->fail('Environment variable PROJECT_ID must be set for smoke test');
-        }
 
         $libraryServiceClient = new LibraryServiceClient();
-        $formattedName = $libraryServiceClient->shelfBookName('testShelf-'. time(), $projectId);
+        $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('testShelf-'. time(), '[BOOK_ONE]', '[BOOK_TWO]');
         $rating = Rating::GOOD;
         $book = new Book();
         $book->setRating($rating);
@@ -7551,7 +7558,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBook($formattedName);
         $this->assertEquals($expectedResponse, $response);
@@ -7591,7 +7598,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         try {
             $client->getBook($formattedName);
@@ -7706,7 +7713,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $client->deleteBook($formattedName);
         $actualRequests = $transport->popReceivedCalls();
@@ -7745,7 +7752,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         try {
             $client->deleteBook($formattedName);
@@ -7786,7 +7793,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $book = new Book();
 
         $response = $client->updateBook($formattedName, $book);
@@ -7830,7 +7837,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $book = new Book();
 
         try {
@@ -7872,7 +7879,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $formattedOtherShelfName = $client->shelfName('[SHELF]');
 
         $response = $client->moveBook($formattedName, $formattedOtherShelfName);
@@ -7916,7 +7923,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $formattedOtherShelfName = $client->shelfName('[SHELF]');
 
         try {
@@ -8018,7 +8025,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $comment = '95';
         $stage = Stage::UNSET;
         $alignment = Alignment::CHAR;
@@ -8068,7 +8075,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $comment = '95';
         $stage = Stage::UNSET;
         $alignment = Alignment::CHAR;
@@ -8199,8 +8206,8 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
-        $formattedAltBookName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+        $formattedAltBookName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $formattedPlace = $client->locationName('[PROJECT]', '[LOCATION]');
         $formattedFolder = $client->folderName('[FOLDER]');
 
@@ -8251,8 +8258,8 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
-        $formattedAltBookName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+        $formattedAltBookName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $formattedPlace = $client->locationName('[PROJECT]', '[LOCATION]');
         $formattedFolder = $client->folderName('[FOLDER]');
 
@@ -8293,7 +8300,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBookFromAbsolutelyAnywhere($formattedName);
         $this->assertEquals($expectedResponse, $response);
@@ -8333,7 +8340,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         try {
             $client->getBookFromAbsolutelyAnywhere($formattedName);
@@ -8364,7 +8371,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $indexName = 'default index';
         $indexMapItem = 'indexMapItem1918721251';
         $indexMap = ['default_key' => $indexMapItem];
@@ -8412,7 +8419,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $indexName = 'default index';
         $indexMapItem = 'indexMapItem1918721251';
         $indexMap = ['default_key' => $indexMapItem];
@@ -8677,13 +8684,13 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse3);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $request = new DiscussBookRequest();
         $request->setName($formattedName);
-        $formattedName2 = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName2 = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $request2 = new DiscussBookRequest();
         $request2->setName($formattedName2);
-        $formattedName3 = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName3 = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $request3 = new DiscussBookRequest();
         $request3->setName($formattedName3);
 
@@ -8973,7 +8980,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $operationsTransport->addResponse($completeOperation);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBigBook($formattedName);
         $this->assertFalse($response->isDone());
@@ -9051,7 +9058,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $operationsTransport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBigBook($formattedName);
         $this->assertFalse($response->isDone());
@@ -9113,7 +9120,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $operationsTransport->addResponse($completeOperation);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBigNothing($formattedName);
         $this->assertFalse($response->isDone());
@@ -9191,7 +9198,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $operationsTransport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBigNothing($formattedName);
         $this->assertFalse($response->isDone());
@@ -9242,8 +9249,8 @@ class LibraryServiceClientTest extends GeneratedTest
         $requiredSingularString = 'requiredSingularString-1949894503';
         $requiredSingularBytes = '-29';
         $requiredSingularMessage = new InnerMessage();
-        $formattedRequiredSingularResourceName = $client->shelfBookName('[SHELF]', '[BOOK]');
-        $formattedRequiredSingularResourceNameOneof = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedRequiredSingularResourceName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+        $formattedRequiredSingularResourceNameOneof = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $requiredSingularResourceNameCommon = 'requiredSingularResourceNameCommon-1126805002';
         $requiredSingularFixed32 = 720656715;
         $requiredSingularFixed64 = 720656810;
@@ -9522,8 +9529,8 @@ class LibraryServiceClientTest extends GeneratedTest
         $requiredSingularString = 'requiredSingularString-1949894503';
         $requiredSingularBytes = '-29';
         $requiredSingularMessage = new InnerMessage();
-        $formattedRequiredSingularResourceName = $client->shelfBookName('[SHELF]', '[BOOK]');
-        $formattedRequiredSingularResourceNameOneof = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedRequiredSingularResourceName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+        $formattedRequiredSingularResourceNameOneof = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $requiredSingularResourceNameCommon = 'requiredSingularResourceNameCommon-1126805002';
         $requiredSingularFixed32 = 720656715;
         $requiredSingularFixed64 = 720656810;
@@ -10061,7 +10068,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $client->saveBook($formattedName);
         $actualRequests = $transport->popReceivedCalls();
@@ -10100,7 +10107,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         try {
             $client->saveBook($formattedName);
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library_with_grpc_service_config.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library_with_grpc_service_config.baseline
index 2760d2f67a..e75726171b 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library_with_grpc_service_config.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library_with_grpc_service_config.baseline
@@ -57,7 +57,7 @@ function sampleBabbleAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -116,7 +116,7 @@ function sampleBabbleAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -173,7 +173,7 @@ function sampleBabbleAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -229,7 +229,7 @@ function sampleBabbleAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -496,7 +496,7 @@ function sampleGetBigBook($shelf)
     $libraryServiceClient = new LibraryServiceClient();
 
     // $shelf = 'Novel\\"`\b\t\n\r';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, 'War and Peace');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         // start the operation, keep the operation name, and resume later
@@ -596,7 +596,7 @@ function sampleGetBigBook($shelf, $bigBookName)
 
     // $shelf = 'Novel';
     // $bigBookName = 'War and Peace';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, $bigBookName);
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         // start the operation, keep the operation name, and resume later
@@ -676,7 +676,7 @@ function sampleGetBigBook($shelf)
     $libraryServiceClient = new LibraryServiceClient();
 
     // $shelf = 'Novel\\"`\b\t\n\r';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, 'War and Peace');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigBook($formattedName);
@@ -769,7 +769,7 @@ function sampleGetBigBook($shelf, $bigBookName)
 
     // $shelf = 'Novel';
     // $bigBookName = 'War and Peace';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, $bigBookName);
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigBook($formattedName);
@@ -841,7 +841,7 @@ function sampleGetBigNothing()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         // start the operation, keep the operation name, and resume later
@@ -903,7 +903,7 @@ function sampleGetBigNothing()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         // start the operation, keep the operation name, and resume later
@@ -965,7 +965,7 @@ function sampleGetBigNothing()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigNothing($formattedName);
@@ -1020,7 +1020,7 @@ function sampleGetBigNothing()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigNothing($formattedName);
@@ -1076,7 +1076,7 @@ function sampleGetBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $response = $libraryServiceClient->getBook($formattedName);
@@ -1183,7 +1183,7 @@ function sampleMonologAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -1242,7 +1242,7 @@ function sampleMonologAboutBook()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $request = new DiscussBookRequest();
     $request->setName($formattedName);
 
@@ -1760,8 +1760,8 @@ function sampleTestOptionalRequiredFlatteningParams($paramFloat, $paramLong)
     $requiredSingularString = '';
     $requiredSingularBytes = '';
     $requiredSingularMessage = new InnerMessage();
-    $formattedRequiredSingularResourceName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
-    $formattedRequiredSingularResourceNameOneof = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedRequiredSingularResourceName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+    $formattedRequiredSingularResourceNameOneof = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $requiredSingularResourceNameCommon = '';
     $requiredSingularFixed32 = 0;
     $requiredSingularFixed64 = 0;
@@ -1874,7 +1874,7 @@ function sampleGetBookFromAbsolutelyAnywhere()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', 'The ID of the book');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $response = $libraryServiceClient->getBookFromAbsolutelyAnywhere($formattedName);
@@ -1921,7 +1921,7 @@ function sampleGetBookFromAbsolutelyAnywhere()
 {
     $libraryServiceClient = new LibraryServiceClient();
 
-    $formattedName = $libraryServiceClient->shelfBookName('The Shelf to search for the book', 'The ID of the book');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('The Shelf to search for the book', '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $response = $libraryServiceClient->getBookFromAbsolutelyAnywhere($formattedName);
@@ -2027,7 +2027,7 @@ function sampleGetBigBook($shelf)
     $libraryServiceClient = new LibraryServiceClient();
 
     // $shelf = 'Novel\\"`\b\t\n\r';
-    $formattedName = $libraryServiceClient->shelfBookName($shelf, 'War and Peace');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName($shelf, '[BOOK_ONE]', '[BOOK_TWO]');
 
     try {
         $operationResponse = $libraryServiceClient->getBigBook($formattedName);
@@ -2117,7 +2117,7 @@ function sampleDiscussBook($imageFileName, $stage)
 
     // $imageFileName = 'image_file.jpg';
     // $stage = Stage::DRAFT;
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $comment = file_get_contents('comment_file');
     $comment2 = new Comment();
     $comment2->setComment($comment);
@@ -2202,7 +2202,7 @@ function sampleDiscussBook($imageFileName, $stage)
 
     // $imageFileName = 'image_file.jpg';
     // $stage = Stage::DRAFT;
-    $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+    $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
     $comment = file_get_contents('comment_file');
     $comment2 = new Comment();
     $comment2->setComment($comment);
@@ -2455,11 +2455,11 @@ class LibraryServiceGapicClient
     private static $projectBookNameTemplate;
     private static $projectLocationPublisherBookNameTemplate;
     private static $projectReaderNameTemplate;
-    private static $projectShelfReaderNameTemplate;
+    private static $projectShelfReaderSurnameReaderFirstNameNameTemplate;
     private static $publisherNameTemplate;
     private static $readerNameTemplate;
     private static $shelfNameTemplate;
-    private static $shelfBookNameTemplate;
+    private static $shelfBookOneBookTwoNameTemplate;
     private static $pathTemplateMap;
 
     private $operationsClient;
@@ -2512,7 +2512,7 @@ class LibraryServiceGapicClient
     private static function getBookNameTemplate()
     {
         if (self::$bookNameTemplate == null) {
-            self::$bookNameTemplate = new PathTemplate('shelves/{shelf}/books/{book}');
+            self::$bookNameTemplate = new PathTemplate('shelves/{shelf}/books/{book_one}~{book_two}');
         }
 
         return self::$bookNameTemplate;
@@ -2599,13 +2599,13 @@ class LibraryServiceGapicClient
         return self::$projectReaderNameTemplate;
     }
 
-    private static function getProjectShelfReaderNameTemplate()
+    private static function getProjectShelfReaderSurnameReaderFirstNameNameTemplate()
     {
-        if (self::$projectShelfReaderNameTemplate == null) {
-            self::$projectShelfReaderNameTemplate = new PathTemplate('projects/{project}/shelves/{shelf}/readers/{reader}');
+        if (self::$projectShelfReaderSurnameReaderFirstNameNameTemplate == null) {
+            self::$projectShelfReaderSurnameReaderFirstNameNameTemplate = new PathTemplate('projects/{project}/shelves/{shelf}/readers/{reader_surname}.{reader_first_name}');
         }
 
-        return self::$projectShelfReaderNameTemplate;
+        return self::$projectShelfReaderSurnameReaderFirstNameNameTemplate;
     }
 
     private static function getPublisherNameTemplate()
@@ -2635,13 +2635,13 @@ class LibraryServiceGapicClient
         return self::$shelfNameTemplate;
     }
 
-    private static function getShelfBookNameTemplate()
+    private static function getShelfBookOneBookTwoNameTemplate()
     {
-        if (self::$shelfBookNameTemplate == null) {
-            self::$shelfBookNameTemplate = new PathTemplate('shelves/{shelf}/books/{book}');
+        if (self::$shelfBookOneBookTwoNameTemplate == null) {
+            self::$shelfBookOneBookTwoNameTemplate = new PathTemplate('shelves/{shelf}/books/{book_one}~{book_two}');
         }
 
-        return self::$shelfBookNameTemplate;
+        return self::$shelfBookOneBookTwoNameTemplate;
     }
 
 
@@ -2662,11 +2662,11 @@ class LibraryServiceGapicClient
                 'projectBook' => self::getProjectBookNameTemplate(),
                 'projectLocationPublisherBook' => self::getProjectLocationPublisherBookNameTemplate(),
                 'projectReader' => self::getProjectReaderNameTemplate(),
-                'projectShelfReader' => self::getProjectShelfReaderNameTemplate(),
+                'projectShelfReaderSurnameReaderFirstName' => self::getProjectShelfReaderSurnameReaderFirstNameNameTemplate(),
                 'publisher' => self::getPublisherNameTemplate(),
                 'reader' => self::getReaderNameTemplate(),
                 'shelf' => self::getShelfNameTemplate(),
-                'shelfBook' => self::getShelfBookNameTemplate(),
+                'shelfBookOneBookTwo' => self::getShelfBookOneBookTwoNameTemplate(),
             ];
         }
         return self::$pathTemplateMap;
@@ -2725,15 +2725,17 @@ class LibraryServiceGapicClient
      * a book resource.
      *
      * @param string $shelf
-     * @param string $book
+     * @param string $bookOne
+     * @param string $bookTwo
      * @return string The formatted book resource.
      * @experimental
      */
-    public static function bookName($shelf, $book)
+    public static function bookName($shelf, $bookOne, $bookTwo)
     {
         return self::getBookNameTemplate()->render([
             'shelf' => $shelf,
-            'book' => $book,
+            'book_one' => $bookOne,
+            'book_two' => $bookTwo,
         ]);
     }
 
@@ -2893,20 +2895,22 @@ class LibraryServiceGapicClient
 
     /**
      * Formats a string containing the fully-qualified path to represent
-     * a project_shelf_reader resource.
+     * a project_shelf_reader_surname_reader_first_name resource.
      *
      * @param string $project
      * @param string $shelf
-     * @param string $reader
-     * @return string The formatted project_shelf_reader resource.
+     * @param string $readerSurname
+     * @param string $readerFirstName
+     * @return string The formatted project_shelf_reader_surname_reader_first_name resource.
      * @experimental
      */
-    public static function projectShelfReaderName($project, $shelf, $reader)
+    public static function projectShelfReaderSurnameReaderFirstNameName($project, $shelf, $readerSurname, $readerFirstName)
     {
-        return self::getProjectShelfReaderNameTemplate()->render([
+        return self::getProjectShelfReaderSurnameReaderFirstNameNameTemplate()->render([
             'project' => $project,
             'shelf' => $shelf,
-            'reader' => $reader,
+            'reader_surname' => $readerSurname,
+            'reader_first_name' => $readerFirstName,
         ]);
     }
 
@@ -2963,18 +2967,20 @@ class LibraryServiceGapicClient
 
     /**
      * Formats a string containing the fully-qualified path to represent
-     * a shelf_book resource.
+     * a shelf_book_one_book_two resource.
      *
      * @param string $shelf
-     * @param string $book
-     * @return string The formatted shelf_book resource.
+     * @param string $bookOne
+     * @param string $bookTwo
+     * @return string The formatted shelf_book_one_book_two resource.
      * @experimental
      */
-    public static function shelfBookName($shelf, $book)
+    public static function shelfBookOneBookTwoName($shelf, $bookOne, $bookTwo)
     {
-        return self::getShelfBookNameTemplate()->render([
+        return self::getShelfBookOneBookTwoNameTemplate()->render([
             'shelf' => $shelf,
-            'book' => $book,
+            'book_one' => $bookOne,
+            'book_two' => $bookTwo,
         ]);
     }
 
@@ -2985,7 +2991,7 @@ class LibraryServiceGapicClient
      * - archive: archives/{archive}
      * - archiveBook: archives/{archive}/books/{book}
      * - archivedBook: archives/{archive}/books/{book}
-     * - book: shelves/{shelf}/books/{book}
+     * - book: shelves/{shelf}/books/{book_one}~{book_two}
      * - bookFromArchive: archives/{archive}/books/{book}
      * - folder: folders/{folder}
      * - inventory: projects/{project}/locations/{location}/publishers/{publisher}/inventory
@@ -2995,11 +3001,11 @@ class LibraryServiceGapicClient
      * - projectBook: projects/{project}/books/{book}
      * - projectLocationPublisherBook: projects/{project}/locations/{location}/publishers/{publisher}/inventory/books/{book}
      * - projectReader: projects/{project}/readers/{reader}
-     * - projectShelfReader: projects/{project}/shelves/{shelf}/readers/{reader}
+     * - projectShelfReaderSurnameReaderFirstName: projects/{project}/shelves/{shelf}/readers/{reader_surname}.{reader_first_name}
      * - publisher: projects/{project}/locations/{location}/publishers/{publisher}
      * - reader: projects/{project}/readers/{reader}
      * - shelf: shelves/{shelf}
-     * - shelfBook: shelves/{shelf}/books/{book}
+     * - shelfBookOneBookTwo: shelves/{shelf}/books/{book_one}~{book_two}
      *
      * The optional $template argument can be supplied to specify a particular pattern, and must
      * match one of the templates listed above. If no $template argument is provided, or if the
@@ -3522,7 +3528,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $response = $libraryServiceClient->getBook($formattedName);
      * } finally {
      *     $libraryServiceClient->close();
@@ -3656,7 +3662,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $libraryServiceClient->deleteBook($formattedName);
      * } finally {
      *     $libraryServiceClient->close();
@@ -3703,7 +3709,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $book = new Book();
      *     $response = $libraryServiceClient->updateBook($formattedName, $book);
      * } finally {
@@ -3770,7 +3776,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $formattedOtherShelfName = $libraryServiceClient->shelfName('[SHELF]');
      *     $response = $libraryServiceClient->moveBook($formattedName, $formattedOtherShelfName);
      * } finally {
@@ -3895,7 +3901,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $comment = '';
      *     $stage = Stage::UNSET;
      *     $alignment = Alignment::CHAR;
@@ -4004,8 +4010,8 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
-     *     $formattedAltBookName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+     *     $formattedAltBookName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $formattedPlace = $libraryServiceClient->locationName('[PROJECT]', '[LOCATION]');
      *     $formattedFolder = $libraryServiceClient->folderName('[FOLDER]');
      *     $response = $libraryServiceClient->getBookFromAnywhere($formattedName, $formattedAltBookName, $formattedPlace, $formattedFolder);
@@ -4063,7 +4069,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $response = $libraryServiceClient->getBookFromAbsolutelyAnywhere($formattedName);
      * } finally {
      *     $libraryServiceClient->close();
@@ -4119,7 +4125,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $indexName = 'default index';
      *     $indexMapItem = '';
      *     $indexMap = ['default_key' => $indexMapItem];
@@ -4168,7 +4174,8 @@ class LibraryServiceGapicClient
 
     /**
      * Test server streaming
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to
+     * have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -4213,7 +4220,8 @@ class LibraryServiceGapicClient
 
     /**
      * Test server streaming, non-paged responses.
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to
+     * have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -4263,7 +4271,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $request = new DiscussBookRequest();
      *     $request->setName($formattedName);
      *     // Write all requests to the server, then read all responses until the
@@ -4329,7 +4337,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $request = new DiscussBookRequest();
      *     $request->setName($formattedName);
      *     // Write data to server and wait for a response
@@ -4377,14 +4385,16 @@ class LibraryServiceGapicClient
     }
 
     /**
-     * Test samplegen response handling when a client streaming method returns Empty.
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+     * Test samplegen response handling when a client streaming method returns
+     * Empty.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to
+     * have the google.api.http option.
      *
      * Sample code:
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $request = new DiscussBookRequest();
      *     $request->setName($formattedName);
      *     // Write data to server and wait for a response
@@ -4566,7 +4576,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $operationResponse = $libraryServiceClient->getBigBook($formattedName);
      *     $operationResponse->pollUntilComplete();
      *     if ($operationResponse->operationSucceeded()) {
@@ -4643,7 +4653,7 @@ class LibraryServiceGapicClient
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $operationResponse = $libraryServiceClient->getBigNothing($formattedName);
      *     $operationResponse->pollUntilComplete();
      *     if ($operationResponse->operationSucceeded()) {
@@ -4727,8 +4737,8 @@ class LibraryServiceGapicClient
      *     $requiredSingularString = '';
      *     $requiredSingularBytes = '';
      *     $requiredSingularMessage = new InnerMessage();
-     *     $formattedRequiredSingularResourceName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
-     *     $formattedRequiredSingularResourceNameOneof = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedRequiredSingularResourceName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+     *     $formattedRequiredSingularResourceNameOneof = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $requiredSingularResourceNameCommon = '';
      *     $requiredSingularFixed32 = 0;
      *     $requiredSingularFixed64 = 0;
@@ -5504,14 +5514,15 @@ class LibraryServiceGapicClient
     }
 
     /**
-     * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-     * New APIs should always create a separate message for a request.
+     * Test using resource messages as request objects. Only used by PubSub
+     * (CreateSubscription) for historical reasons. New APIs should always create
+     * a separate message for a request.
      *
      * Sample code:
      * ```
      * $libraryServiceClient = new LibraryServiceClient();
      * try {
-     *     $formattedName = $libraryServiceClient->shelfBookName('[SHELF]', '[BOOK]');
+     *     $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
      *     $libraryServiceClient->saveBook($formattedName);
      * } finally {
      *     $libraryServiceClient->close();
@@ -6843,13 +6854,9 @@ class LibraryServiceSmokeTest extends GeneratedTest
      */
     public function updateBookTest()
     {
-        $projectId = getenv('PROJECT_ID');
-        if ($projectId === false) {
-            $this->fail('Environment variable PROJECT_ID must be set for smoke test');
-        }
 
         $libraryServiceClient = new LibraryServiceClient();
-        $formattedName = $libraryServiceClient->shelfBookName('testShelf-'. time(), $projectId);
+        $formattedName = $libraryServiceClient->shelfBookOneBookTwoName('testShelf-'. time(), '[BOOK_ONE]', '[BOOK_TWO]');
         $rating = Rating::GOOD;
         $book = new Book();
         $book->setRating($rating);
@@ -7576,7 +7583,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBook($formattedName);
         $this->assertEquals($expectedResponse, $response);
@@ -7616,7 +7623,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         try {
             $client->getBook($formattedName);
@@ -7731,7 +7738,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $client->deleteBook($formattedName);
         $actualRequests = $transport->popReceivedCalls();
@@ -7770,7 +7777,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         try {
             $client->deleteBook($formattedName);
@@ -7811,7 +7818,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $book = new Book();
 
         $response = $client->updateBook($formattedName, $book);
@@ -7855,7 +7862,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $book = new Book();
 
         try {
@@ -7897,7 +7904,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $formattedOtherShelfName = $client->shelfName('[SHELF]');
 
         $response = $client->moveBook($formattedName, $formattedOtherShelfName);
@@ -7941,7 +7948,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $formattedOtherShelfName = $client->shelfName('[SHELF]');
 
         try {
@@ -8043,7 +8050,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $comment = '95';
         $stage = Stage::UNSET;
         $alignment = Alignment::CHAR;
@@ -8093,7 +8100,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $comment = '95';
         $stage = Stage::UNSET;
         $alignment = Alignment::CHAR;
@@ -8224,8 +8231,8 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
-        $formattedAltBookName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+        $formattedAltBookName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $formattedPlace = $client->locationName('[PROJECT]', '[LOCATION]');
         $formattedFolder = $client->folderName('[FOLDER]');
 
@@ -8276,8 +8283,8 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
-        $formattedAltBookName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+        $formattedAltBookName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $formattedPlace = $client->locationName('[PROJECT]', '[LOCATION]');
         $formattedFolder = $client->folderName('[FOLDER]');
 
@@ -8318,7 +8325,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBookFromAbsolutelyAnywhere($formattedName);
         $this->assertEquals($expectedResponse, $response);
@@ -8358,7 +8365,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         try {
             $client->getBookFromAbsolutelyAnywhere($formattedName);
@@ -8389,7 +8396,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $indexName = 'default index';
         $indexMapItem = 'indexMapItem1918721251';
         $indexMap = ['default_key' => $indexMapItem];
@@ -8437,7 +8444,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $indexName = 'default index';
         $indexMapItem = 'indexMapItem1918721251';
         $indexMap = ['default_key' => $indexMapItem];
@@ -8702,13 +8709,13 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse3);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $request = new DiscussBookRequest();
         $request->setName($formattedName);
-        $formattedName2 = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName2 = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $request2 = new DiscussBookRequest();
         $request2->setName($formattedName2);
-        $formattedName3 = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName3 = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $request3 = new DiscussBookRequest();
         $request3->setName($formattedName3);
 
@@ -8998,7 +9005,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $operationsTransport->addResponse($completeOperation);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBigBook($formattedName);
         $this->assertFalse($response->isDone());
@@ -9076,7 +9083,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $operationsTransport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBigBook($formattedName);
         $this->assertFalse($response->isDone());
@@ -9138,7 +9145,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $operationsTransport->addResponse($completeOperation);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBigNothing($formattedName);
         $this->assertFalse($response->isDone());
@@ -9216,7 +9223,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $operationsTransport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $response = $client->getBigNothing($formattedName);
         $this->assertFalse($response->isDone());
@@ -9267,8 +9274,8 @@ class LibraryServiceClientTest extends GeneratedTest
         $requiredSingularString = 'requiredSingularString-1949894503';
         $requiredSingularBytes = '-29';
         $requiredSingularMessage = new InnerMessage();
-        $formattedRequiredSingularResourceName = $client->shelfBookName('[SHELF]', '[BOOK]');
-        $formattedRequiredSingularResourceNameOneof = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedRequiredSingularResourceName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+        $formattedRequiredSingularResourceNameOneof = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $requiredSingularResourceNameCommon = 'requiredSingularResourceNameCommon-1126805002';
         $requiredSingularFixed32 = 720656715;
         $requiredSingularFixed64 = 720656810;
@@ -9547,8 +9554,8 @@ class LibraryServiceClientTest extends GeneratedTest
         $requiredSingularString = 'requiredSingularString-1949894503';
         $requiredSingularBytes = '-29';
         $requiredSingularMessage = new InnerMessage();
-        $formattedRequiredSingularResourceName = $client->shelfBookName('[SHELF]', '[BOOK]');
-        $formattedRequiredSingularResourceNameOneof = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedRequiredSingularResourceName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
+        $formattedRequiredSingularResourceNameOneof = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
         $requiredSingularResourceNameCommon = 'requiredSingularResourceNameCommon-1126805002';
         $requiredSingularFixed32 = 720656715;
         $requiredSingularFixed64 = 720656810;
@@ -10086,7 +10093,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse($expectedResponse);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         $client->saveBook($formattedName);
         $actualRequests = $transport->popReceivedCalls();
@@ -10125,7 +10132,7 @@ class LibraryServiceClientTest extends GeneratedTest
         $transport->addResponse(null, $status);
 
         // Mock request
-        $formattedName = $client->shelfBookName('[SHELF]', '[BOOK]');
+        $formattedName = $client->shelfBookOneBookTwoName('[SHELF]', '[BOOK_ONE]', '[BOOK_TWO]');
 
         try {
             $client->saveBook($formattedName);
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/python_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/python_library.baseline
index cac10507b1..2ef0f1ad96 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/python_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/python_library.baseline
@@ -284,7 +284,7 @@ LibraryServiceClient
 
     client = library_v1.LibraryServiceClient()
 
-    name = client.book_path('[SHELF]', '[BOOK]')
+    name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
     # TODO: Initialize `book`:
     book = {}
@@ -744,7 +744,7 @@ LibraryServiceClient
 
     client = library_v1.LibraryServiceClient()
 
-    name = client.book_path('[SHELF]', '[BOOK]')
+    name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
     # TODO: Initialize `book`:
     book = {}
@@ -1174,12 +1174,13 @@ class LibraryServiceClient(object):
         )
 
     @classmethod
-    def book_path(cls, shelf, book):
+    def book_path(cls, shelf, book_one, book_two):
         """Return a fully-qualified book string."""
         return google.api_core.path_template.expand(
-            'shelves/{shelf}/books/{book}',
+            'shelves/{shelf}/books/{book_one}~{book_two}',
             shelf=shelf,
-            book=book,
+            book_one=book_one,
+            book_two=book_two,
         )
 
     @classmethod
@@ -1890,7 +1891,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>>
             >>> response = client.get_book(name)
 
@@ -2052,7 +2053,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>>
             >>> client.delete_book(name)
 
@@ -2117,7 +2118,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>>
             >>> # TODO: Initialize `book`:
             >>> book = {}
@@ -2202,7 +2203,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>> other_shelf_name = client.shelf_path('[SHELF]')
             >>>
             >>> response = client.move_book(name, other_shelf_name)
@@ -2352,7 +2353,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>> comment = b''
             >>> stage = enums.Comment.Stage.UNSET
             >>> alignment = enums.SomeMessage2.SomeMessage3.Alignment.CHAR
@@ -2493,8 +2494,8 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
-            >>> alt_book_name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
+            >>> alt_book_name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>> place = client.location_path('[PROJECT]', '[LOCATION]')
             >>> folder = client.folder_path('[FOLDER]')
             >>>
@@ -2568,7 +2569,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>>
             >>> response = client.get_book_from_absolutely_anywhere(name)
 
@@ -2637,7 +2638,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>> index_name = 'default index'
             >>>
             >>> # TODO: Initialize `index_map_item`:
@@ -2701,7 +2702,8 @@ class LibraryServiceClient(object):
             metadata=None):
         """
         Test server streaming
-        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to
+        have the google.api.http option.
 
         Example:
             >>> from google.cloud.example import library_v1
@@ -2757,7 +2759,8 @@ class LibraryServiceClient(object):
             metadata=None):
         """
         Test server streaming, non-paged responses.
-        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to
+        have the google.api.http option.
 
         Example:
             >>> from google.cloud.example import library_v1
@@ -2820,7 +2823,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>> request = {'name': name}
             >>>
             >>> requests = [request]
@@ -2875,7 +2878,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>> request = {'name': name}
             >>>
             >>> requests = [request]
@@ -2921,15 +2924,17 @@ class LibraryServiceClient(object):
             timeout=google.api_core.gapic_v1.method.DEFAULT,
             metadata=None):
         """
-        Test samplegen response handling when a client streaming method returns Empty.
-        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+        Test samplegen response handling when a client streaming method returns
+        Empty.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to
+        have the google.api.http option.
 
         Example:
             >>> from google.cloud.example import library_v1
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>> request = {'name': name}
             >>>
             >>> requests = [request]
@@ -3140,7 +3145,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>>
             >>> response = client.get_big_book(name)
             >>>
@@ -3219,7 +3224,7 @@ class LibraryServiceClient(object):
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>>
             >>> response = client.get_big_nothing(name)
             >>>
@@ -3446,8 +3451,8 @@ class LibraryServiceClient(object):
             >>>
             >>> # TODO: Initialize `required_singular_message`:
             >>> required_singular_message = {}
-            >>> required_singular_resource_name = client.book_path('[SHELF]', '[BOOK]')
-            >>> required_singular_resource_name_oneof = client.book_path('[SHELF]', '[BOOK]')
+            >>> required_singular_resource_name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
+            >>> required_singular_resource_name_oneof = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>>
             >>> # TODO: Initialize `required_singular_resource_name_common`:
             >>> required_singular_resource_name_common = ''
@@ -4400,15 +4405,16 @@ class LibraryServiceClient(object):
             timeout=google.api_core.gapic_v1.method.DEFAULT,
             metadata=None):
         """
-        Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-        New APIs should always create a separate message for a request.
+        Test using resource messages as request objects. Only used by PubSub
+        (CreateSubscription) for historical reasons. New APIs should always create
+        a separate message for a request.
 
         Example:
             >>> from google.cloud.example import library_v1
             >>>
             >>> client = library_v1.LibraryServiceClient()
             >>>
-            >>> name = client.book_path('[SHELF]', '[BOOK]')
+            >>> name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
             >>>
             >>> client.save_book(name)
 
@@ -5538,7 +5544,8 @@ class LibraryServiceGrpcTransport(object):
         """Return the gRPC stub for :meth:`LibraryServiceClient.stream_shelves`.
 
         Test server streaming
-        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to
+        have the google.api.http option.
 
         Returns:
             Callable: A callable which accepts the appropriate
@@ -5552,7 +5559,8 @@ class LibraryServiceGrpcTransport(object):
         """Return the gRPC stub for :meth:`LibraryServiceClient.stream_books`.
 
         Test server streaming, non-paged responses.
-        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to
+        have the google.api.http option.
 
         Returns:
             Callable: A callable which accepts the appropriate
@@ -5591,8 +5599,10 @@ class LibraryServiceGrpcTransport(object):
     def babble_about_book(self):
         """Return the gRPC stub for :meth:`LibraryServiceClient.babble_about_book`.
 
-        Test samplegen response handling when a client streaming method returns Empty.
-        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+        Test samplegen response handling when a client streaming method returns
+        Empty.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to
+        have the google.api.http option.
 
         Returns:
             Callable: A callable which accepts the appropriate
@@ -5730,8 +5740,9 @@ class LibraryServiceGrpcTransport(object):
     def save_book(self):
         """Return the gRPC stub for :meth:`LibraryServiceClient.save_book`.
 
-        Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-        New APIs should always create a separate message for a request.
+        Test using resource messages as request objects. Only used by PubSub
+        (CreateSubscription) for historical reasons. New APIs should always create
+        a separate message for a request.
 
         Returns:
             Callable: A callable which accepts the appropriate
@@ -6075,7 +6086,7 @@ def sample_babble_about_book():
 
   client = library_v1.LibraryServiceClient()
 
-  name = client.book_path('[SHELF]', '[BOOK]')
+  name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
   request = {'name': name}
 
   requests = [request]
@@ -6124,7 +6135,7 @@ def sample_babble_about_book():
 
   client = library_v1.LibraryServiceClient()
 
-  name = client.book_path('[SHELF]', '[BOOK]')
+  name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
   request = {'name': name}
 
   requests = [request]
@@ -6367,7 +6378,7 @@ def sample_get_big_book(shelf):
   client = library_v1.LibraryServiceClient()
 
   # shelf = 'Novel\\"`\b\t\n\r'
-  name = client.book_path(shelf, 'War and Peace')
+  name = client.book_from_archive_path('[ARCHIVE]', 'War and Peace')
 
   operation = client.get_big_book(name)
 
@@ -6445,7 +6456,7 @@ def sample_get_big_book(shelf, big_book_name):
 
   # shelf = 'Novel'
   # big_book_name = 'War and Peace'
-  name = client.book_path(shelf, big_book_name)
+  name = client.book_from_archive_path('[ARCHIVE]', big_book_name)
 
   operation = client.get_big_book(name)
 
@@ -6502,7 +6513,7 @@ def sample_get_big_nothing():
 
   client = library_v1.LibraryServiceClient()
 
-  name = client.book_path('[SHELF]', '[BOOK]')
+  name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
   operation = client.get_big_nothing(name)
 
@@ -6553,7 +6564,7 @@ def sample_get_big_nothing():
 
   client = library_v1.LibraryServiceClient()
 
-  name = client.book_path('[SHELF]', '[BOOK]')
+  name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
   operation = client.get_big_nothing(name)
 
@@ -6603,7 +6614,7 @@ def sample_get_book():
 
   client = library_v1.LibraryServiceClient()
 
-  name = client.book_path('[SHELF]', '[BOOK]')
+  name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
   response = client.get_book(name)
   int_key_val = response.map_string_value[123]
@@ -6700,7 +6711,7 @@ def sample_monolog_about_book():
 
   client = library_v1.LibraryServiceClient()
 
-  name = client.book_path('[SHELF]', '[BOOK]')
+  name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
   request = {'name': name}
 
   requests = [request]
@@ -7147,8 +7158,8 @@ def sample_test_optional_required_flattening_params(param_float, param_long):
   required_singular_string = ''
   required_singular_bytes = b''
   required_singular_message = {}
-  required_singular_resource_name = client.book_path('[SHELF]', '[BOOK]')
-  required_singular_resource_name_oneof = client.book_path('[SHELF]', '[BOOK]')
+  required_singular_resource_name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
+  required_singular_resource_name_oneof = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
   required_singular_resource_name_common = ''
   required_singular_fixed32 = 0
   required_singular_fixed64 = 0
@@ -7249,7 +7260,7 @@ def sample_get_book_from_absolutely_anywhere():
 
   client = library_v1.LibraryServiceClient()
 
-  name = client.book_path('[SHELF]', 'The ID of the book')
+  name = client.book_from_archive_path('[ARCHIVE]', 'The ID of the book')
 
   response = client.get_book_from_absolutely_anywhere(name)
   print(u'Archived book found.')
@@ -7293,7 +7304,7 @@ def sample_get_book_from_absolutely_anywhere():
 
   client = library_v1.LibraryServiceClient()
 
-  name = client.book_path('The Shelf to search for the book', 'The ID of the book')
+  name = client.book_from_archive_path('[ARCHIVE]', 'The ID of the book')
 
   response = client.get_book_from_absolutely_anywhere(name)
   print(u'Book on shelf found.')
@@ -7391,7 +7402,7 @@ def sample_get_big_book(shelf):
   client = library_v1.LibraryServiceClient()
 
   # shelf = 'Novel\\"`\b\t\n\r'
-  name = client.book_path(shelf, 'War and Peace')
+  name = client.book_from_archive_path('[ARCHIVE]', 'War and Peace')
 
   operation = client.get_big_book(name)
 
@@ -7464,7 +7475,7 @@ def sample_discuss_book(image_file_name, stage):
 
   # image_file_name = 'image_file.jpg'
   # stage = enums.Comment.Stage.DRAFT
-  name = client.book_path('[SHELF]', '[BOOK]')
+  name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
   with io.open('comment_file', 'rb') as f:
     comment = f.read()
   comment_2 = {'comment': comment, 'stage': stage}
@@ -7608,7 +7619,7 @@ class TestSystemLibraryService(object):
         project_id = os.environ['PROJECT_ID']
 
         client = library_v1.LibraryServiceClient()
-        name = client.book_path('testShelf-{0}'.format(time.time()), project_id)
+        name = client.book_from_archive_path('[ARCHIVE]', project_id)
         rating = enums.Book.Rating.GOOD
         book = {'rating': rating}
         response = client.update_book(name, book)
@@ -8000,7 +8011,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         response = client.get_book(name)
         assert expected_response == response
@@ -8019,7 +8030,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         with pytest.raises(CustomException):
             client.get_book(name)
@@ -8077,7 +8088,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         client.delete_book(name)
 
@@ -8095,7 +8106,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         with pytest.raises(CustomException):
             client.delete_book(name)
@@ -8118,7 +8129,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         book = {}
 
         response = client.update_book(name, book)
@@ -8138,7 +8149,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         book = {}
 
         with pytest.raises(CustomException):
@@ -8162,7 +8173,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         other_shelf_name = client.shelf_path('[SHELF]')
 
         response = client.move_book(name, other_shelf_name)
@@ -8182,7 +8193,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         other_shelf_name = client.shelf_path('[SHELF]')
 
         with pytest.raises(CustomException):
@@ -8233,7 +8244,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         comment = b'95'
         stage = enums.Comment.Stage.UNSET
         alignment = enums.SomeMessage2.SomeMessage3.Alignment.CHAR
@@ -8256,7 +8267,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         comment = b'95'
         stage = enums.Comment.Stage.UNSET
         alignment = enums.SomeMessage2.SomeMessage3.Alignment.CHAR
@@ -8326,8 +8337,8 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
-        alt_book_name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
+        alt_book_name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         place = client.location_path('[PROJECT]', '[LOCATION]')
         folder = client.folder_path('[FOLDER]')
 
@@ -8348,8 +8359,8 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
-        alt_book_name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
+        alt_book_name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         place = client.location_path('[PROJECT]', '[LOCATION]')
         folder = client.folder_path('[FOLDER]')
 
@@ -8373,7 +8384,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         response = client.get_book_from_absolutely_anywhere(name)
         assert expected_response == response
@@ -8392,7 +8403,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         with pytest.raises(CustomException):
             client.get_book_from_absolutely_anywhere(name)
@@ -8405,7 +8416,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         index_name = 'default index'
         index_map_item = 'indexMapItem1918721251'
         index_map = {'default_key': index_map_item}
@@ -8426,7 +8437,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         index_name = 'default index'
         index_map_item = 'indexMapItem1918721251'
         index_map = {'default_key': index_map_item}
@@ -8536,7 +8547,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         request = {'name': name}
         request = library_pb2.DiscussBookRequest(**request)
         requests = [request]
@@ -8561,7 +8572,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         request = {'name': name}
 
         request = library_pb2.DiscussBookRequest(**request)
@@ -8585,7 +8596,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         request = {'name': name}
         request = library_pb2.DiscussBookRequest(**request)
         requests = [request]
@@ -8608,7 +8619,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         request = {'name': name}
 
         request = library_pb2.DiscussBookRequest(**request)
@@ -8626,7 +8637,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         request = {'name': name}
         request = library_pb2.DiscussBookRequest(**request)
         requests = [request]
@@ -8648,7 +8659,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         request = {'name': name}
 
         request = library_pb2.DiscussBookRequest(**request)
@@ -8763,7 +8774,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         response = client.get_big_book(name)
         result = response.result()
@@ -8789,7 +8800,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         response = client.get_big_book(name)
         exception = response.exception()
@@ -8810,7 +8821,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         response = client.get_big_nothing(name)
         result = response.result()
@@ -8836,7 +8847,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         response = client.get_big_nothing(name)
         exception = response.exception()
@@ -8864,8 +8875,8 @@ class TestLibraryServiceClient(object):
         required_singular_string = 'requiredSingularString-1949894503'
         required_singular_bytes = b'-29'
         required_singular_message = {}
-        required_singular_resource_name = client.book_path('[SHELF]', '[BOOK]')
-        required_singular_resource_name_oneof = client.book_path('[SHELF]', '[BOOK]')
+        required_singular_resource_name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
+        required_singular_resource_name_oneof = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         required_singular_resource_name_common = 'requiredSingularResourceNameCommon-1126805002'
         required_singular_fixed32 = 720656715
         required_singular_fixed64 = 720656810
@@ -8943,8 +8954,8 @@ class TestLibraryServiceClient(object):
         required_singular_string = 'requiredSingularString-1949894503'
         required_singular_bytes = b'-29'
         required_singular_message = {}
-        required_singular_resource_name = client.book_path('[SHELF]', '[BOOK]')
-        required_singular_resource_name_oneof = client.book_path('[SHELF]', '[BOOK]')
+        required_singular_resource_name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
+        required_singular_resource_name_oneof = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
         required_singular_resource_name_common = 'requiredSingularResourceNameCommon-1126805002'
         required_singular_fixed32 = 720656715
         required_singular_fixed64 = 720656810
@@ -9203,7 +9214,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup Request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         client.save_book(name)
 
@@ -9221,7 +9232,7 @@ class TestLibraryServiceClient(object):
             client = library_v1.LibraryServiceClient()
 
         # Setup request
-        name = client.book_path('[SHELF]', '[BOOK]')
+        name = client.book_from_archive_path('[ARCHIVE]', '[BOOK]')
 
         with pytest.raises(CustomException):
             client.save_book(name)
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library.baseline
index ba04545c71..aa5091cee3 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library.baseline
@@ -289,7 +289,7 @@ $ gem install library
 require "library"
 
 library_client = Library::Library.new
-formatted_name = Library::V1::LibraryServiceClient.book_path("testShelf-" + Time.new.to_i.to_s, project_id)
+formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", project_id)
 rating = :GOOD
 book = { rating: rating }
 response = library_client.update_book(formatted_name, book)
@@ -567,7 +567,7 @@ describe "LibraryServiceSmokeTest v1" do
     project_id = ENV["LIBRARY_TEST_PROJECT"].freeze
 
     library_client = Library::Library.new(version: :v1)
-    formatted_name = Library::V1::LibraryServiceClient.book_path("testShelf-" + Time.new.to_i.to_s, project_id)
+    formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", project_id)
     rating = :GOOD
     book = { rating: rating }
     response = library_client.update_book(formatted_name, book)
@@ -621,7 +621,7 @@ require "pathname"
 # require "library"
 #
 # library_client = Library::Library.new
-# formatted_name = Library::V1::LibraryServiceClient.book_path("testShelf-" + Time.new.to_i.to_s, project_id)
+# formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", project_id)
 # rating = :GOOD
 # book = { rating: rating }
 # response = library_client.update_book(formatted_name, book)
@@ -837,7 +837,7 @@ module Library
   # require "library"
   #
   # library_client = Library::Library.new(version: :v1)
-  # formatted_name = Library::V1::LibraryServiceClient.book_path("testShelf-" + Time.new.to_i.to_s, project_id)
+  # formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", project_id)
   # rating = :GOOD
   # book = { rating: rating }
   # response = library_client.update_book(formatted_name, book)
@@ -3057,7 +3057,7 @@ module Library
       private_constant :ARCHIVED_BOOK_PATH_TEMPLATE
 
       BOOK_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
-        "shelves/{shelf}/books/{book}"
+        "shelves/{shelf}/books/{book_one}~{book_two}"
       )
 
       private_constant :BOOK_PATH_TEMPLATE
@@ -3138,12 +3138,14 @@ module Library
 
       # Returns a fully-qualified book resource name string.
       # @param shelf [String]
-      # @param book [String]
+      # @param book_one [String]
+      # @param book_two [String]
       # @return [String]
-      def self.book_path shelf, book
+      def self.book_path shelf, book_one, book_two
         BOOK_PATH_TEMPLATE.render(
           :"shelf" => shelf,
-          :"book" => book
+          :"book_one" => book_one,
+          :"book_two" => book_two
         )
       end
 
@@ -3926,7 +3928,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   response = library_client.get_book(formatted_name)
 
       def get_book \
@@ -4014,7 +4016,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   library_client.delete_book(formatted_name)
 
       def delete_book \
@@ -4059,7 +4061,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #
       #   # TODO: Initialize `book`:
       #   book = {}
@@ -4102,7 +4104,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   formatted_other_shelf_name = Library::V1::LibraryServiceClient.shelf_path("[SHELF]")
       #   response = library_client.move_book(formatted_name, formatted_other_shelf_name)
 
@@ -4188,7 +4190,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   comment = ''
       #   stage = :UNSET
       #   alignment = :CHAR
@@ -4269,8 +4271,8 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
-      #   formatted_alt_book_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
+      #   formatted_alt_book_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   formatted_place = Library::V1::LibraryServiceClient.location_path("[PROJECT]", "[LOCATION]")
       #   formatted_folder = Library::V1::LibraryServiceClient.folder_path("[FOLDER]")
       #   response = library_client.get_book_from_anywhere(formatted_name, formatted_alt_book_name, formatted_place, formatted_folder)
@@ -4311,7 +4313,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   response = library_client.get_book_from_absolutely_anywhere(formatted_name)
 
       def get_book_from_absolutely_anywhere \
@@ -4346,7 +4348,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   index_name = "default index"
       #
       #   # TODO: Initialize `index_map_item`:
@@ -4371,7 +4373,8 @@ module Library
       end
 
       # Test server streaming
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to
+      # have the google.api.http option.
       #
       # @param name [String]
       #   The name of the shelf to stream.
@@ -4402,7 +4405,8 @@ module Library
       end
 
       # Test server streaming, non-paged responses.
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to
+      # have the google.api.http option.
       #
       # @param name [String]
       #   The name of the shelf whose books we'd like to list.
@@ -4455,7 +4459,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   request = { name: formatted_name }
       #   requests = [request]
       #   library_client.discuss_book(requests).each do |element|
@@ -4488,7 +4492,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   request = { name: formatted_name }
       #   requests = [request]
       #   response = library_client.monolog_about_book(requests)
@@ -4500,8 +4504,10 @@ module Library
         @monolog_about_book.call(request_protos, options)
       end
 
-      # Test samplegen response handling when a client streaming method returns Empty.
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+      # Test samplegen response handling when a client streaming method returns
+      # Empty.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to
+      # have the google.api.http option.
       #
       # @param reqs [Enumerable]
       #   The input requests.
@@ -4519,7 +4525,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   request = { name: formatted_name }
       #   requests = [request]
       #   library_client.babble_about_book(requests)
@@ -4644,7 +4650,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #
       #   # Register a callback during the method call.
       #   operation = library_client.get_big_book(formatted_name) do |op|
@@ -4704,7 +4710,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #
       #   # Register a callback during the method call.
       #   operation = library_client.get_big_nothing(formatted_name) do |op|
@@ -5050,8 +5056,8 @@ module Library
       #
       #   # TODO: Initialize `required_singular_message`:
       #   required_singular_message = {}
-      #   formatted_required_singular_resource_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
-      #   formatted_required_singular_resource_name_oneof = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_required_singular_resource_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
+      #   formatted_required_singular_resource_name_oneof = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #
       #   # TODO: Initialize `required_singular_resource_name_common`:
       #   required_singular_resource_name_common = ''
@@ -5664,8 +5670,9 @@ module Library
         @streaming_archive_books.call(request_protos, options)
       end
 
-      # Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-      # New APIs should always create a separate message for a request.
+      # Test using resource messages as request objects. Only used by PubSub
+      # (CreateSubscription) for historical reasons. New APIs should always create
+      # a separate message for a request.
       #
       # @param name [String]
       #   The resource name of the book.
@@ -5764,7 +5771,7 @@ module Library
       #   require "library"
       #
       #   library_client = Library::Library.new(version: :v1)
-      #   formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      #   formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       #   library_client.save_book(formatted_name)
 
       def save_book \
@@ -6443,7 +6450,7 @@ def sample_babble_about_book
   # Instantiate a client
   library_client = Library::Library.new version: :v1
 
-  formatted_name = library_client.class.book_path("[SHELF]", "[BOOK]")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "[BOOK]")
   request = { name: formatted_name }
 
   requests = [request]
@@ -6492,7 +6499,7 @@ def sample_babble_about_book
   # Instantiate a client
   library_client = Library::Library.new version: :v1
 
-  formatted_name = library_client.class.book_path("[SHELF]", "[BOOK]")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "[BOOK]")
   request = { name: formatted_name }
 
   requests = [request]
@@ -6735,7 +6742,7 @@ def sample_get_big_book shelf
   library_client = Library::Library.new version: :v1
 
   # shelf = "Novel\\\"`\b\t\n\r"
-  formatted_name = library_client.class.book_path(shelf, "War and Peace")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "War and Peace")
 
   # Make the long-running operation request
   operation = library_client.get_big_book(formatted_name)
@@ -6820,7 +6827,7 @@ def sample_get_big_book shelf, big_book_name
 
   # shelf = "Novel"
   # big_book_name = "War and Peace"
-  formatted_name = library_client.class.book_path(shelf, big_book_name)
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", big_book_name)
 
   # Make the long-running operation request
   operation = library_client.get_big_book(formatted_name)
@@ -6885,7 +6892,7 @@ def sample_get_big_nothing
   # Instantiate a client
   library_client = Library::Library.new version: :v1
 
-  formatted_name = library_client.class.book_path("[SHELF]", "[BOOK]")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
   # Make the long-running operation request
   operation = library_client.get_big_nothing(formatted_name)
@@ -6940,7 +6947,7 @@ def sample_get_big_nothing
   # Instantiate a client
   library_client = Library::Library.new version: :v1
 
-  formatted_name = library_client.class.book_path("[SHELF]", "[BOOK]")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
   # Make the long-running operation request
   operation = library_client.get_big_nothing(formatted_name)
@@ -6992,7 +6999,7 @@ def sample_get_book
   # Instantiate a client
   library_client = Library::Library.new version: :v1
 
-  formatted_name = library_client.class.book_path("[SHELF]", "[BOOK]")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
   response = library_client.get_book(formatted_name)
   int_key_val = response.map_string_value[123]
@@ -7087,7 +7094,7 @@ def sample_monolog_about_book
   # Instantiate a client
   library_client = Library::Library.new version: :v1
 
-  formatted_name = library_client.class.book_path("[SHELF]", "[BOOK]")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "[BOOK]")
   request = { name: formatted_name }
 
   requests = [request]
@@ -7533,8 +7540,8 @@ def sample_test_optional_required_flattening_params param_float, param_long
   required_singular_string = ''
   required_singular_bytes = ''
   required_singular_message = {}
-  formatted_required_singular_resource_name = library_client.class.book_path("[SHELF]", "[BOOK]")
-  formatted_required_singular_resource_name_oneof = library_client.class.book_path("[SHELF]", "[BOOK]")
+  formatted_required_singular_resource_name = library_client.class.book_from_archive_path("[ARCHIVE]", "[BOOK]")
+  formatted_required_singular_resource_name_oneof = library_client.class.book_from_archive_path("[ARCHIVE]", "[BOOK]")
   required_singular_resource_name_common = ''
   required_singular_fixed32 = 0
   required_singular_fixed64 = 0
@@ -7638,7 +7645,7 @@ def sample_get_book_from_absolutely_anywhere
   # Instantiate a client
   library_client = Library::Library.new version: :v1
 
-  formatted_name = library_client.class.book_path("[SHELF]", "The ID of the book")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "The ID of the book")
 
   response = library_client.get_book_from_absolutely_anywhere(formatted_name)
   puts "Archived book found."
@@ -7681,7 +7688,7 @@ def sample_get_book_from_absolutely_anywhere
   # Instantiate a client
   library_client = Library::Library.new version: :v1
 
-  formatted_name = library_client.class.book_path("The Shelf to search for the book", "The ID of the book")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "The ID of the book")
 
   response = library_client.get_book_from_absolutely_anywhere(formatted_name)
   puts "Book on shelf found."
@@ -7777,7 +7784,7 @@ def sample_get_big_book shelf
   library_client = Library::Library.new version: :v1
 
   # shelf = "Novel\\\"`\b\t\n\r"
-  formatted_name = library_client.class.book_path(shelf, "War and Peace")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "War and Peace")
 
   # Make the long-running operation request
   operation = library_client.get_big_book(formatted_name)
@@ -7858,7 +7865,7 @@ def sample_discuss_book image_file_name, stage
 
   # image_file_name = "image_file.jpg"
   # stage = :DRAFT
-  formatted_name = library_client.class.book_path("[SHELF]", "[BOOK]")
+  formatted_name = library_client.class.book_from_archive_path("[ARCHIVE]", "[BOOK]")
   comment = File.binread "comment_file"
   comment_2 = { comment: comment, stage: stage }
   image = File.binread image_file_name
@@ -8540,7 +8547,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_book without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Create expected grpc response
       name_2 = "name2-1052831874"
@@ -8590,7 +8597,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_book with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Mock Grpc layer
       mock_method = proc do |request|
@@ -8700,7 +8707,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes delete_book without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Mock Grpc layer
       mock_method = proc do |request|
@@ -8735,7 +8742,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes delete_book with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Mock Grpc layer
       mock_method = proc do |request|
@@ -8769,7 +8776,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes update_book without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       book = {}
 
       # Create expected grpc response
@@ -8821,7 +8828,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes update_book with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       book = {}
 
       # Mock Grpc layer
@@ -8857,7 +8864,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes move_book without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       formatted_other_shelf_name = Library::V1::LibraryServiceClient.shelf_path("[SHELF]")
 
       # Create expected grpc response
@@ -8909,7 +8916,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes move_book with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       formatted_other_shelf_name = Library::V1::LibraryServiceClient.shelf_path("[SHELF]")
 
       # Mock Grpc layer
@@ -9007,7 +9014,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes add_comments without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       comment = ''
       stage = :UNSET
       alignment = :CHAR
@@ -9055,7 +9062,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes add_comments with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       comment = ''
       stage = :UNSET
       alignment = :CHAR
@@ -9188,8 +9195,8 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_book_from_anywhere without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
-      formatted_alt_book_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
+      formatted_alt_book_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       formatted_place = Library::V1::LibraryServiceClient.location_path("[PROJECT]", "[LOCATION]")
       formatted_folder = Library::V1::LibraryServiceClient.folder_path("[FOLDER]")
 
@@ -9252,8 +9259,8 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_book_from_anywhere with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
-      formatted_alt_book_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
+      formatted_alt_book_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       formatted_place = Library::V1::LibraryServiceClient.location_path("[PROJECT]", "[LOCATION]")
       formatted_folder = Library::V1::LibraryServiceClient.folder_path("[FOLDER]")
 
@@ -9297,7 +9304,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_book_from_absolutely_anywhere without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Create expected grpc response
       name_2 = "name2-1052831874"
@@ -9345,7 +9352,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_book_from_absolutely_anywhere with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Mock Grpc layer
       mock_method = proc do |request|
@@ -9379,7 +9386,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes update_book_index without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       index_name = "default index"
       index_map_item = ''
       index_map = { "default_key" => index_map_item }
@@ -9427,7 +9434,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes update_book_index with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       index_name = "default index"
       index_map_item = ''
       index_map = { "default_key" => index_map_item }
@@ -9617,7 +9624,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes discuss_book without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       request = { name: formatted_name }
 
       # Create expected grpc response
@@ -9654,7 +9661,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes discuss_book with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       request = { name: formatted_name }
 
       # Mock Grpc layer
@@ -9690,7 +9697,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes monolog_about_book without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       request = { name: formatted_name }
 
       # Create expected grpc response
@@ -9726,7 +9733,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes monolog_about_book with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       request = { name: formatted_name }
 
       # Mock Grpc layer
@@ -9762,7 +9769,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes babble_about_book without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       request = { name: formatted_name }
 
       # Mock Grpc layer
@@ -9792,7 +9799,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes babble_about_book with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       request = { name: formatted_name }
 
       # Mock Grpc layer
@@ -9983,7 +9990,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_big_book without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Create expected grpc response
       name_2 = "name2-1052831874"
@@ -10033,7 +10040,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_big_book and returns an operation error.' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Create expected grpc response
       operation_error = Google::Rpc::Status.new(
@@ -10072,7 +10079,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_big_book with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Mock Grpc layer
       mock_method = proc do |request|
@@ -10106,7 +10113,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_big_nothing without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Create expected grpc response
       expected_response = {}
@@ -10145,7 +10152,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_big_nothing and returns an operation error.' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Create expected grpc response
       operation_error = Google::Rpc::Status.new(
@@ -10184,7 +10191,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes get_big_nothing with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Mock Grpc layer
       mock_method = proc do |request|
@@ -10227,8 +10234,8 @@ describe Library::V1::LibraryServiceClient do
       required_singular_string = ''
       required_singular_bytes = ''
       required_singular_message = {}
-      formatted_required_singular_resource_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
-      formatted_required_singular_resource_name_oneof = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_required_singular_resource_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
+      formatted_required_singular_resource_name_oneof = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       required_singular_resource_name_common = ''
       required_singular_fixed32 = 0
       required_singular_fixed64 = 0
@@ -10561,8 +10568,8 @@ describe Library::V1::LibraryServiceClient do
       required_singular_string = ''
       required_singular_bytes = ''
       required_singular_message = {}
-      formatted_required_singular_resource_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
-      formatted_required_singular_resource_name_oneof = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_required_singular_resource_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
+      formatted_required_singular_resource_name_oneof = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
       required_singular_resource_name_common = ''
       required_singular_fixed32 = 0
       required_singular_fixed64 = 0
@@ -11211,7 +11218,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes save_book without error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Mock Grpc layer
       mock_method = proc do |request|
@@ -11246,7 +11253,7 @@ describe Library::V1::LibraryServiceClient do
 
     it 'invokes save_book with error' do
       # Create request parameters
-      formatted_name = Library::V1::LibraryServiceClient.book_path("[SHELF]", "[BOOK]")
+      formatted_name = Library::V1::LibraryServiceClient.book_from_archive_path("[ARCHIVE]", "[BOOK]")
 
       # Mock Grpc layer
       mock_method = proc do |request|
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library_no_gapic_config.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library_no_gapic_config.baseline
index 798994ef85..6adf1eda82 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library_no_gapic_config.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library_no_gapic_config.baseline
@@ -2913,7 +2913,7 @@ module Library
       private_constant :ARCHIVED_BOOK_PATH_TEMPLATE
 
       BOOK_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
-        "shelves/{shelf}/books/{book}"
+        "shelves/{shelf}/books/{book_one}~{book_two}"
       )
 
       private_constant :BOOK_PATH_TEMPLATE
@@ -2982,12 +2982,14 @@ module Library
 
       # Returns a fully-qualified book resource name string.
       # @param shelf [String]
-      # @param book [String]
+      # @param book_one [String]
+      # @param book_two [String]
       # @return [String]
-      def self.book_path shelf, book
+      def self.book_path shelf, book_one, book_two
         BOOK_PATH_TEMPLATE.render(
           :"shelf" => shelf,
-          :"book" => book
+          :"book_one" => book_one,
+          :"book_two" => book_two
         )
       end
 
@@ -4237,7 +4239,8 @@ module Library
       end
 
       # Test server streaming
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to
+      # have the google.api.http option.
       #
       # @param name [String]
       #   The name of the shelf to stream.
@@ -4268,7 +4271,8 @@ module Library
       end
 
       # Test server streaming, non-paged responses.
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to
+      # have the google.api.http option.
       #
       # @param name [String]
       #   The name of the shelf whose books we'd like to list.
@@ -4370,8 +4374,10 @@ module Library
         @monolog_about_book.call(request_protos, options)
       end
 
-      # Test samplegen response handling when a client streaming method returns Empty.
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+      # Test samplegen response handling when a client streaming method returns
+      # Empty.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to
+      # have the google.api.http option.
       #
       # @param reqs [Enumerable]
       #   The input requests.
@@ -4782,8 +4788,9 @@ module Library
         @streaming_archive_books.call(request_protos, options)
       end
 
-      # Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-      # New APIs should always create a separate message for a request.
+      # Test using resource messages as request objects. Only used by PubSub
+      # (CreateSubscription) for historical reasons. New APIs should always create
+      # a separate message for a request.
       #
       # @param name [String]
       #   The resource name of the book.
diff --git a/src/test/java/com/google/api/codegen/testsrc/protoannotations/library.proto b/src/test/java/com/google/api/codegen/testsrc/protoannotations/library.proto
index 4b9453c5ee..de84f1a2d3 100644
--- a/src/test/java/com/google/api/codegen/testsrc/protoannotations/library.proto
+++ b/src/test/java/com/google/api/codegen/testsrc/protoannotations/library.proto
@@ -60,19 +60,24 @@ option (google.api.resource_definition) = {
 service LibraryService {
   option (google.api.default_host) = "library-example.googleapis.com:1234";
   option (google.api.oauth_scopes) =
-  "https://www.googleapis.com/auth/library,"
-    "https://www.googleapis.com/auth/cloud-platform";
+      "https://www.googleapis.com/auth/library,"
+      "https://www.googleapis.com/auth/cloud-platform";
 
   // Creates a shelf, and returns the new Shelf.
   // RPC method comment may include special characters: <>&"`'@.
   rpc CreateShelf(CreateShelfRequest) returns (Shelf) {
-    option (google.api.http) = { post: "/v1/bookShelves" body: "shelf" };
+    option (google.api.http) = {
+      post: "/v1/bookShelves"
+      body: "shelf"
+    };
     option (google.api.method_signature) = "shelf";
   }
 
   // Gets a shelf.
   rpc GetShelf(GetShelfRequest) returns (Shelf) {
-    option (google.api.http) = { get: "/v1/{name=bookShelves/*}" };
+    option (google.api.http) = {
+      get: "/v1/{name=bookShelves/*}"
+    };
     option (google.api.method_signature) = "name";
     option (google.api.method_signature) = "name,message";
     option (google.api.method_signature) = "name,message,string_builder";
@@ -80,13 +85,17 @@ service LibraryService {
 
   // Lists shelves.
   rpc ListShelves(ListShelvesRequest) returns (ListShelvesResponse) {
-    option (google.api.http) = { get: "/v1/bookShelves" };
+    option (google.api.http) = {
+      get: "/v1/bookShelves"
+    };
     option (google.api.method_signature) = "";
   }
 
   // Deletes a shelf.
   rpc DeleteShelf(DeleteShelfRequest) returns (google.protobuf.Empty) {
-    option (google.api.http) = { delete: "/v1/{name=bookShelves/*}" };
+    option (google.api.http) = {
+      delete: "/v1/{name=bookShelves/*}"
+    };
     option (google.api.method_signature) = "name";
   }
 
@@ -94,7 +103,10 @@ service LibraryService {
   // `other_shelf_name` to shelf `name`, and deletes
   // `other_shelf_name`. Returns the updated shelf.
   rpc MergeShelves(MergeShelvesRequest) returns (Shelf) {
-    option (google.api.http) = { post: "/v1/{name=bookShelves/*}:merge" body: "*" };
+    option (google.api.http) = {
+      post: "/v1/{name=bookShelves/*}:merge"
+      body: "*"
+    };
     option (google.api.method_signature) = "name,other_shelf_name";
   }
 
@@ -121,56 +133,79 @@ service LibraryService {
         body: "*"
       }
     };
-    option (google.api.method_signature) = "shelf,books,edition,series_uuid,publisher";
+    option (google.api.method_signature) =
+        "shelf,books,edition,series_uuid,publisher";
   }
 
   // Creates an inventory. Tests singleton resources.
   rpc CreateInventory(CreateInventoryRequest) returns (Inventory) {
-    option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/publishers/*}" body: "inventory" };
-    option (google.api.method_signature) = "parent,inventory,asset,parent_asset,assets";
+    option (google.api.http) = {
+      post: "/v1/{parent=projects/*/locations/*/publishers/*}"
+      body: "inventory"
+    };
+    option (google.api.method_signature) =
+        "parent,inventory,asset,parent_asset,assets";
   }
 
   // Gets a book.
   rpc GetBook(GetBookRequest) returns (Book) {
-    option (google.api.http) = { get: "/v1/{name=bookShelves/*/books/*}" };
+    option (google.api.http) = {
+      get: "/v1/{name=bookShelves/*/books/*}"
+    };
     option (google.api.method_signature) = "name";
   }
 
   // Lists books in a shelf.
   rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) {
-    option (google.api.http) = { get: "/v1/{name=bookShelves/*}/books" };
+    option (google.api.http) = {
+      get: "/v1/{name=bookShelves/*}/books"
+    };
     option (google.api.method_signature) = "name,filter";
   }
 
   // Deletes a book.
   rpc DeleteBook(DeleteBookRequest) returns (protobuf.Empty) {
-    option (google.api.http) = { delete: "/v1/{name=bookShelves/*/books/*}" };
+    option (google.api.http) = {
+      delete: "/v1/{name=bookShelves/*/books/*}"
+    };
     option (google.api.method_signature) = "name";
   }
 
   // Updates a book.
   rpc UpdateBook(UpdateBookRequest) returns (Book) {
-    option (google.api.http) = { put: "/v1/{name=bookShelves/*/books/*}" body: "book" };
+    option (google.api.http) = {
+      put: "/v1/{name=bookShelves/*/books/*}"
+      body: "book"
+    };
     option (google.api.method_signature) = "name,book";
-    option (google.api.method_signature) = "name,optional_foo,book,update_mask,physical_mask";
+    option (google.api.method_signature) =
+        "name,optional_foo,book,update_mask,physical_mask";
   }
 
   // Moves a book to another shelf, and returns the new book.
   rpc MoveBook(MoveBookRequest) returns (Book) {
-    option (google.api.http) = { post: "/v1/{name=bookShelves/*/books/*}:move" body: "*" };
+    option (google.api.http) = {
+      post: "/v1/{name=bookShelves/*/books/*}:move"
+      body: "*"
+    };
     option (google.api.method_signature) = "name,other_shelf_name";
   }
 
   // Lists a primitive resource. To test go page streaming.
   rpc ListStrings(ListStringsRequest) returns (ListStringsResponse) {
-    option (google.api.http) = { get: "/v1/strings" };
+    option (google.api.http) = {
+      get: "/v1/strings"
+    };
     option (google.api.method_signature) = "";
     option (google.api.method_signature) = "name";
   }
 
   // Adds comments to a book
   rpc AddComments(AddCommentsRequest) returns (google.protobuf.Empty) {
-    option (google.api.http) = { post: "/v1/{name=bookShelves/*}/comments" body: "*" };
+    option (google.api.http) = {
+      post: "/v1/{name=bookShelves/*}/comments"
+      body: "*"
+    };
     option (google.api.method_signature) = "name,comments";
   }
 
@@ -178,82 +213,113 @@ service LibraryService {
   rpc GetBookFromArchive(GetBookFromArchiveRequest) returns (BookFromArchive) {
     // The http binding on this field does not include the "**" path in order to
     // test the name conflict resolution in configgen.
-    option (google.api.http) = { get: "/v1/{name=archives/*/books/*}"};
+    option (google.api.http) = {
+      get: "/v1/{name=archives/*/books/*}"
+    };
     option (google.api.method_signature) = "name,parent";
   }
 
   // Gets a book from a shelf or archive.
-  rpc GetBookFromAnywhere(GetBookFromAnywhereRequest) returns (BookFromAnywhere) {
-    option (google.api.http) = { get: "/v1/{name=archives/*/books/**}"};
+  rpc GetBookFromAnywhere(GetBookFromAnywhereRequest)
+      returns (BookFromAnywhere) {
+    option (google.api.http) = {
+      get: "/v1/{name=archives/*/books/**}"
+    };
     option (google.api.method_signature) = "name,alt_book_name,place,folder";
   }
 
   // Test proper OneOf-Any resource name mapping
-  rpc GetBookFromAbsolutelyAnywhere(GetBookFromAbsolutelyAnywhereRequest) returns (BookFromAnywhere) {
+  rpc GetBookFromAbsolutelyAnywhere(GetBookFromAbsolutelyAnywhereRequest)
+      returns (BookFromAnywhere) {
     option (google.api.http) = {
       post: "/v1/{name=archives/*/books/*}"
-      additional_bindings {
-        post: "/v1/{alt_book_name=bookShelves/*/books/*}"
-      }
+      additional_bindings { post: "/v1/{alt_book_name=bookShelves/*/books/*}" }
     };
     option (google.api.method_signature) = "name";
   }
 
   // Updates the index of a book.
   rpc UpdateBookIndex(UpdateBookIndexRequest) returns (google.protobuf.Empty) {
-    option (google.api.http) = { post: "/v1/{name=bookShelves/*/books/*}/index" body: "*" };
+    option (google.api.http) = {
+      post: "/v1/{name=bookShelves/*/books/*}/index"
+      body: "*"
+    };
     option (google.api.method_signature) = "name,index_name,index_map";
   }
 
   // Test server streaming
-  rpc StreamShelves(StreamShelvesRequest) returns (stream StreamShelvesResponse) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+  rpc StreamShelves(StreamShelvesRequest)
+      returns (stream StreamShelvesResponse) {
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to
+    // have the google.api.http option.
   }
 
   // Test server streaming, non-paged responses.
   rpc StreamBooks(StreamBooksRequest) returns (stream Book) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to
+    // have the google.api.http option.
 
     option (google.api.method_signature) = "name";
   }
 
   // Test bidi-streaming.
   rpc DiscussBook(stream DiscussBookRequest) returns (stream Comment) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
-    option (google.api.http) = { post: "/v1/{name=archives/*/books/*}:discuss" body: "*" };
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to
+    // have the google.api.http option.
+    option (google.api.http) = {
+      post: "/v1/{name=archives/*/books/*}:discuss"
+      body: "*"
+    };
     option (google.api.method_signature) = "name";
   }
 
   // Test client streaming.
   rpc MonologAboutBook(stream DiscussBookRequest) returns (Comment) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
-    option (google.api.http) = { get: "/v1/{name=archives/*/books/*}:monolog" body: "*" };
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to
+    // have the google.api.http option.
+    option (google.api.http) = {
+      get: "/v1/{name=archives/*/books/*}:monolog"
+      body: "*"
+    };
     option (google.api.method_signature) = "name";
   }
 
-  // Test samplegen response handling when a client streaming method returns Empty.
-  rpc BabbleAboutBook(stream DiscussBookRequest) returns (google.protobuf.Empty) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+  // Test samplegen response handling when a client streaming method returns
+  // Empty.
+  rpc BabbleAboutBook(stream DiscussBookRequest)
+      returns (google.protobuf.Empty) {
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to
+    // have the google.api.http option.
 
     option (google.api.method_signature) = "name";
   }
 
-  rpc FindRelatedBooks(FindRelatedBooksRequest) returns (FindRelatedBooksResponse) {
-    option (google.api.http) = { get: "/v1/bookShelves" };
+  rpc FindRelatedBooks(FindRelatedBooksRequest)
+      returns (FindRelatedBooksResponse) {
+    option (google.api.http) = {
+      get: "/v1/bookShelves"
+    };
     option (google.api.method_signature) = "names,shelves";
   }
 
   // Adds a tag to the book. This RPC is a mixin.
-  rpc AddTag(google.tagger.v1.AddTagRequest) returns (google.tagger.v1.AddTagResponse) {
-    option (google.api.http) = { post: "/v1/{resource=bookShelves/*/books/*}:addTag" body: "*" };
+  rpc AddTag(google.tagger.v1.AddTagRequest)
+      returns (google.tagger.v1.AddTagResponse) {
+    option (google.api.http) = {
+      post: "/v1/{resource=bookShelves/*/books/*}:addTag"
+      body: "*"
+    };
     option (google.api.method_signature) = "resource,tag";
   }
 
-  // AddLabel intentionally left out to test the reroute_to_grpc_interface feature
+  // AddLabel intentionally left out to test the reroute_to_grpc_interface
+  // feature
 
   // Test long-running operations
   rpc GetBigBook(GetBookRequest) returns (google.longrunning.Operation) {
-    option (google.api.http) = { get: "/v1/{name=bookShelves/*/books/*}:big" };
+    option (google.api.http) = {
+      get: "/v1/{name=bookShelves/*/books/*}:big"
+    };
     option (google.api.method_signature) = "name";
     option (google.longrunning.operation_info) = {
       response_type: "google.example.library.v1.Book"
@@ -263,7 +329,9 @@ service LibraryService {
 
   // Test long-running operations with empty return type.
   rpc GetBigNothing(GetBookRequest) returns (google.longrunning.Operation) {
-    option (google.api.http) = { get: "/v1/{name=bookShelves/*/books/*}:bignothing" };
+    option (google.api.http) = {
+      get: "/v1/{name=bookShelves/*/books/*}:bignothing"
+    };
     option (google.api.method_signature) = "name";
     option (google.longrunning.operation_info) = {
       metadata_type: "google.example.library.v1.GetBigBookMetadata"
@@ -272,17 +340,28 @@ service LibraryService {
   }
 
   rpc MoveBooks(MoveBooksRequest) returns (MoveBooksResponse) {
-    option (google.api.http) = {post: "/v1/{source=**}:move" body: "*"};
-    option (google.api.method_signature) = "source,destination,publishers,project";
+    option (google.api.http) = {
+      post: "/v1/{source=**}:move"
+      body: "*"
+    };
+    option (google.api.method_signature) =
+        "source,destination,publishers,project";
   }
 
   rpc ArchiveBooks(ArchiveBooksRequest) returns (ArchiveBooksResponse) {
-    option (google.api.http) = {post: "/v1/{source=**}:archive" body: "*"};
+    option (google.api.http) = {
+      post: "/v1/{source=**}:archive"
+      body: "*"
+    };
     option (google.api.method_signature) = "source,archive";
   }
 
-  rpc LongRunningArchiveBooks(ArchiveBooksRequest) returns (google.longrunning.Operation) {
-    option (google.api.http) = {post: "/v1/{source=**}:longrunningmove" body: "*"};
+  rpc LongRunningArchiveBooks(ArchiveBooksRequest)
+      returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v1/{source=**}:longrunningmove"
+      body: "*"
+    };
     option (google.api.method_signature) = "source,archive";
     option (google.longrunning.operation_info) = {
       response_type: "ArchiveBooksResponse",
@@ -290,149 +369,161 @@ service LibraryService {
     };
   }
 
-  rpc StreamingArchiveBooks(stream ArchiveBooksRequest) returns (stream ArchiveBooksResponse) {
+  rpc StreamingArchiveBooks(stream ArchiveBooksRequest)
+      returns (stream ArchiveBooksResponse) {
     option (google.api.method_signature) = "source,archive";
   }
 
-  // Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
-  // New APIs should always create a separate message for a request.
+  // Test using resource messages as request objects. Only used by PubSub
+  // (CreateSubscription) for historical reasons. New APIs should always create
+  // a separate message for a request.
   rpc SaveBook(Book) returns (google.protobuf.Empty) {
-    option (google.api.http) = { post: "/v1:saveBook" body: "*"};
+    option (google.api.http) = {
+      post: "/v1:saveBook"
+      body: "*"
+    };
     option (google.api.method_signature) = "name,author,title,rating";
   }
 
   // Test optional flattening parameters of all types
-  rpc TestOptionalRequiredFlatteningParams(TestOptionalRequiredFlatteningParamsRequest) returns (TestOptionalRequiredFlatteningParamsResponse) {
-    option (google.api.http) = { post: "/v1/testofp" body: "*" };
+  rpc TestOptionalRequiredFlatteningParams(
+      TestOptionalRequiredFlatteningParamsRequest)
+      returns (TestOptionalRequiredFlatteningParamsResponse) {
+    option (google.api.http) = {
+      post: "/v1/testofp"
+      body: "*"
+    };
     option (google.api.method_signature) = "";
     option (google.api.method_signature) =
-    "required_singular_int32,"
-      "required_singular_int64,"
-      "required_singular_float,"
-      "required_singular_double,"
-      "required_singular_bool,"
-      "required_singular_enum,"
-      "required_singular_string,"
-      "required_singular_bytes,"
-      "required_singular_message,"
-      "required_singular_resource_name,"
-      "required_singular_resource_name_oneof,"
-      "required_singular_resource_name_common,"
-      "required_singular_fixed32,"
-      "required_singular_fixed64,"
-      "required_repeated_int32,"
-      "required_repeated_int64,"
-      "required_repeated_float,"
-      "required_repeated_double,"
-      "required_repeated_bool,"
-      "required_repeated_enum,"
-      "required_repeated_string,"
-      "required_repeated_bytes,"
-      "required_repeated_message,"
-      "required_repeated_resource_name,"
-      "required_repeated_resource_name_oneof,"
-      "required_repeated_resource_name_common,"
-      "required_repeated_fixed32,"
-      "required_repeated_fixed64,"
-      "required_map,"
-      "required_any_value,"
-      "required_struct_value,"
-      "required_value_value,"
-      "required_list_value_value,"
-      "required_time_value,"
-      "required_duration_value,"
-      "required_field_mask_value,"
-      "required_int32_value,"
-      "required_uint32_value,"
-      "required_int64_value,"
-      "required_uint64_value,"
-      "required_float_value,"
-      "required_double_value,"
-      "required_string_value,"
-      "required_bool_value,"
-      "required_bytes_value,"
-      "required_repeated_any_value,"
-      "required_repeated_struct_value,"
-      "required_repeated_value_value,"
-      "required_repeated_list_value_value,"
-      "required_repeated_time_value,"
-      "required_repeated_duration_value,"
-      "required_repeated_field_mask_value,"
-      "required_repeated_int32_value,"
-      "required_repeated_uint32_value,"
-      "required_repeated_int64_value,"
-      "required_repeated_uint64_value,"
-      "required_repeated_float_value,"
-      "required_repeated_double_value,"
-      "required_repeated_string_value,"
-      "required_repeated_bool_value,"
-      "required_repeated_bytes_value,"
-      "optional_singular_int32,"
-      "optional_singular_int64,"
-      "optional_singular_float,"
-      "optional_singular_double,"
-      "optional_singular_bool,"
-      "optional_singular_enum,"
-      "optional_singular_string,"
-      "optional_singular_bytes,"
-      "optional_singular_message,"
-      "optional_singular_resource_name,"
-      "optional_singular_resource_name_oneof,"
-      "optional_singular_resource_name_common,"
-      "optional_singular_fixed32,"
-      "optional_singular_fixed64,"
-      "optional_repeated_int32,"
-      "optional_repeated_int64,"
-      "optional_repeated_float,"
-      "optional_repeated_double,"
-      "optional_repeated_bool,"
-      "optional_repeated_enum,"
-      "optional_repeated_string,"
-      "optional_repeated_bytes,"
-      "optional_repeated_message,"
-      "optional_repeated_resource_name,"
-      "optional_repeated_resource_name_oneof,"
-      "optional_repeated_resource_name_common,"
-      "optional_repeated_fixed32,"
-      "optional_repeated_fixed64,"
-      "optional_map,"
-      "any_value,"
-      "struct_value,"
-      "value_value,"
-      "list_value_value,"
-      "time_value,"
-      "duration_value,"
-      "field_mask_value,"
-      "int32_value,"
-      "uint32_value,"
-      "int64_value,"
-      "uint64_value,"
-      "float_value,"
-      "double_value,"
-      "string_value,"
-      "bool_value,"
-      "bytes_value,"
-      "repeated_any_value,"
-      "repeated_struct_value,"
-      "repeated_value_value,"
-      "repeated_list_value_value,"
-      "repeated_time_value,"
-      "repeated_duration_value,"
-      "repeated_field_mask_value,"
-      "repeated_int32_value,"
-      "repeated_uint32_value,"
-      "repeated_int64_value,"
-      "repeated_uint64_value,"
-      "repeated_float_value,"
-      "repeated_double_value,"
-      "repeated_string_value,"
-      "repeated_bool_value,"
-      "repeated_bytes_value";
+        "required_singular_int32,"
+        "required_singular_int64,"
+        "required_singular_float,"
+        "required_singular_double,"
+        "required_singular_bool,"
+        "required_singular_enum,"
+        "required_singular_string,"
+        "required_singular_bytes,"
+        "required_singular_message,"
+        "required_singular_resource_name,"
+        "required_singular_resource_name_oneof,"
+        "required_singular_resource_name_common,"
+        "required_singular_fixed32,"
+        "required_singular_fixed64,"
+        "required_repeated_int32,"
+        "required_repeated_int64,"
+        "required_repeated_float,"
+        "required_repeated_double,"
+        "required_repeated_bool,"
+        "required_repeated_enum,"
+        "required_repeated_string,"
+        "required_repeated_bytes,"
+        "required_repeated_message,"
+        "required_repeated_resource_name,"
+        "required_repeated_resource_name_oneof,"
+        "required_repeated_resource_name_common,"
+        "required_repeated_fixed32,"
+        "required_repeated_fixed64,"
+        "required_map,"
+        "required_any_value,"
+        "required_struct_value,"
+        "required_value_value,"
+        "required_list_value_value,"
+        "required_time_value,"
+        "required_duration_value,"
+        "required_field_mask_value,"
+        "required_int32_value,"
+        "required_uint32_value,"
+        "required_int64_value,"
+        "required_uint64_value,"
+        "required_float_value,"
+        "required_double_value,"
+        "required_string_value,"
+        "required_bool_value,"
+        "required_bytes_value,"
+        "required_repeated_any_value,"
+        "required_repeated_struct_value,"
+        "required_repeated_value_value,"
+        "required_repeated_list_value_value,"
+        "required_repeated_time_value,"
+        "required_repeated_duration_value,"
+        "required_repeated_field_mask_value,"
+        "required_repeated_int32_value,"
+        "required_repeated_uint32_value,"
+        "required_repeated_int64_value,"
+        "required_repeated_uint64_value,"
+        "required_repeated_float_value,"
+        "required_repeated_double_value,"
+        "required_repeated_string_value,"
+        "required_repeated_bool_value,"
+        "required_repeated_bytes_value,"
+        "optional_singular_int32,"
+        "optional_singular_int64,"
+        "optional_singular_float,"
+        "optional_singular_double,"
+        "optional_singular_bool,"
+        "optional_singular_enum,"
+        "optional_singular_string,"
+        "optional_singular_bytes,"
+        "optional_singular_message,"
+        "optional_singular_resource_name,"
+        "optional_singular_resource_name_oneof,"
+        "optional_singular_resource_name_common,"
+        "optional_singular_fixed32,"
+        "optional_singular_fixed64,"
+        "optional_repeated_int32,"
+        "optional_repeated_int64,"
+        "optional_repeated_float,"
+        "optional_repeated_double,"
+        "optional_repeated_bool,"
+        "optional_repeated_enum,"
+        "optional_repeated_string,"
+        "optional_repeated_bytes,"
+        "optional_repeated_message,"
+        "optional_repeated_resource_name,"
+        "optional_repeated_resource_name_oneof,"
+        "optional_repeated_resource_name_common,"
+        "optional_repeated_fixed32,"
+        "optional_repeated_fixed64,"
+        "optional_map,"
+        "any_value,"
+        "struct_value,"
+        "value_value,"
+        "list_value_value,"
+        "time_value,"
+        "duration_value,"
+        "field_mask_value,"
+        "int32_value,"
+        "uint32_value,"
+        "int64_value,"
+        "uint64_value,"
+        "float_value,"
+        "double_value,"
+        "string_value,"
+        "bool_value,"
+        "bytes_value,"
+        "repeated_any_value,"
+        "repeated_struct_value,"
+        "repeated_value_value,"
+        "repeated_list_value_value,"
+        "repeated_time_value,"
+        "repeated_duration_value,"
+        "repeated_field_mask_value,"
+        "repeated_int32_value,"
+        "repeated_uint32_value,"
+        "repeated_int64_value,"
+        "repeated_uint64_value,"
+        "repeated_float_value,"
+        "repeated_double_value,"
+        "repeated_string_value,"
+        "repeated_bool_value,"
+        "repeated_bytes_value";
   }
 
   // This method is not exposed in the GAPIC config. It should be generated.
-  rpc PrivateListShelves(ListShelvesRequest) returns (Book)  {
-    option (google.api.http) = { get: "/v1/bookShelves" };
+  rpc PrivateListShelves(ListShelvesRequest) returns (Book) {
+    option (google.api.http) = {
+      get: "/v1/bookShelves"
+    };
     option (google.api.method_signature) = "";
   }
 }
@@ -442,9 +533,9 @@ service LibraryService {
 message Book {
   option (google.api.resource) = {
     type: "library.googleapis.com/Book",
-    pattern: "shelves/{shelf}/books/{book}",
+    pattern: "shelves/{shelf}/books/{book_one}~{book_two}",
     pattern: "archives/{archive}/books/{book}",
-    pattern: "projects/{project}/books/{book}"
+    pattern: "projects/{project}/books/{book}",
     pattern: "projects/{project}/locations/{location}/publishers/{publisher}/inventory/books/{book}"
     history: ORIGINALLY_SINGLE_PATTERN,
   };
@@ -452,9 +543,7 @@ message Book {
   // The resource name of the book.
   // Book names have the form `bookShelves/{shelf_id}/books/{book_id}`.
   // Message field comment may include special characters: <>&"`'@.
-  string name = 1 [
-    (google.api.field_behavior) = REQUIRED
-  ];
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
 
   // The name of the book author.
   string author = 2;
@@ -465,18 +554,16 @@ message Book {
   // Value indicating whether the book has been read.
   bool read = 4;
 
-
   enum Rating {
-    GOOD = 0; // GOOD enum description
-    BAD = 1; // Enum description with special characters: <>&"`'@.
+    GOOD = 0;  // GOOD enum description
+    BAD = 1;   // Enum description with special characters: <>&"`'@.
   }
 
   // For testing enums.
   Rating rating = 5;
 
-  string reader = 6 [
-    (google.api.resource_reference).type = "library.googleapis.com/Reader"
-  ];
+  string reader = 6
+      [(google.api.resource_reference).type = "library.googleapis.com/Reader"];
 
   // For testing all well-known types.
   google.protobuf.Any any_value = 10;
@@ -515,11 +602,10 @@ message Book {
   google.test.shared.data.Used resource = 29;
 
   // For testing accessing map fields in samplegen
-  map  map_bool_key = 30;
+  map map_bool_key = 30;
 }
 
 message Inventory {
-
   option (google.api.resource) = {
     type: "library.googleapis.com/Inventory",
     pattern: "projects/{project}/locations/{location}/publishers/{publisher}/inventory"
@@ -536,9 +622,7 @@ message BookFromArchive {
   };
   // The resource name of the book.
   // Book names have the form `archives/{archive_id}/books/{book_id}`.
-  string name = 1 [
-    (google.api.field_behavior) = REQUIRED
-  ];
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
 
   // The name of the book author.
   string author = 2;
@@ -569,7 +653,6 @@ message SomeMessage2 {
   int32 field1 = 1;
 
   message SomeMessage3 {
-
     // Tests Python nested enums
     enum Alignment {
       // 8-bit
@@ -600,9 +683,7 @@ message Shelf {
   };
   // The resource name of the shelf.
   // Shelf names have the form `shelves/{shelf}`.
-  string name = 1 [
-    (google.api.field_behavior) = REQUIRED
-  ];
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
 
   // The theme of the shelf
   string theme = 2;
@@ -612,16 +693,14 @@ message Shelf {
 }
 
 message Reader {
-
   option (google.api.resource) = {
     type: "library.googleapis.com/Reader",
     pattern: "projects/{project}/readers/{reader}",
-    pattern: "projects/{project}/shelves/{shelf}/readers/{reader}",
+    pattern: "projects/{project}/shelves/{shelf}/readers/{reader_surname}.{reader_first_name}",
     pattern: "organization/{organization}/reader"
   };
 
-  string name = 1 [
-      (google.api.field_behavior) = REQUIRED];
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
 
   google.protobuf.Timestamp join_time = 2;
 }
@@ -629,8 +708,7 @@ message Reader {
 // Request message for LibraryService.CreateShelf.
 message CreateShelfRequest {
   // The shelf to create.
-  Shelf shelf = 1 [
-    (google.api.field_behavior) = REQUIRED];
+  Shelf shelf = 1 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for LibraryService.GetShelf.
@@ -639,7 +717,8 @@ message GetShelfRequest {
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
     // Test that a resource name field can be referenced by its MessageType.
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
+  ];
 
   // Field to verify that message-type query parameter gets flattened.
   SomeMessage message = 2;
@@ -647,11 +726,9 @@ message GetShelfRequest {
   StringBuilder string_builder = 3;
 
   // To test 'options' parameter name conflict.
-  string options = 4 [
-    (google.api.field_behavior) = REQUIRED];
+  string options = 4 [(google.api.field_behavior) = REQUIRED];
 }
 
-
 // Creates a name conflict with java.lang type
 message StringBuilder {
   string name = 1;
@@ -687,7 +764,8 @@ message StreamShelvesRequest {
   // The name of the shelf to stream.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
+  ];
 }
 
 // Response message for LibraryService.StreamShelves.
@@ -701,7 +779,8 @@ message DeleteShelfRequest {
   // The name of the shelf to delete.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
+  ];
 }
 
 // Describes the shelf being removed (other_shelf_name) and updated
@@ -710,12 +789,14 @@ message MergeShelvesRequest {
   // The name of the shelf we're adding books to.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
+  ];
 
   // The name of the shelf we're removing books from and deleting.
   string other_shelf_name = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
+  ];
 }
 
 // Request message for LibraryService.CreateBook.
@@ -723,22 +804,20 @@ message CreateBookRequest {
   // The name of the shelf in which the book is created.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
+  ];
 
   // The book to create.
-  Book book = 2 [
-    (google.api.field_behavior) = REQUIRED];
+  Book book = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for LibraryService.PublishSeries.
 message PublishSeriesRequest {
   // The shelf in which the series is created.
-  Shelf shelf = 1 [
-    (google.api.field_behavior) = REQUIRED];
+  Shelf shelf = 1 [(google.api.field_behavior) = REQUIRED];
 
   // The books to publish in the series.
-  repeated Book books = 2 [
-    (google.api.field_behavior) = REQUIRED];
+  repeated Book books = 2 [(google.api.field_behavior) = REQUIRED];
 
   oneof versioning {
     // The edition of the series
@@ -749,12 +828,11 @@ message PublishSeriesRequest {
   }
 
   // Uniquely identifies the series to the publishing house.
-  SeriesUuid series_uuid = 5 [
-    (google.api.field_behavior) = REQUIRED];
+  SeriesUuid series_uuid = 5 [(google.api.field_behavior) = REQUIRED];
 
   // The publisher of the series.
-  string publisher = 6 [
-    (google.api.resource_reference).type = "library.googleapis.com/Publisher"];
+  string publisher = 6 [(google.api.resource_reference).type =
+                            "library.googleapis.com/Publisher"];
 }
 
 message SeriesUuid {
@@ -767,8 +845,7 @@ message SeriesUuid {
 // Response message for LibraryService.PublishSeries.
 message PublishSeriesResponse {
   // The names of the books in the series that were published
-  repeated string book_names = 1 [
-    (google.api.field_behavior) = REQUIRED];
+  repeated string book_names = 1 [(google.api.field_behavior) = REQUIRED];
 
   repeated Book books = 2;
 
@@ -781,7 +858,8 @@ message GetBookRequest {
   // The name of the book to retrieve.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 }
 
 // Request message for LibraryService.ListBooks.
@@ -789,7 +867,8 @@ message ListBooksRequest {
   // The name of the shelf whose books we'd like to list.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
+  ];
 
   // Requested page size. Server may return fewer books than requested.
   // If unspecified, server will pick an appropriate default.
@@ -821,8 +900,7 @@ message ListBooksResponse {
 // Request message for LibraryService.StreamBooks.
 message StreamBooksRequest {
   // The name of the shelf whose books we'd like to list.
-  string name = 1 [
-    (google.api.field_behavior) = REQUIRED];
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for LibraryService.UpdateBook.
@@ -830,15 +908,14 @@ message UpdateBookRequest {
   // The name of the book to update.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 
   // An optional foo.
   string optional_foo = 2;
 
   // The book to update with.
-  Book book = 3 [
-    (google.api.field_behavior) = REQUIRED
-  ];
+  Book book = 3 [(google.api.field_behavior) = REQUIRED];
 
   // A field mask to apply, rendered as an HTTP parameter.
   google.protobuf.FieldMask update_mask = 4;
@@ -852,7 +929,8 @@ message DeleteBookRequest {
   // The name of the book to delete.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 }
 
 // Describes what book to move (name) and what shelf we're moving it
@@ -861,57 +939,59 @@ message MoveBookRequest {
   // The name of the book to move.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 
   // The name of the destination shelf.
   string other_shelf_name = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
+  ];
 }
 
 message ListStringsRequest {
-  string name = 1 [
-    (google.api.resource_reference).type = "*"
-  ];
+  string name = 1 [(google.api.resource_reference).type = "*"];
   int32 page_size = 2;
   string page_token = 3;
 }
 
 message ListStringsResponse {
-  repeated string strings = 1 [
-    (google.api.resource_reference).type = "*"
-  ];
+  repeated string strings = 1 [(google.api.resource_reference).type = "*"];
   string next_page_token = 2;
 }
 
- message CreateInventoryRequest {
-    string parent = 1 [
-      (google.api.resource_reference).child_type = "library.googleapis.com/Inventory",
-      (google.api.field_behavior) = REQUIRED
-    ];
+message CreateInventoryRequest {
+  string parent = 1 [
+    (google.api.resource_reference).child_type =
+        "library.googleapis.com/Inventory",
+    (google.api.field_behavior) = REQUIRED
+  ];
 
-    Inventory inventory = 2;
+  Inventory inventory = 2;
 
-    string asset = 3 [
-      (google.api.resource_reference).type = "library.googleapis.com/Asset",
-      (google.api.field_behavior) = REQUIRED];
+  string asset = 3 [
+    (google.api.resource_reference).type = "library.googleapis.com/Asset",
+    (google.api.field_behavior) = REQUIRED
+  ];
 
-    string parent_asset = 4 [
-      (google.api.resource_reference).child_type = "library.googleapis.com/Asset",
-      (google.api.field_behavior) = REQUIRED];
+  string parent_asset = 4 [
+    (google.api.resource_reference).child_type = "library.googleapis.com/Asset",
+    (google.api.field_behavior) = REQUIRED
+  ];
 
-    repeated string assets = 5 [
-      (google.api.resource_reference).type = "library.googleapis.com/Asset",
-      (google.api.field_behavior) = REQUIRED];
- }
+  repeated string assets = 5 [
+    (google.api.resource_reference).type = "library.googleapis.com/Asset",
+    (google.api.field_behavior) = REQUIRED
+  ];
+}
 
 message AddCommentsRequest {
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 
-  repeated Comment comments = 2 [
-    (google.api.field_behavior) = REQUIRED];
+  repeated Comment comments = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
 message Comment {
@@ -940,11 +1020,14 @@ message GetBookFromArchiveRequest {
   // The name of the book to retrieve.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/ArchivedBook"];
+    (google.api.resource_reference).type = "library.googleapis.com/ArchivedBook"
+  ];
 
   string parent = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).child_type = "locations.googleapis.com/Location"];
+    (google.api.resource_reference).child_type =
+        "locations.googleapis.com/Location"
+  ];
 }
 
 // Request message for LibraryService.GetBookFromAnywhere.
@@ -952,21 +1035,26 @@ message GetBookFromAnywhereRequest {
   // The name of the book to retrieve.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 
   // An alternate book name, used to test restricting flattened field to a
   // single resource name type in a oneof.
   string alt_book_name = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 
   string place = 3 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "locations.googleapis.com/Location"];
+    (google.api.resource_reference).type = "locations.googleapis.com/Location"
+  ];
 
   string folder = 4 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "cloudresourcemanager.googleapis.com/Folder"];
+    (google.api.resource_reference).type =
+        "cloudresourcemanager.googleapis.com/Folder"
+  ];
 }
 
 // Request message for LibraryService.GetBookFromAbsolutelyAnywhere.
@@ -974,7 +1062,8 @@ message GetBookFromAbsolutelyAnywhereRequest {
   // The name of the book to retrieve.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 
   // An alternate book name, used to test proper processing of placeholders
   // within additional bindings.
@@ -986,15 +1075,14 @@ message UpdateBookIndexRequest {
   // The name of the book to update.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 
   // The name of the index for the book
-  string index_name = 2 [
-    (google.api.field_behavior) = REQUIRED];
+  string index_name = 2 [(google.api.field_behavior) = REQUIRED];
 
   // The index to update the book with
-  map index_map = 3 [
-    (google.api.field_behavior) = REQUIRED];
+  map index_map = 3 [(google.api.field_behavior) = REQUIRED];
 }
 
 message DiscussBookRequest {
@@ -1003,7 +1091,8 @@ message DiscussBookRequest {
   // message will be reused.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
 
   // The new comment.
   Comment comment = 2;
@@ -1015,18 +1104,20 @@ message DiscussBookRequest {
 message FindRelatedBooksRequest {
   repeated string names = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
   repeated string shelves = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
+  ];
   int32 page_size = 4;
   string page_token = 5;
 }
 
 // Test repeated field with resource name format in page streaming response
 message FindRelatedBooksResponse {
-  repeated string names = 1 [
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+  repeated string names = 1
+      [(google.api.resource_reference).type = "library.googleapis.com/Book"];
   string next_page_token = 2;
 }
 
@@ -1048,8 +1139,7 @@ message TestOptionalRequiredFlatteningParamsRequest {
     ONE = 1;
   }
 
-  message InnerMessage {
-  }
+  message InnerMessage {}
 
   int32 required_singular_int32 = 1 [(google.api.field_behavior) = REQUIRED];
   int64 required_singular_int64 = 2 [(google.api.field_behavior) = REQUIRED];
@@ -1059,69 +1149,123 @@ message TestOptionalRequiredFlatteningParamsRequest {
   InnerEnum required_singular_enum = 6 [(google.api.field_behavior) = REQUIRED];
   string required_singular_string = 7 [(google.api.field_behavior) = REQUIRED];
   bytes required_singular_bytes = 8 [(google.api.field_behavior) = REQUIRED];
-  InnerMessage required_singular_message = 9 [(google.api.field_behavior) = REQUIRED];
-  string required_singular_resource_name = 10 [(google.api.field_behavior) = REQUIRED,
+  InnerMessage required_singular_message = 9
+      [(google.api.field_behavior) = REQUIRED];
+  string required_singular_resource_name = 10 [
+    (google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference).type = "library.googleapis.com/Book"
   ];
-  string required_singular_resource_name_oneof = 11 [(google.api.field_behavior) = REQUIRED,
+  string required_singular_resource_name_oneof = 11 [
+    (google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference).type = "library.googleapis.com/Book"
   ];
-  string required_singular_resource_name_common = 14 [(google.api.field_behavior) = REQUIRED];
-  fixed32 required_singular_fixed32 = 12 [(google.api.field_behavior) = REQUIRED];
-  fixed64 required_singular_fixed64 = 13 [(google.api.field_behavior) = REQUIRED];
-
-  repeated int32 required_repeated_int32 = 21 [(google.api.field_behavior) = REQUIRED];
-  repeated int64 required_repeated_int64 = 22 [(google.api.field_behavior) = REQUIRED];
-  repeated float required_repeated_float = 23 [(google.api.field_behavior) = REQUIRED];
-  repeated double required_repeated_double = 24 [(google.api.field_behavior) = REQUIRED];
-  repeated bool required_repeated_bool = 25 [(google.api.field_behavior) = REQUIRED];
-  repeated InnerEnum required_repeated_enum = 26 [(google.api.field_behavior) = REQUIRED];
-  repeated string required_repeated_string = 27 [(google.api.field_behavior) = REQUIRED];
-  repeated bytes required_repeated_bytes = 28 [(google.api.field_behavior) = REQUIRED];
-  repeated InnerMessage required_repeated_message = 29 [(google.api.field_behavior) = REQUIRED];
-  repeated string required_repeated_resource_name = 30 [(google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
-  repeated string required_repeated_resource_name_oneof = 31 [(google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"];
-  repeated string required_repeated_resource_name_common = 34 [(google.api.field_behavior) = REQUIRED];
-  repeated fixed32 required_repeated_fixed32 = 32 [(google.api.field_behavior) = REQUIRED];
-  repeated fixed64 required_repeated_fixed64 = 33 [(google.api.field_behavior) = REQUIRED];
+  string required_singular_resource_name_common = 14
+      [(google.api.field_behavior) = REQUIRED];
+  fixed32 required_singular_fixed32 = 12
+      [(google.api.field_behavior) = REQUIRED];
+  fixed64 required_singular_fixed64 = 13
+      [(google.api.field_behavior) = REQUIRED];
+
+  repeated int32 required_repeated_int32 = 21
+      [(google.api.field_behavior) = REQUIRED];
+  repeated int64 required_repeated_int64 = 22
+      [(google.api.field_behavior) = REQUIRED];
+  repeated float required_repeated_float = 23
+      [(google.api.field_behavior) = REQUIRED];
+  repeated double required_repeated_double = 24
+      [(google.api.field_behavior) = REQUIRED];
+  repeated bool required_repeated_bool = 25
+      [(google.api.field_behavior) = REQUIRED];
+  repeated InnerEnum required_repeated_enum = 26
+      [(google.api.field_behavior) = REQUIRED];
+  repeated string required_repeated_string = 27
+      [(google.api.field_behavior) = REQUIRED];
+  repeated bytes required_repeated_bytes = 28
+      [(google.api.field_behavior) = REQUIRED];
+  repeated InnerMessage required_repeated_message = 29
+      [(google.api.field_behavior) = REQUIRED];
+  repeated string required_repeated_resource_name = 30 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
+  repeated string required_repeated_resource_name_oneof = 31 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
+  repeated string required_repeated_resource_name_common = 34
+      [(google.api.field_behavior) = REQUIRED];
+  repeated fixed32 required_repeated_fixed32 = 32
+      [(google.api.field_behavior) = REQUIRED];
+  repeated fixed64 required_repeated_fixed64 = 33
+      [(google.api.field_behavior) = REQUIRED];
 
   map required_map = 41 [(google.api.field_behavior) = REQUIRED];
 
-  google.protobuf.Any required_any_value = 150 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Struct required_struct_value = 151 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Value required_value_value = 152 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.ListValue required_list_value_value = 153 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Timestamp required_time_value = 154 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Duration required_duration_value = 155 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.FieldMask required_field_mask_value = 156 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Int32Value required_int32_value = 157 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.UInt32Value required_uint32_value = 158 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Int64Value required_int64_value = 159 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.UInt64Value required_uint64_value = 160 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.FloatValue required_float_value = 161 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.DoubleValue required_double_value = 162 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.StringValue required_string_value = 163 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.BoolValue required_bool_value = 164 [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.BytesValue required_bytes_value = 165 [(google.api.field_behavior) = REQUIRED];
-
-  repeated google.protobuf.Any required_repeated_any_value = 170 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Struct required_repeated_struct_value = 171 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Value required_repeated_value_value = 172 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.ListValue required_repeated_list_value_value = 173 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Timestamp required_repeated_time_value = 174 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Duration required_repeated_duration_value = 175 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.FieldMask required_repeated_field_mask_value = 176 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Int32Value required_repeated_int32_value = 177 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.UInt32Value required_repeated_uint32_value = 178 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Int64Value required_repeated_int64_value = 179 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.UInt64Value required_repeated_uint64_value = 180 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.FloatValue required_repeated_float_value = 181 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.DoubleValue required_repeated_double_value = 182 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.StringValue required_repeated_string_value = 183 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.BoolValue required_repeated_bool_value = 184 [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.BytesValue required_repeated_bytes_value = 185 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Any required_any_value = 150
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Struct required_struct_value = 151
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Value required_value_value = 152
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.ListValue required_list_value_value = 153
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Timestamp required_time_value = 154
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Duration required_duration_value = 155
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.FieldMask required_field_mask_value = 156
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Int32Value required_int32_value = 157
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.UInt32Value required_uint32_value = 158
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Int64Value required_int64_value = 159
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.UInt64Value required_uint64_value = 160
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.FloatValue required_float_value = 161
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.DoubleValue required_double_value = 162
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.StringValue required_string_value = 163
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.BoolValue required_bool_value = 164
+      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.BytesValue required_bytes_value = 165
+      [(google.api.field_behavior) = REQUIRED];
+
+  repeated google.protobuf.Any required_repeated_any_value = 170
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Struct required_repeated_struct_value = 171
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Value required_repeated_value_value = 172
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.ListValue required_repeated_list_value_value = 173
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Timestamp required_repeated_time_value = 174
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Duration required_repeated_duration_value = 175
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.FieldMask required_repeated_field_mask_value = 176
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Int32Value required_repeated_int32_value = 177
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.UInt32Value required_repeated_uint32_value = 178
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Int64Value required_repeated_int64_value = 179
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.UInt64Value required_repeated_uint64_value = 180
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.FloatValue required_repeated_float_value = 181
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.DoubleValue required_repeated_double_value = 182
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.StringValue required_repeated_string_value = 183
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.BoolValue required_repeated_bool_value = 184
+      [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.BytesValue required_repeated_bytes_value = 185
+      [(google.api.field_behavior) = REQUIRED];
 
   int32 optional_singular_int32 = 51;
   int64 optional_singular_int64 = 52;
@@ -1132,9 +1276,8 @@ message TestOptionalRequiredFlatteningParamsRequest {
   string optional_singular_string = 57;
   bytes optional_singular_bytes = 58;
   InnerMessage optional_singular_message = 59;
-  string optional_singular_resource_name = 60 [
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+  string optional_singular_resource_name = 60
+      [(google.api.resource_reference).type = "library.googleapis.com/Book"];
   string optional_singular_resource_name_oneof = 61 [
     (google.api.resource_reference).type = "library.googleapis.com/Book"
     // Test that we can reference Resource Name One Of by its name.
@@ -1152,12 +1295,10 @@ message TestOptionalRequiredFlatteningParamsRequest {
   repeated string optional_repeated_string = 77;
   repeated bytes optional_repeated_bytes = 78;
   repeated InnerMessage optional_repeated_message = 79;
-  repeated string optional_repeated_resource_name = 80 [
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
-  repeated string optional_repeated_resource_name_oneof = 81 [
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+  repeated string optional_repeated_resource_name = 80
+      [(google.api.resource_reference).type = "library.googleapis.com/Book"];
+  repeated string optional_repeated_resource_name_oneof = 81
+      [(google.api.resource_reference).type = "library.googleapis.com/Book"];
   repeated string optional_repeated_resource_name_common = 84;
   repeated fixed32 optional_repeated_fixed32 = 82;
   repeated fixed64 optional_repeated_fixed64 = 83;
@@ -1199,26 +1340,20 @@ message TestOptionalRequiredFlatteningParamsRequest {
   repeated google.protobuf.BytesValue repeated_bytes_value = 135;
 }
 
-message TestOptionalRequiredFlatteningParamsResponse {
-}
+message TestOptionalRequiredFlatteningParamsResponse {}
 
 message MoveBooksRequest {
+  string source = 1 [(google.api.resource_reference).child_type =
+                         "library.googleapis.com/Book"];
 
-  string source = 1 [
-    (google.api.resource_reference).child_type = "library.googleapis.com/Book"
-  ];
-
-  string destination = 2 [
-    (google.api.resource_reference).child_type = "library.googleapis.com/Book"
-  ];
+  string destination = 2 [(google.api.resource_reference).child_type =
+                              "library.googleapis.com/Book"];
 
-  repeated string publishers = 3 [
-    (google.api.resource_reference).type = "library.googleapis.com/Publisher"
-  ];
+  repeated string publishers = 3 [(google.api.resource_reference).type =
+                                      "library.googleapis.com/Publisher"];
 
-  string project = 4 [
-    (google.api.resource_reference).type = "cloudresourcemanager.googleapis.com/Project"
-  ];
+  string project = 4 [(google.api.resource_reference).type =
+                          "cloudresourcemanager.googleapis.com/Project"];
 }
 
 message MoveBooksResponse {
@@ -1226,14 +1361,11 @@ message MoveBooksResponse {
 }
 
 message ArchiveBooksRequest {
+  string source = 1 [(google.api.resource_reference).child_type =
+                         "library.googleapis.com/Book"];
 
-  string source = 1 [
-    (google.api.resource_reference).child_type = "library.googleapis.com/Book"
-  ];
-
-  string archive = 2 [
-    (google.api.resource_reference).type = "library.googleapis.com/Archive"
-  ];
+  string archive = 2
+      [(google.api.resource_reference).type = "library.googleapis.com/Archive"];
 }
 
 message ArchiveBooksResponse {

From fc97d07cc4d3feae4a16e8b28258d805f132baf7 Mon Sep 17 00:00:00 2001
From: Mira Leung 
Date: Thu, 11 Jun 2020 21:41:36 +0000
Subject: [PATCH 2/2] fix: revert proto formatting changes

---
 .../testdata/csharp_library.baseline          |  70 +-
 .../testdata/go_library.baseline              |  17 +-
 .../testdata/java_library.baseline            |  32 +-
 .../java_library_no_gapic_config.baseline     |  32 +-
 ..._library_with_grpc_service_config.baseline |  32 +-
 .../testdata/nodejs_library.baseline          |  17 +-
 .../testdata/php_library.baseline             |  17 +-
 ..._library_with_grpc_service_config.baseline |  17 +-
 .../testdata/python_library.baseline          |  34 +-
 .../testdata/ruby_library.baseline            |  17 +-
 .../ruby_library_no_gapic_config.baseline     |  17 +-
 .../testsrc/protoannotations/library.proto    | 862 ++++++++----------
 12 files changed, 476 insertions(+), 688 deletions(-)

diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/csharp_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/csharp_library.baseline
index 130b92e9e8..2f9fb7f55f 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/csharp_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/csharp_library.baseline
@@ -17046,8 +17046,7 @@ namespace Google.Example.Library.V1
 
         /// 
         /// Test server streaming
-        /// gRPC streaming methods don't have an HTTP equivalent and don't need to
-        /// have the google.api.http option.
+        /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
         /// 
         /// 
         /// The request object containing all of the parameters for the API call.
@@ -17074,8 +17073,7 @@ namespace Google.Example.Library.V1
 
         /// 
         /// Test server streaming, non-paged responses.
-        /// gRPC streaming methods don't have an HTTP equivalent and don't need to
-        /// have the google.api.http option.
+        /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
         /// 
         /// 
         /// The name of the shelf whose books we'd like to list.
@@ -17097,8 +17095,7 @@ namespace Google.Example.Library.V1
 
         /// 
         /// Test server streaming, non-paged responses.
-        /// gRPC streaming methods don't have an HTTP equivalent and don't need to
-        /// have the google.api.http option.
+        /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
         /// 
         /// 
         /// The request object containing all of the parameters for the API call.
@@ -24749,9 +24746,8 @@ namespace Google.Example.Library.V1
         }
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The resource name of the book.
@@ -24789,9 +24785,8 @@ namespace Google.Example.Library.V1
                 callSettings);
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The resource name of the book.
@@ -24826,9 +24821,8 @@ namespace Google.Example.Library.V1
                 gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The resource name of the book.
@@ -24863,9 +24857,8 @@ namespace Google.Example.Library.V1
                 callSettings);
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The resource name of the book.
@@ -24903,9 +24896,8 @@ namespace Google.Example.Library.V1
                 callSettings);
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The resource name of the book.
@@ -24940,9 +24932,8 @@ namespace Google.Example.Library.V1
                 gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The resource name of the book.
@@ -24977,9 +24968,8 @@ namespace Google.Example.Library.V1
                 callSettings);
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The request object containing all of the parameters for the API call.
@@ -24998,9 +24988,8 @@ namespace Google.Example.Library.V1
         }
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The request object containing all of the parameters for the API call.
@@ -25018,9 +25007,8 @@ namespace Google.Example.Library.V1
                 gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The request object containing all of the parameters for the API call.
@@ -26157,8 +26145,7 @@ namespace Google.Example.Library.V1
 
         /// 
         /// Test server streaming
-        /// gRPC streaming methods don't have an HTTP equivalent and don't need to
-        /// have the google.api.http option.
+        /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
         /// 
         /// 
         /// The request object containing all of the parameters for the API call.
@@ -26197,8 +26184,7 @@ namespace Google.Example.Library.V1
 
         /// 
         /// Test server streaming, non-paged responses.
-        /// gRPC streaming methods don't have an HTTP equivalent and don't need to
-        /// have the google.api.http option.
+        /// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
         /// 
         /// 
         /// The request object containing all of the parameters for the API call.
@@ -26791,9 +26777,8 @@ namespace Google.Example.Library.V1
         }
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The request object containing all of the parameters for the API call.
@@ -26813,9 +26798,8 @@ namespace Google.Example.Library.V1
         }
 
         /// 
-        /// Test using resource messages as request objects. Only used by PubSub
-        /// (CreateSubscription) for historical reasons. New APIs should always create
-        /// a separate message for a request.
+        /// Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        /// New APIs should always create a separate message for a request.
         /// 
         /// 
         /// The request object containing all of the parameters for the API call.
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/go_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/go_library.baseline
index 62c8283e5a..dcfc84a964 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/go_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/go_library.baseline
@@ -743,8 +743,7 @@ func (c *LibClient) UpdateBookIndex(ctx context.Context, req *librarypb.UpdateBo
 }
 
 // StreamShelves test server streaming
-// gRPC streaming methods don't have an HTTP equivalent and don't need to
-// have the google.api.http option.
+// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 func (c *LibClient) StreamShelves(ctx context.Context, req *librarypb.StreamShelvesRequest, opts ...gax.CallOption) (librarypb.LibraryService_StreamShelvesClient, error) {
     ctx = insertMetadata(ctx, c.xGoogMetadata)
     opts = append(c.CallOptions.StreamShelves[0:len(c.CallOptions.StreamShelves):len(c.CallOptions.StreamShelves)], opts...)
@@ -761,8 +760,7 @@ func (c *LibClient) StreamShelves(ctx context.Context, req *librarypb.StreamShel
 }
 
 // StreamBooks test server streaming, non-paged responses.
-// gRPC streaming methods don't have an HTTP equivalent and don't need to
-// have the google.api.http option.
+// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 func (c *LibClient) StreamBooks(ctx context.Context, req *librarypb.StreamBooksRequest, opts ...gax.CallOption) (librarypb.LibraryService_StreamBooksClient, error) {
     ctx = insertMetadata(ctx, c.xGoogMetadata)
     opts = append(c.CallOptions.StreamBooks[0:len(c.CallOptions.StreamBooks):len(c.CallOptions.StreamBooks)], opts...)
@@ -810,10 +808,8 @@ func (c *LibClient) MonologAboutBook(ctx context.Context, opts ...gax.CallOption
     return resp, nil
 }
 
-// BabbleAboutBook test samplegen response handling when a client streaming method returns
-// Empty.
-// gRPC streaming methods don't have an HTTP equivalent and don't need to
-// have the google.api.http option.
+// BabbleAboutBook test samplegen response handling when a client streaming method returns Empty.
+// gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 func (c *LibClient) BabbleAboutBook(ctx context.Context, opts ...gax.CallOption) (librarypb.LibraryService_BabbleAboutBookClient, error) {
     ctx = insertMetadata(ctx, c.xGoogMetadata)
     opts = append(c.CallOptions.BabbleAboutBook[0:len(c.CallOptions.BabbleAboutBook):len(c.CallOptions.BabbleAboutBook)], opts...)
@@ -1024,9 +1020,8 @@ func (c *LibClient) StreamingArchiveBooks(ctx context.Context, opts ...gax.CallO
     return resp, nil
 }
 
-// SaveBook test using resource messages as request objects. Only used by PubSub
-// (CreateSubscription) for historical reasons. New APIs should always create
-// a separate message for a request.
+// SaveBook test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+// New APIs should always create a separate message for a request.
 func (c *LibClient) SaveBook(ctx context.Context, req *librarypb.Book, opts ...gax.CallOption) error {
     ctx = insertMetadata(ctx, c.xGoogMetadata)
     opts = append(c.CallOptions.SaveBook[0:len(c.CallOptions.SaveBook):len(c.CallOptions.SaveBook)], opts...)
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library.baseline
index 119ba8e045..ecdd8a452e 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library.baseline
@@ -6992,8 +6992,7 @@ public class LibraryClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7017,8 +7016,7 @@ public class LibraryClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming, non-paged responses.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7105,10 +7103,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test samplegen response handling when a client streaming method returns
-   * Empty.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * Test samplegen response handling when a client streaming method returns Empty.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * Sample code:
    * 

@@ -9701,9 +9697,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

@@ -9737,9 +9732,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

@@ -9773,9 +9767,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

@@ -9797,9 +9790,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_no_gapic_config.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_no_gapic_config.baseline
index 86b534c036..1b8c108100 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_no_gapic_config.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_no_gapic_config.baseline
@@ -2411,8 +2411,7 @@ public class LibraryServiceClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * Sample code:
    * 

@@ -2436,8 +2435,7 @@ public class LibraryServiceClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming, non-paged responses.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * Sample code:
    * 

@@ -2524,10 +2522,8 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test samplegen response handling when a client streaming method returns
-   * Empty.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * Test samplegen response handling when a client streaming method returns Empty.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * Sample code:
    * 

@@ -3969,9 +3965,8 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

@@ -4005,9 +4000,8 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

@@ -4041,9 +4035,8 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

@@ -4065,9 +4058,8 @@ public class LibraryServiceClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_with_grpc_service_config.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_with_grpc_service_config.baseline
index 1325dc8044..c94a9875b4 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_with_grpc_service_config.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/java_library_with_grpc_service_config.baseline
@@ -6992,8 +6992,7 @@ public class LibraryClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7017,8 +7016,7 @@ public class LibraryClient implements BackgroundResource {
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Test server streaming, non-paged responses.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * Sample code:
    * 

@@ -7105,10 +7103,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test samplegen response handling when a client streaming method returns
-   * Empty.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * Test samplegen response handling when a client streaming method returns Empty.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * Sample code:
    * 

@@ -9701,9 +9697,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

@@ -9737,9 +9732,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

@@ -9773,9 +9767,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

@@ -9797,9 +9790,8 @@ public class LibraryClient implements BackgroundResource {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * Sample code:
    * 

diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/nodejs_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/nodejs_library.baseline
index 0a5909ed8b..2877dfad47 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/nodejs_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/nodejs_library.baseline
@@ -6797,8 +6797,7 @@ class LibraryServiceClient {
 
   /**
    * Test server streaming
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * @param {Object} request
    *   The request object that will be sent.
@@ -6832,8 +6831,7 @@ class LibraryServiceClient {
 
   /**
    * Test server streaming, non-paged responses.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * @param {Object} request
    *   The request object that will be sent.
@@ -6946,10 +6944,8 @@ class LibraryServiceClient {
   }
 
   /**
-   * Test samplegen response handling when a client streaming method returns
-   * Empty.
-   * gRPC streaming methods don't have an HTTP equivalent and don't need to
-   * have the google.api.http option.
+   * Test samplegen response handling when a client streaming method returns Empty.
+   * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
    *
    * @param {Object} [options]
    *   Optional parameters. You can override the default settings for this call, e.g, timeout,
@@ -8069,9 +8065,8 @@ class LibraryServiceClient {
   }
 
   /**
-   * Test using resource messages as request objects. Only used by PubSub
-   * (CreateSubscription) for historical reasons. New APIs should always create
-   * a separate message for a request.
+   * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+   * New APIs should always create a separate message for a request.
    *
    * @param {Object} request
    *   The request object that will be sent.
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library.baseline
index ee51cd1832..8a1e687e4a 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library.baseline
@@ -4174,8 +4174,7 @@ class LibraryServiceGapicClient
 
     /**
      * Test server streaming
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to
-     * have the google.api.http option.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -4220,8 +4219,7 @@ class LibraryServiceGapicClient
 
     /**
      * Test server streaming, non-paged responses.
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to
-     * have the google.api.http option.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -4385,10 +4383,8 @@ class LibraryServiceGapicClient
     }
 
     /**
-     * Test samplegen response handling when a client streaming method returns
-     * Empty.
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to
-     * have the google.api.http option.
+     * Test samplegen response handling when a client streaming method returns Empty.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -5514,9 +5510,8 @@ class LibraryServiceGapicClient
     }
 
     /**
-     * Test using resource messages as request objects. Only used by PubSub
-     * (CreateSubscription) for historical reasons. New APIs should always create
-     * a separate message for a request.
+     * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+     * New APIs should always create a separate message for a request.
      *
      * Sample code:
      * ```
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library_with_grpc_service_config.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library_with_grpc_service_config.baseline
index 5d2b64d784..daff2c49b8 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library_with_grpc_service_config.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/php_library_with_grpc_service_config.baseline
@@ -4174,8 +4174,7 @@ class LibraryServiceGapicClient
 
     /**
      * Test server streaming
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to
-     * have the google.api.http option.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -4220,8 +4219,7 @@ class LibraryServiceGapicClient
 
     /**
      * Test server streaming, non-paged responses.
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to
-     * have the google.api.http option.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -4385,10 +4383,8 @@ class LibraryServiceGapicClient
     }
 
     /**
-     * Test samplegen response handling when a client streaming method returns
-     * Empty.
-     * gRPC streaming methods don't have an HTTP equivalent and don't need to
-     * have the google.api.http option.
+     * Test samplegen response handling when a client streaming method returns Empty.
+     * gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
      *
      * Sample code:
      * ```
@@ -5514,9 +5510,8 @@ class LibraryServiceGapicClient
     }
 
     /**
-     * Test using resource messages as request objects. Only used by PubSub
-     * (CreateSubscription) for historical reasons. New APIs should always create
-     * a separate message for a request.
+     * Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+     * New APIs should always create a separate message for a request.
      *
      * Sample code:
      * ```
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/python_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/python_library.baseline
index df801a8b77..a1683baaa7 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/python_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/python_library.baseline
@@ -2702,8 +2702,7 @@ class LibraryServiceClient(object):
             metadata=None):
         """
         Test server streaming
-        gRPC streaming methods don't have an HTTP equivalent and don't need to
-        have the google.api.http option.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 
         Example:
             >>> from google.cloud.example import library_v1
@@ -2759,8 +2758,7 @@ class LibraryServiceClient(object):
             metadata=None):
         """
         Test server streaming, non-paged responses.
-        gRPC streaming methods don't have an HTTP equivalent and don't need to
-        have the google.api.http option.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 
         Example:
             >>> from google.cloud.example import library_v1
@@ -2924,10 +2922,8 @@ class LibraryServiceClient(object):
             timeout=google.api_core.gapic_v1.method.DEFAULT,
             metadata=None):
         """
-        Test samplegen response handling when a client streaming method returns
-        Empty.
-        gRPC streaming methods don't have an HTTP equivalent and don't need to
-        have the google.api.http option.
+        Test samplegen response handling when a client streaming method returns Empty.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 
         Example:
             >>> from google.cloud.example import library_v1
@@ -4405,9 +4401,8 @@ class LibraryServiceClient(object):
             timeout=google.api_core.gapic_v1.method.DEFAULT,
             metadata=None):
         """
-        Test using resource messages as request objects. Only used by PubSub
-        (CreateSubscription) for historical reasons. New APIs should always create
-        a separate message for a request.
+        Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        New APIs should always create a separate message for a request.
 
         Example:
             >>> from google.cloud.example import library_v1
@@ -5544,8 +5539,7 @@ class LibraryServiceGrpcTransport(object):
         """Return the gRPC stub for :meth:`LibraryServiceClient.stream_shelves`.
 
         Test server streaming
-        gRPC streaming methods don't have an HTTP equivalent and don't need to
-        have the google.api.http option.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 
         Returns:
             Callable: A callable which accepts the appropriate
@@ -5559,8 +5553,7 @@ class LibraryServiceGrpcTransport(object):
         """Return the gRPC stub for :meth:`LibraryServiceClient.stream_books`.
 
         Test server streaming, non-paged responses.
-        gRPC streaming methods don't have an HTTP equivalent and don't need to
-        have the google.api.http option.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 
         Returns:
             Callable: A callable which accepts the appropriate
@@ -5599,10 +5592,8 @@ class LibraryServiceGrpcTransport(object):
     def babble_about_book(self):
         """Return the gRPC stub for :meth:`LibraryServiceClient.babble_about_book`.
 
-        Test samplegen response handling when a client streaming method returns
-        Empty.
-        gRPC streaming methods don't have an HTTP equivalent and don't need to
-        have the google.api.http option.
+        Test samplegen response handling when a client streaming method returns Empty.
+        gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 
         Returns:
             Callable: A callable which accepts the appropriate
@@ -5740,9 +5731,8 @@ class LibraryServiceGrpcTransport(object):
     def save_book(self):
         """Return the gRPC stub for :meth:`LibraryServiceClient.save_book`.
 
-        Test using resource messages as request objects. Only used by PubSub
-        (CreateSubscription) for historical reasons. New APIs should always create
-        a separate message for a request.
+        Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+        New APIs should always create a separate message for a request.
 
         Returns:
             Callable: A callable which accepts the appropriate
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library.baseline
index aa5091cee3..a1e3babd92 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library.baseline
@@ -4373,8 +4373,7 @@ module Library
       end
 
       # Test server streaming
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to
-      # have the google.api.http option.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
       #
       # @param name [String]
       #   The name of the shelf to stream.
@@ -4405,8 +4404,7 @@ module Library
       end
 
       # Test server streaming, non-paged responses.
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to
-      # have the google.api.http option.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
       #
       # @param name [String]
       #   The name of the shelf whose books we'd like to list.
@@ -4504,10 +4502,8 @@ module Library
         @monolog_about_book.call(request_protos, options)
       end
 
-      # Test samplegen response handling when a client streaming method returns
-      # Empty.
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to
-      # have the google.api.http option.
+      # Test samplegen response handling when a client streaming method returns Empty.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
       #
       # @param reqs [Enumerable]
       #   The input requests.
@@ -5670,9 +5666,8 @@ module Library
         @streaming_archive_books.call(request_protos, options)
       end
 
-      # Test using resource messages as request objects. Only used by PubSub
-      # (CreateSubscription) for historical reasons. New APIs should always create
-      # a separate message for a request.
+      # Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+      # New APIs should always create a separate message for a request.
       #
       # @param name [String]
       #   The resource name of the book.
diff --git a/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library_no_gapic_config.baseline b/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library_no_gapic_config.baseline
index 6adf1eda82..367eed4af6 100644
--- a/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library_no_gapic_config.baseline
+++ b/src/test/java/com/google/api/codegen/protoannotations/testdata/ruby_library_no_gapic_config.baseline
@@ -4239,8 +4239,7 @@ module Library
       end
 
       # Test server streaming
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to
-      # have the google.api.http option.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
       #
       # @param name [String]
       #   The name of the shelf to stream.
@@ -4271,8 +4270,7 @@ module Library
       end
 
       # Test server streaming, non-paged responses.
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to
-      # have the google.api.http option.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
       #
       # @param name [String]
       #   The name of the shelf whose books we'd like to list.
@@ -4374,10 +4372,8 @@ module Library
         @monolog_about_book.call(request_protos, options)
       end
 
-      # Test samplegen response handling when a client streaming method returns
-      # Empty.
-      # gRPC streaming methods don't have an HTTP equivalent and don't need to
-      # have the google.api.http option.
+      # Test samplegen response handling when a client streaming method returns Empty.
+      # gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
       #
       # @param reqs [Enumerable]
       #   The input requests.
@@ -4788,9 +4784,8 @@ module Library
         @streaming_archive_books.call(request_protos, options)
       end
 
-      # Test using resource messages as request objects. Only used by PubSub
-      # (CreateSubscription) for historical reasons. New APIs should always create
-      # a separate message for a request.
+      # Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+      # New APIs should always create a separate message for a request.
       #
       # @param name [String]
       #   The resource name of the book.
diff --git a/src/test/java/com/google/api/codegen/testsrc/protoannotations/library.proto b/src/test/java/com/google/api/codegen/testsrc/protoannotations/library.proto
index de84f1a2d3..16c2077630 100644
--- a/src/test/java/com/google/api/codegen/testsrc/protoannotations/library.proto
+++ b/src/test/java/com/google/api/codegen/testsrc/protoannotations/library.proto
@@ -60,24 +60,19 @@ option (google.api.resource_definition) = {
 service LibraryService {
   option (google.api.default_host) = "library-example.googleapis.com:1234";
   option (google.api.oauth_scopes) =
-      "https://www.googleapis.com/auth/library,"
-      "https://www.googleapis.com/auth/cloud-platform";
+  "https://www.googleapis.com/auth/library,"
+    "https://www.googleapis.com/auth/cloud-platform";
 
   // Creates a shelf, and returns the new Shelf.
   // RPC method comment may include special characters: <>&"`'@.
   rpc CreateShelf(CreateShelfRequest) returns (Shelf) {
-    option (google.api.http) = {
-      post: "/v1/bookShelves"
-      body: "shelf"
-    };
+    option (google.api.http) = { post: "/v1/bookShelves" body: "shelf" };
     option (google.api.method_signature) = "shelf";
   }
 
   // Gets a shelf.
   rpc GetShelf(GetShelfRequest) returns (Shelf) {
-    option (google.api.http) = {
-      get: "/v1/{name=bookShelves/*}"
-    };
+    option (google.api.http) = { get: "/v1/{name=bookShelves/*}" };
     option (google.api.method_signature) = "name";
     option (google.api.method_signature) = "name,message";
     option (google.api.method_signature) = "name,message,string_builder";
@@ -85,17 +80,13 @@ service LibraryService {
 
   // Lists shelves.
   rpc ListShelves(ListShelvesRequest) returns (ListShelvesResponse) {
-    option (google.api.http) = {
-      get: "/v1/bookShelves"
-    };
+    option (google.api.http) = { get: "/v1/bookShelves" };
     option (google.api.method_signature) = "";
   }
 
   // Deletes a shelf.
   rpc DeleteShelf(DeleteShelfRequest) returns (google.protobuf.Empty) {
-    option (google.api.http) = {
-      delete: "/v1/{name=bookShelves/*}"
-    };
+    option (google.api.http) = { delete: "/v1/{name=bookShelves/*}" };
     option (google.api.method_signature) = "name";
   }
 
@@ -103,10 +94,7 @@ service LibraryService {
   // `other_shelf_name` to shelf `name`, and deletes
   // `other_shelf_name`. Returns the updated shelf.
   rpc MergeShelves(MergeShelvesRequest) returns (Shelf) {
-    option (google.api.http) = {
-      post: "/v1/{name=bookShelves/*}:merge"
-      body: "*"
-    };
+    option (google.api.http) = { post: "/v1/{name=bookShelves/*}:merge" body: "*" };
     option (google.api.method_signature) = "name,other_shelf_name";
   }
 
@@ -133,79 +121,56 @@ service LibraryService {
         body: "*"
       }
     };
-    option (google.api.method_signature) =
-        "shelf,books,edition,series_uuid,publisher";
+    option (google.api.method_signature) = "shelf,books,edition,series_uuid,publisher";
   }
 
   // Creates an inventory. Tests singleton resources.
   rpc CreateInventory(CreateInventoryRequest) returns (Inventory) {
-    option (google.api.http) = {
-      post: "/v1/{parent=projects/*/locations/*/publishers/*}"
-      body: "inventory"
-    };
-    option (google.api.method_signature) =
-        "parent,inventory,asset,parent_asset,assets";
+    option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/publishers/*}" body: "inventory" };
+    option (google.api.method_signature) = "parent,inventory,asset,parent_asset,assets";
   }
 
   // Gets a book.
   rpc GetBook(GetBookRequest) returns (Book) {
-    option (google.api.http) = {
-      get: "/v1/{name=bookShelves/*/books/*}"
-    };
+    option (google.api.http) = { get: "/v1/{name=bookShelves/*/books/*}" };
     option (google.api.method_signature) = "name";
   }
 
   // Lists books in a shelf.
   rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) {
-    option (google.api.http) = {
-      get: "/v1/{name=bookShelves/*}/books"
-    };
+    option (google.api.http) = { get: "/v1/{name=bookShelves/*}/books" };
     option (google.api.method_signature) = "name,filter";
   }
 
   // Deletes a book.
   rpc DeleteBook(DeleteBookRequest) returns (protobuf.Empty) {
-    option (google.api.http) = {
-      delete: "/v1/{name=bookShelves/*/books/*}"
-    };
+    option (google.api.http) = { delete: "/v1/{name=bookShelves/*/books/*}" };
     option (google.api.method_signature) = "name";
   }
 
   // Updates a book.
   rpc UpdateBook(UpdateBookRequest) returns (Book) {
-    option (google.api.http) = {
-      put: "/v1/{name=bookShelves/*/books/*}"
-      body: "book"
-    };
+    option (google.api.http) = { put: "/v1/{name=bookShelves/*/books/*}" body: "book" };
     option (google.api.method_signature) = "name,book";
-    option (google.api.method_signature) =
-        "name,optional_foo,book,update_mask,physical_mask";
+    option (google.api.method_signature) = "name,optional_foo,book,update_mask,physical_mask";
   }
 
   // Moves a book to another shelf, and returns the new book.
   rpc MoveBook(MoveBookRequest) returns (Book) {
-    option (google.api.http) = {
-      post: "/v1/{name=bookShelves/*/books/*}:move"
-      body: "*"
-    };
+    option (google.api.http) = { post: "/v1/{name=bookShelves/*/books/*}:move" body: "*" };
     option (google.api.method_signature) = "name,other_shelf_name";
   }
 
   // Lists a primitive resource. To test go page streaming.
   rpc ListStrings(ListStringsRequest) returns (ListStringsResponse) {
-    option (google.api.http) = {
-      get: "/v1/strings"
-    };
+    option (google.api.http) = { get: "/v1/strings" };
     option (google.api.method_signature) = "";
     option (google.api.method_signature) = "name";
   }
 
   // Adds comments to a book
   rpc AddComments(AddCommentsRequest) returns (google.protobuf.Empty) {
-    option (google.api.http) = {
-      post: "/v1/{name=bookShelves/*}/comments"
-      body: "*"
-    };
+    option (google.api.http) = { post: "/v1/{name=bookShelves/*}/comments" body: "*" };
     option (google.api.method_signature) = "name,comments";
   }
 
@@ -213,113 +178,82 @@ service LibraryService {
   rpc GetBookFromArchive(GetBookFromArchiveRequest) returns (BookFromArchive) {
     // The http binding on this field does not include the "**" path in order to
     // test the name conflict resolution in configgen.
-    option (google.api.http) = {
-      get: "/v1/{name=archives/*/books/*}"
-    };
+    option (google.api.http) = { get: "/v1/{name=archives/*/books/*}"};
     option (google.api.method_signature) = "name,parent";
   }
 
   // Gets a book from a shelf or archive.
-  rpc GetBookFromAnywhere(GetBookFromAnywhereRequest)
-      returns (BookFromAnywhere) {
-    option (google.api.http) = {
-      get: "/v1/{name=archives/*/books/**}"
-    };
+  rpc GetBookFromAnywhere(GetBookFromAnywhereRequest) returns (BookFromAnywhere) {
+    option (google.api.http) = { get: "/v1/{name=archives/*/books/**}"};
     option (google.api.method_signature) = "name,alt_book_name,place,folder";
   }
 
   // Test proper OneOf-Any resource name mapping
-  rpc GetBookFromAbsolutelyAnywhere(GetBookFromAbsolutelyAnywhereRequest)
-      returns (BookFromAnywhere) {
+  rpc GetBookFromAbsolutelyAnywhere(GetBookFromAbsolutelyAnywhereRequest) returns (BookFromAnywhere) {
     option (google.api.http) = {
       post: "/v1/{name=archives/*/books/*}"
-      additional_bindings { post: "/v1/{alt_book_name=bookShelves/*/books/*}" }
+      additional_bindings {
+        post: "/v1/{alt_book_name=bookShelves/*/books/*}"
+      }
     };
     option (google.api.method_signature) = "name";
   }
 
   // Updates the index of a book.
   rpc UpdateBookIndex(UpdateBookIndexRequest) returns (google.protobuf.Empty) {
-    option (google.api.http) = {
-      post: "/v1/{name=bookShelves/*/books/*}/index"
-      body: "*"
-    };
+    option (google.api.http) = { post: "/v1/{name=bookShelves/*/books/*}/index" body: "*" };
     option (google.api.method_signature) = "name,index_name,index_map";
   }
 
   // Test server streaming
-  rpc StreamShelves(StreamShelvesRequest)
-      returns (stream StreamShelvesResponse) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to
-    // have the google.api.http option.
+  rpc StreamShelves(StreamShelvesRequest) returns (stream StreamShelvesResponse) {
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
   }
 
   // Test server streaming, non-paged responses.
   rpc StreamBooks(StreamBooksRequest) returns (stream Book) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to
-    // have the google.api.http option.
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 
     option (google.api.method_signature) = "name";
   }
 
   // Test bidi-streaming.
   rpc DiscussBook(stream DiscussBookRequest) returns (stream Comment) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to
-    // have the google.api.http option.
-    option (google.api.http) = {
-      post: "/v1/{name=archives/*/books/*}:discuss"
-      body: "*"
-    };
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+    option (google.api.http) = { post: "/v1/{name=archives/*/books/*}:discuss" body: "*" };
     option (google.api.method_signature) = "name";
   }
 
   // Test client streaming.
   rpc MonologAboutBook(stream DiscussBookRequest) returns (Comment) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to
-    // have the google.api.http option.
-    option (google.api.http) = {
-      get: "/v1/{name=archives/*/books/*}:monolog"
-      body: "*"
-    };
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
+    option (google.api.http) = { get: "/v1/{name=archives/*/books/*}:monolog" body: "*" };
     option (google.api.method_signature) = "name";
   }
 
-  // Test samplegen response handling when a client streaming method returns
-  // Empty.
-  rpc BabbleAboutBook(stream DiscussBookRequest)
-      returns (google.protobuf.Empty) {
-    // gRPC streaming methods don't have an HTTP equivalent and don't need to
-    // have the google.api.http option.
+  // Test samplegen response handling when a client streaming method returns Empty.
+  rpc BabbleAboutBook(stream DiscussBookRequest) returns (google.protobuf.Empty) {
+    // gRPC streaming methods don't have an HTTP equivalent and don't need to have the google.api.http option.
 
     option (google.api.method_signature) = "name";
   }
 
-  rpc FindRelatedBooks(FindRelatedBooksRequest)
-      returns (FindRelatedBooksResponse) {
-    option (google.api.http) = {
-      get: "/v1/bookShelves"
-    };
+  rpc FindRelatedBooks(FindRelatedBooksRequest) returns (FindRelatedBooksResponse) {
+    option (google.api.http) = { get: "/v1/bookShelves" };
     option (google.api.method_signature) = "names,shelves";
   }
 
   // Adds a tag to the book. This RPC is a mixin.
-  rpc AddTag(google.tagger.v1.AddTagRequest)
-      returns (google.tagger.v1.AddTagResponse) {
-    option (google.api.http) = {
-      post: "/v1/{resource=bookShelves/*/books/*}:addTag"
-      body: "*"
-    };
+  rpc AddTag(google.tagger.v1.AddTagRequest) returns (google.tagger.v1.AddTagResponse) {
+    option (google.api.http) = { post: "/v1/{resource=bookShelves/*/books/*}:addTag" body: "*" };
     option (google.api.method_signature) = "resource,tag";
   }
 
-  // AddLabel intentionally left out to test the reroute_to_grpc_interface
-  // feature
+  // AddLabel intentionally left out to test the reroute_to_grpc_interface feature
 
   // Test long-running operations
   rpc GetBigBook(GetBookRequest) returns (google.longrunning.Operation) {
-    option (google.api.http) = {
-      get: "/v1/{name=bookShelves/*/books/*}:big"
-    };
+    option (google.api.http) = { get: "/v1/{name=bookShelves/*/books/*}:big" };
     option (google.api.method_signature) = "name";
     option (google.longrunning.operation_info) = {
       response_type: "google.example.library.v1.Book"
@@ -329,9 +263,7 @@ service LibraryService {
 
   // Test long-running operations with empty return type.
   rpc GetBigNothing(GetBookRequest) returns (google.longrunning.Operation) {
-    option (google.api.http) = {
-      get: "/v1/{name=bookShelves/*/books/*}:bignothing"
-    };
+    option (google.api.http) = { get: "/v1/{name=bookShelves/*/books/*}:bignothing" };
     option (google.api.method_signature) = "name";
     option (google.longrunning.operation_info) = {
       metadata_type: "google.example.library.v1.GetBigBookMetadata"
@@ -340,28 +272,17 @@ service LibraryService {
   }
 
   rpc MoveBooks(MoveBooksRequest) returns (MoveBooksResponse) {
-    option (google.api.http) = {
-      post: "/v1/{source=**}:move"
-      body: "*"
-    };
-    option (google.api.method_signature) =
-        "source,destination,publishers,project";
+    option (google.api.http) = {post: "/v1/{source=**}:move" body: "*"};
+    option (google.api.method_signature) = "source,destination,publishers,project";
   }
 
   rpc ArchiveBooks(ArchiveBooksRequest) returns (ArchiveBooksResponse) {
-    option (google.api.http) = {
-      post: "/v1/{source=**}:archive"
-      body: "*"
-    };
+    option (google.api.http) = {post: "/v1/{source=**}:archive" body: "*"};
     option (google.api.method_signature) = "source,archive";
   }
 
-  rpc LongRunningArchiveBooks(ArchiveBooksRequest)
-      returns (google.longrunning.Operation) {
-    option (google.api.http) = {
-      post: "/v1/{source=**}:longrunningmove"
-      body: "*"
-    };
+  rpc LongRunningArchiveBooks(ArchiveBooksRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {post: "/v1/{source=**}:longrunningmove" body: "*"};
     option (google.api.method_signature) = "source,archive";
     option (google.longrunning.operation_info) = {
       response_type: "ArchiveBooksResponse",
@@ -369,161 +290,149 @@ service LibraryService {
     };
   }
 
-  rpc StreamingArchiveBooks(stream ArchiveBooksRequest)
-      returns (stream ArchiveBooksResponse) {
+  rpc StreamingArchiveBooks(stream ArchiveBooksRequest) returns (stream ArchiveBooksResponse) {
     option (google.api.method_signature) = "source,archive";
   }
 
-  // Test using resource messages as request objects. Only used by PubSub
-  // (CreateSubscription) for historical reasons. New APIs should always create
-  // a separate message for a request.
+  // Test using resource messages as request objects. Only used by PubSub (CreateSubscription) for historical reasons.
+  // New APIs should always create a separate message for a request.
   rpc SaveBook(Book) returns (google.protobuf.Empty) {
-    option (google.api.http) = {
-      post: "/v1:saveBook"
-      body: "*"
-    };
+    option (google.api.http) = { post: "/v1:saveBook" body: "*"};
     option (google.api.method_signature) = "name,author,title,rating";
   }
 
   // Test optional flattening parameters of all types
-  rpc TestOptionalRequiredFlatteningParams(
-      TestOptionalRequiredFlatteningParamsRequest)
-      returns (TestOptionalRequiredFlatteningParamsResponse) {
-    option (google.api.http) = {
-      post: "/v1/testofp"
-      body: "*"
-    };
+  rpc TestOptionalRequiredFlatteningParams(TestOptionalRequiredFlatteningParamsRequest) returns (TestOptionalRequiredFlatteningParamsResponse) {
+    option (google.api.http) = { post: "/v1/testofp" body: "*" };
     option (google.api.method_signature) = "";
     option (google.api.method_signature) =
-        "required_singular_int32,"
-        "required_singular_int64,"
-        "required_singular_float,"
-        "required_singular_double,"
-        "required_singular_bool,"
-        "required_singular_enum,"
-        "required_singular_string,"
-        "required_singular_bytes,"
-        "required_singular_message,"
-        "required_singular_resource_name,"
-        "required_singular_resource_name_oneof,"
-        "required_singular_resource_name_common,"
-        "required_singular_fixed32,"
-        "required_singular_fixed64,"
-        "required_repeated_int32,"
-        "required_repeated_int64,"
-        "required_repeated_float,"
-        "required_repeated_double,"
-        "required_repeated_bool,"
-        "required_repeated_enum,"
-        "required_repeated_string,"
-        "required_repeated_bytes,"
-        "required_repeated_message,"
-        "required_repeated_resource_name,"
-        "required_repeated_resource_name_oneof,"
-        "required_repeated_resource_name_common,"
-        "required_repeated_fixed32,"
-        "required_repeated_fixed64,"
-        "required_map,"
-        "required_any_value,"
-        "required_struct_value,"
-        "required_value_value,"
-        "required_list_value_value,"
-        "required_time_value,"
-        "required_duration_value,"
-        "required_field_mask_value,"
-        "required_int32_value,"
-        "required_uint32_value,"
-        "required_int64_value,"
-        "required_uint64_value,"
-        "required_float_value,"
-        "required_double_value,"
-        "required_string_value,"
-        "required_bool_value,"
-        "required_bytes_value,"
-        "required_repeated_any_value,"
-        "required_repeated_struct_value,"
-        "required_repeated_value_value,"
-        "required_repeated_list_value_value,"
-        "required_repeated_time_value,"
-        "required_repeated_duration_value,"
-        "required_repeated_field_mask_value,"
-        "required_repeated_int32_value,"
-        "required_repeated_uint32_value,"
-        "required_repeated_int64_value,"
-        "required_repeated_uint64_value,"
-        "required_repeated_float_value,"
-        "required_repeated_double_value,"
-        "required_repeated_string_value,"
-        "required_repeated_bool_value,"
-        "required_repeated_bytes_value,"
-        "optional_singular_int32,"
-        "optional_singular_int64,"
-        "optional_singular_float,"
-        "optional_singular_double,"
-        "optional_singular_bool,"
-        "optional_singular_enum,"
-        "optional_singular_string,"
-        "optional_singular_bytes,"
-        "optional_singular_message,"
-        "optional_singular_resource_name,"
-        "optional_singular_resource_name_oneof,"
-        "optional_singular_resource_name_common,"
-        "optional_singular_fixed32,"
-        "optional_singular_fixed64,"
-        "optional_repeated_int32,"
-        "optional_repeated_int64,"
-        "optional_repeated_float,"
-        "optional_repeated_double,"
-        "optional_repeated_bool,"
-        "optional_repeated_enum,"
-        "optional_repeated_string,"
-        "optional_repeated_bytes,"
-        "optional_repeated_message,"
-        "optional_repeated_resource_name,"
-        "optional_repeated_resource_name_oneof,"
-        "optional_repeated_resource_name_common,"
-        "optional_repeated_fixed32,"
-        "optional_repeated_fixed64,"
-        "optional_map,"
-        "any_value,"
-        "struct_value,"
-        "value_value,"
-        "list_value_value,"
-        "time_value,"
-        "duration_value,"
-        "field_mask_value,"
-        "int32_value,"
-        "uint32_value,"
-        "int64_value,"
-        "uint64_value,"
-        "float_value,"
-        "double_value,"
-        "string_value,"
-        "bool_value,"
-        "bytes_value,"
-        "repeated_any_value,"
-        "repeated_struct_value,"
-        "repeated_value_value,"
-        "repeated_list_value_value,"
-        "repeated_time_value,"
-        "repeated_duration_value,"
-        "repeated_field_mask_value,"
-        "repeated_int32_value,"
-        "repeated_uint32_value,"
-        "repeated_int64_value,"
-        "repeated_uint64_value,"
-        "repeated_float_value,"
-        "repeated_double_value,"
-        "repeated_string_value,"
-        "repeated_bool_value,"
-        "repeated_bytes_value";
+    "required_singular_int32,"
+      "required_singular_int64,"
+      "required_singular_float,"
+      "required_singular_double,"
+      "required_singular_bool,"
+      "required_singular_enum,"
+      "required_singular_string,"
+      "required_singular_bytes,"
+      "required_singular_message,"
+      "required_singular_resource_name,"
+      "required_singular_resource_name_oneof,"
+      "required_singular_resource_name_common,"
+      "required_singular_fixed32,"
+      "required_singular_fixed64,"
+      "required_repeated_int32,"
+      "required_repeated_int64,"
+      "required_repeated_float,"
+      "required_repeated_double,"
+      "required_repeated_bool,"
+      "required_repeated_enum,"
+      "required_repeated_string,"
+      "required_repeated_bytes,"
+      "required_repeated_message,"
+      "required_repeated_resource_name,"
+      "required_repeated_resource_name_oneof,"
+      "required_repeated_resource_name_common,"
+      "required_repeated_fixed32,"
+      "required_repeated_fixed64,"
+      "required_map,"
+      "required_any_value,"
+      "required_struct_value,"
+      "required_value_value,"
+      "required_list_value_value,"
+      "required_time_value,"
+      "required_duration_value,"
+      "required_field_mask_value,"
+      "required_int32_value,"
+      "required_uint32_value,"
+      "required_int64_value,"
+      "required_uint64_value,"
+      "required_float_value,"
+      "required_double_value,"
+      "required_string_value,"
+      "required_bool_value,"
+      "required_bytes_value,"
+      "required_repeated_any_value,"
+      "required_repeated_struct_value,"
+      "required_repeated_value_value,"
+      "required_repeated_list_value_value,"
+      "required_repeated_time_value,"
+      "required_repeated_duration_value,"
+      "required_repeated_field_mask_value,"
+      "required_repeated_int32_value,"
+      "required_repeated_uint32_value,"
+      "required_repeated_int64_value,"
+      "required_repeated_uint64_value,"
+      "required_repeated_float_value,"
+      "required_repeated_double_value,"
+      "required_repeated_string_value,"
+      "required_repeated_bool_value,"
+      "required_repeated_bytes_value,"
+      "optional_singular_int32,"
+      "optional_singular_int64,"
+      "optional_singular_float,"
+      "optional_singular_double,"
+      "optional_singular_bool,"
+      "optional_singular_enum,"
+      "optional_singular_string,"
+      "optional_singular_bytes,"
+      "optional_singular_message,"
+      "optional_singular_resource_name,"
+      "optional_singular_resource_name_oneof,"
+      "optional_singular_resource_name_common,"
+      "optional_singular_fixed32,"
+      "optional_singular_fixed64,"
+      "optional_repeated_int32,"
+      "optional_repeated_int64,"
+      "optional_repeated_float,"
+      "optional_repeated_double,"
+      "optional_repeated_bool,"
+      "optional_repeated_enum,"
+      "optional_repeated_string,"
+      "optional_repeated_bytes,"
+      "optional_repeated_message,"
+      "optional_repeated_resource_name,"
+      "optional_repeated_resource_name_oneof,"
+      "optional_repeated_resource_name_common,"
+      "optional_repeated_fixed32,"
+      "optional_repeated_fixed64,"
+      "optional_map,"
+      "any_value,"
+      "struct_value,"
+      "value_value,"
+      "list_value_value,"
+      "time_value,"
+      "duration_value,"
+      "field_mask_value,"
+      "int32_value,"
+      "uint32_value,"
+      "int64_value,"
+      "uint64_value,"
+      "float_value,"
+      "double_value,"
+      "string_value,"
+      "bool_value,"
+      "bytes_value,"
+      "repeated_any_value,"
+      "repeated_struct_value,"
+      "repeated_value_value,"
+      "repeated_list_value_value,"
+      "repeated_time_value,"
+      "repeated_duration_value,"
+      "repeated_field_mask_value,"
+      "repeated_int32_value,"
+      "repeated_uint32_value,"
+      "repeated_int64_value,"
+      "repeated_uint64_value,"
+      "repeated_float_value,"
+      "repeated_double_value,"
+      "repeated_string_value,"
+      "repeated_bool_value,"
+      "repeated_bytes_value";
   }
 
   // This method is not exposed in the GAPIC config. It should be generated.
-  rpc PrivateListShelves(ListShelvesRequest) returns (Book) {
-    option (google.api.http) = {
-      get: "/v1/bookShelves"
-    };
+  rpc PrivateListShelves(ListShelvesRequest) returns (Book)  {
+    option (google.api.http) = { get: "/v1/bookShelves" };
     option (google.api.method_signature) = "";
   }
 }
@@ -535,7 +444,7 @@ message Book {
     type: "library.googleapis.com/Book",
     pattern: "shelves/{shelf}/books/{book_one}~{book_two}",
     pattern: "archives/{archive}/books/{book}",
-    pattern: "projects/{project}/books/{book}",
+    pattern: "projects/{project}/books/{book}"
     pattern: "projects/{project}/locations/{location}/publishers/{publisher}/inventory/books/{book}"
     history: ORIGINALLY_SINGLE_PATTERN,
   };
@@ -543,7 +452,9 @@ message Book {
   // The resource name of the book.
   // Book names have the form `bookShelves/{shelf_id}/books/{book_id}`.
   // Message field comment may include special characters: <>&"`'@.
-  string name = 1 [(google.api.field_behavior) = REQUIRED];
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED
+  ];
 
   // The name of the book author.
   string author = 2;
@@ -554,16 +465,18 @@ message Book {
   // Value indicating whether the book has been read.
   bool read = 4;
 
+
   enum Rating {
-    GOOD = 0;  // GOOD enum description
-    BAD = 1;   // Enum description with special characters: <>&"`'@.
+    GOOD = 0; // GOOD enum description
+    BAD = 1; // Enum description with special characters: <>&"`'@.
   }
 
   // For testing enums.
   Rating rating = 5;
 
-  string reader = 6
-      [(google.api.resource_reference).type = "library.googleapis.com/Reader"];
+  string reader = 6 [
+    (google.api.resource_reference).type = "library.googleapis.com/Reader"
+  ];
 
   // For testing all well-known types.
   google.protobuf.Any any_value = 10;
@@ -602,10 +515,11 @@ message Book {
   google.test.shared.data.Used resource = 29;
 
   // For testing accessing map fields in samplegen
-  map map_bool_key = 30;
+  map  map_bool_key = 30;
 }
 
 message Inventory {
+
   option (google.api.resource) = {
     type: "library.googleapis.com/Inventory",
     pattern: "projects/{project}/locations/{location}/publishers/{publisher}/inventory"
@@ -622,7 +536,9 @@ message BookFromArchive {
   };
   // The resource name of the book.
   // Book names have the form `archives/{archive_id}/books/{book_id}`.
-  string name = 1 [(google.api.field_behavior) = REQUIRED];
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED
+  ];
 
   // The name of the book author.
   string author = 2;
@@ -653,6 +569,7 @@ message SomeMessage2 {
   int32 field1 = 1;
 
   message SomeMessage3 {
+
     // Tests Python nested enums
     enum Alignment {
       // 8-bit
@@ -683,7 +600,9 @@ message Shelf {
   };
   // The resource name of the shelf.
   // Shelf names have the form `shelves/{shelf}`.
-  string name = 1 [(google.api.field_behavior) = REQUIRED];
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED
+  ];
 
   // The theme of the shelf
   string theme = 2;
@@ -693,6 +612,7 @@ message Shelf {
 }
 
 message Reader {
+
   option (google.api.resource) = {
     type: "library.googleapis.com/Reader",
     pattern: "projects/{project}/readers/{reader}",
@@ -700,7 +620,8 @@ message Reader {
     pattern: "organization/{organization}/reader"
   };
 
-  string name = 1 [(google.api.field_behavior) = REQUIRED];
+  string name = 1 [
+      (google.api.field_behavior) = REQUIRED];
 
   google.protobuf.Timestamp join_time = 2;
 }
@@ -708,7 +629,8 @@ message Reader {
 // Request message for LibraryService.CreateShelf.
 message CreateShelfRequest {
   // The shelf to create.
-  Shelf shelf = 1 [(google.api.field_behavior) = REQUIRED];
+  Shelf shelf = 1 [
+    (google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for LibraryService.GetShelf.
@@ -717,8 +639,7 @@ message GetShelfRequest {
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
     // Test that a resource name field can be referenced by its MessageType.
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
 
   // Field to verify that message-type query parameter gets flattened.
   SomeMessage message = 2;
@@ -726,9 +647,11 @@ message GetShelfRequest {
   StringBuilder string_builder = 3;
 
   // To test 'options' parameter name conflict.
-  string options = 4 [(google.api.field_behavior) = REQUIRED];
+  string options = 4 [
+    (google.api.field_behavior) = REQUIRED];
 }
 
+
 // Creates a name conflict with java.lang type
 message StringBuilder {
   string name = 1;
@@ -764,8 +687,7 @@ message StreamShelvesRequest {
   // The name of the shelf to stream.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
 }
 
 // Response message for LibraryService.StreamShelves.
@@ -779,8 +701,7 @@ message DeleteShelfRequest {
   // The name of the shelf to delete.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
 }
 
 // Describes the shelf being removed (other_shelf_name) and updated
@@ -789,14 +710,12 @@ message MergeShelvesRequest {
   // The name of the shelf we're adding books to.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
 
   // The name of the shelf we're removing books from and deleting.
   string other_shelf_name = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
 }
 
 // Request message for LibraryService.CreateBook.
@@ -804,20 +723,22 @@ message CreateBookRequest {
   // The name of the shelf in which the book is created.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
 
   // The book to create.
-  Book book = 2 [(google.api.field_behavior) = REQUIRED];
+  Book book = 2 [
+    (google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for LibraryService.PublishSeries.
 message PublishSeriesRequest {
   // The shelf in which the series is created.
-  Shelf shelf = 1 [(google.api.field_behavior) = REQUIRED];
+  Shelf shelf = 1 [
+    (google.api.field_behavior) = REQUIRED];
 
   // The books to publish in the series.
-  repeated Book books = 2 [(google.api.field_behavior) = REQUIRED];
+  repeated Book books = 2 [
+    (google.api.field_behavior) = REQUIRED];
 
   oneof versioning {
     // The edition of the series
@@ -828,11 +749,12 @@ message PublishSeriesRequest {
   }
 
   // Uniquely identifies the series to the publishing house.
-  SeriesUuid series_uuid = 5 [(google.api.field_behavior) = REQUIRED];
+  SeriesUuid series_uuid = 5 [
+    (google.api.field_behavior) = REQUIRED];
 
   // The publisher of the series.
-  string publisher = 6 [(google.api.resource_reference).type =
-                            "library.googleapis.com/Publisher"];
+  string publisher = 6 [
+    (google.api.resource_reference).type = "library.googleapis.com/Publisher"];
 }
 
 message SeriesUuid {
@@ -845,7 +767,8 @@ message SeriesUuid {
 // Response message for LibraryService.PublishSeries.
 message PublishSeriesResponse {
   // The names of the books in the series that were published
-  repeated string book_names = 1 [(google.api.field_behavior) = REQUIRED];
+  repeated string book_names = 1 [
+    (google.api.field_behavior) = REQUIRED];
 
   repeated Book books = 2;
 
@@ -858,8 +781,7 @@ message GetBookRequest {
   // The name of the book to retrieve.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 }
 
 // Request message for LibraryService.ListBooks.
@@ -867,8 +789,7 @@ message ListBooksRequest {
   // The name of the shelf whose books we'd like to list.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
 
   // Requested page size. Server may return fewer books than requested.
   // If unspecified, server will pick an appropriate default.
@@ -900,7 +821,8 @@ message ListBooksResponse {
 // Request message for LibraryService.StreamBooks.
 message StreamBooksRequest {
   // The name of the shelf whose books we'd like to list.
-  string name = 1 [(google.api.field_behavior) = REQUIRED];
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED];
 }
 
 // Request message for LibraryService.UpdateBook.
@@ -908,14 +830,15 @@ message UpdateBookRequest {
   // The name of the book to update.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 
   // An optional foo.
   string optional_foo = 2;
 
   // The book to update with.
-  Book book = 3 [(google.api.field_behavior) = REQUIRED];
+  Book book = 3 [
+    (google.api.field_behavior) = REQUIRED
+  ];
 
   // A field mask to apply, rendered as an HTTP parameter.
   google.protobuf.FieldMask update_mask = 4;
@@ -929,8 +852,7 @@ message DeleteBookRequest {
   // The name of the book to delete.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 }
 
 // Describes what book to move (name) and what shelf we're moving it
@@ -939,59 +861,57 @@ message MoveBookRequest {
   // The name of the book to move.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 
   // The name of the destination shelf.
   string other_shelf_name = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
 }
 
 message ListStringsRequest {
-  string name = 1 [(google.api.resource_reference).type = "*"];
+  string name = 1 [
+    (google.api.resource_reference).type = "*"
+  ];
   int32 page_size = 2;
   string page_token = 3;
 }
 
 message ListStringsResponse {
-  repeated string strings = 1 [(google.api.resource_reference).type = "*"];
+  repeated string strings = 1 [
+    (google.api.resource_reference).type = "*"
+  ];
   string next_page_token = 2;
 }
 
-message CreateInventoryRequest {
-  string parent = 1 [
-    (google.api.resource_reference).child_type =
-        "library.googleapis.com/Inventory",
-    (google.api.field_behavior) = REQUIRED
-  ];
+ message CreateInventoryRequest {
+    string parent = 1 [
+      (google.api.resource_reference).child_type = "library.googleapis.com/Inventory",
+      (google.api.field_behavior) = REQUIRED
+    ];
 
-  Inventory inventory = 2;
+    Inventory inventory = 2;
 
-  string asset = 3 [
-    (google.api.resource_reference).type = "library.googleapis.com/Asset",
-    (google.api.field_behavior) = REQUIRED
-  ];
+    string asset = 3 [
+      (google.api.resource_reference).type = "library.googleapis.com/Asset",
+      (google.api.field_behavior) = REQUIRED];
 
-  string parent_asset = 4 [
-    (google.api.resource_reference).child_type = "library.googleapis.com/Asset",
-    (google.api.field_behavior) = REQUIRED
-  ];
+    string parent_asset = 4 [
+      (google.api.resource_reference).child_type = "library.googleapis.com/Asset",
+      (google.api.field_behavior) = REQUIRED];
 
-  repeated string assets = 5 [
-    (google.api.resource_reference).type = "library.googleapis.com/Asset",
-    (google.api.field_behavior) = REQUIRED
-  ];
-}
+    repeated string assets = 5 [
+      (google.api.resource_reference).type = "library.googleapis.com/Asset",
+      (google.api.field_behavior) = REQUIRED];
+ }
 
 message AddCommentsRequest {
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 
-  repeated Comment comments = 2 [(google.api.field_behavior) = REQUIRED];
+  repeated Comment comments = 2 [
+    (google.api.field_behavior) = REQUIRED];
 }
 
 message Comment {
@@ -1020,14 +940,11 @@ message GetBookFromArchiveRequest {
   // The name of the book to retrieve.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/ArchivedBook"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/ArchivedBook"];
 
   string parent = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).child_type =
-        "locations.googleapis.com/Location"
-  ];
+    (google.api.resource_reference).child_type = "locations.googleapis.com/Location"];
 }
 
 // Request message for LibraryService.GetBookFromAnywhere.
@@ -1035,26 +952,21 @@ message GetBookFromAnywhereRequest {
   // The name of the book to retrieve.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 
   // An alternate book name, used to test restricting flattened field to a
   // single resource name type in a oneof.
   string alt_book_name = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 
   string place = 3 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "locations.googleapis.com/Location"
-  ];
+    (google.api.resource_reference).type = "locations.googleapis.com/Location"];
 
   string folder = 4 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type =
-        "cloudresourcemanager.googleapis.com/Folder"
-  ];
+    (google.api.resource_reference).type = "cloudresourcemanager.googleapis.com/Folder"];
 }
 
 // Request message for LibraryService.GetBookFromAbsolutelyAnywhere.
@@ -1062,8 +974,7 @@ message GetBookFromAbsolutelyAnywhereRequest {
   // The name of the book to retrieve.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 
   // An alternate book name, used to test proper processing of placeholders
   // within additional bindings.
@@ -1075,14 +986,15 @@ message UpdateBookIndexRequest {
   // The name of the book to update.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 
   // The name of the index for the book
-  string index_name = 2 [(google.api.field_behavior) = REQUIRED];
+  string index_name = 2 [
+    (google.api.field_behavior) = REQUIRED];
 
   // The index to update the book with
-  map index_map = 3 [(google.api.field_behavior) = REQUIRED];
+  map index_map = 3 [
+    (google.api.field_behavior) = REQUIRED];
 }
 
 message DiscussBookRequest {
@@ -1091,8 +1003,7 @@ message DiscussBookRequest {
   // message will be reused.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
 
   // The new comment.
   Comment comment = 2;
@@ -1104,20 +1015,18 @@ message DiscussBookRequest {
 message FindRelatedBooksRequest {
   repeated string names = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
   repeated string shelves = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Shelf"
-  ];
+    (google.api.resource_reference).type = "library.googleapis.com/Shelf"];
   int32 page_size = 4;
   string page_token = 5;
 }
 
 // Test repeated field with resource name format in page streaming response
 message FindRelatedBooksResponse {
-  repeated string names = 1
-      [(google.api.resource_reference).type = "library.googleapis.com/Book"];
+  repeated string names = 1 [
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
   string next_page_token = 2;
 }
 
@@ -1139,7 +1048,8 @@ message TestOptionalRequiredFlatteningParamsRequest {
     ONE = 1;
   }
 
-  message InnerMessage {}
+  message InnerMessage {
+  }
 
   int32 required_singular_int32 = 1 [(google.api.field_behavior) = REQUIRED];
   int64 required_singular_int64 = 2 [(google.api.field_behavior) = REQUIRED];
@@ -1149,123 +1059,69 @@ message TestOptionalRequiredFlatteningParamsRequest {
   InnerEnum required_singular_enum = 6 [(google.api.field_behavior) = REQUIRED];
   string required_singular_string = 7 [(google.api.field_behavior) = REQUIRED];
   bytes required_singular_bytes = 8 [(google.api.field_behavior) = REQUIRED];
-  InnerMessage required_singular_message = 9
-      [(google.api.field_behavior) = REQUIRED];
-  string required_singular_resource_name = 10 [
-    (google.api.field_behavior) = REQUIRED,
+  InnerMessage required_singular_message = 9 [(google.api.field_behavior) = REQUIRED];
+  string required_singular_resource_name = 10 [(google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference).type = "library.googleapis.com/Book"
   ];
-  string required_singular_resource_name_oneof = 11 [
-    (google.api.field_behavior) = REQUIRED,
+  string required_singular_resource_name_oneof = 11 [(google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference).type = "library.googleapis.com/Book"
   ];
-  string required_singular_resource_name_common = 14
-      [(google.api.field_behavior) = REQUIRED];
-  fixed32 required_singular_fixed32 = 12
-      [(google.api.field_behavior) = REQUIRED];
-  fixed64 required_singular_fixed64 = 13
-      [(google.api.field_behavior) = REQUIRED];
-
-  repeated int32 required_repeated_int32 = 21
-      [(google.api.field_behavior) = REQUIRED];
-  repeated int64 required_repeated_int64 = 22
-      [(google.api.field_behavior) = REQUIRED];
-  repeated float required_repeated_float = 23
-      [(google.api.field_behavior) = REQUIRED];
-  repeated double required_repeated_double = 24
-      [(google.api.field_behavior) = REQUIRED];
-  repeated bool required_repeated_bool = 25
-      [(google.api.field_behavior) = REQUIRED];
-  repeated InnerEnum required_repeated_enum = 26
-      [(google.api.field_behavior) = REQUIRED];
-  repeated string required_repeated_string = 27
-      [(google.api.field_behavior) = REQUIRED];
-  repeated bytes required_repeated_bytes = 28
-      [(google.api.field_behavior) = REQUIRED];
-  repeated InnerMessage required_repeated_message = 29
-      [(google.api.field_behavior) = REQUIRED];
-  repeated string required_repeated_resource_name = 30 [
-    (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
-  repeated string required_repeated_resource_name_oneof = 31 [
-    (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference).type = "library.googleapis.com/Book"
-  ];
-  repeated string required_repeated_resource_name_common = 34
-      [(google.api.field_behavior) = REQUIRED];
-  repeated fixed32 required_repeated_fixed32 = 32
-      [(google.api.field_behavior) = REQUIRED];
-  repeated fixed64 required_repeated_fixed64 = 33
-      [(google.api.field_behavior) = REQUIRED];
+  string required_singular_resource_name_common = 14 [(google.api.field_behavior) = REQUIRED];
+  fixed32 required_singular_fixed32 = 12 [(google.api.field_behavior) = REQUIRED];
+  fixed64 required_singular_fixed64 = 13 [(google.api.field_behavior) = REQUIRED];
+
+  repeated int32 required_repeated_int32 = 21 [(google.api.field_behavior) = REQUIRED];
+  repeated int64 required_repeated_int64 = 22 [(google.api.field_behavior) = REQUIRED];
+  repeated float required_repeated_float = 23 [(google.api.field_behavior) = REQUIRED];
+  repeated double required_repeated_double = 24 [(google.api.field_behavior) = REQUIRED];
+  repeated bool required_repeated_bool = 25 [(google.api.field_behavior) = REQUIRED];
+  repeated InnerEnum required_repeated_enum = 26 [(google.api.field_behavior) = REQUIRED];
+  repeated string required_repeated_string = 27 [(google.api.field_behavior) = REQUIRED];
+  repeated bytes required_repeated_bytes = 28 [(google.api.field_behavior) = REQUIRED];
+  repeated InnerMessage required_repeated_message = 29 [(google.api.field_behavior) = REQUIRED];
+  repeated string required_repeated_resource_name = 30 [(google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+  repeated string required_repeated_resource_name_oneof = 31 [(google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference).type = "library.googleapis.com/Book"];
+  repeated string required_repeated_resource_name_common = 34 [(google.api.field_behavior) = REQUIRED];
+  repeated fixed32 required_repeated_fixed32 = 32 [(google.api.field_behavior) = REQUIRED];
+  repeated fixed64 required_repeated_fixed64 = 33 [(google.api.field_behavior) = REQUIRED];
 
   map required_map = 41 [(google.api.field_behavior) = REQUIRED];
 
-  google.protobuf.Any required_any_value = 150
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Struct required_struct_value = 151
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Value required_value_value = 152
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.ListValue required_list_value_value = 153
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Timestamp required_time_value = 154
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Duration required_duration_value = 155
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.FieldMask required_field_mask_value = 156
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Int32Value required_int32_value = 157
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.UInt32Value required_uint32_value = 158
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.Int64Value required_int64_value = 159
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.UInt64Value required_uint64_value = 160
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.FloatValue required_float_value = 161
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.DoubleValue required_double_value = 162
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.StringValue required_string_value = 163
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.BoolValue required_bool_value = 164
-      [(google.api.field_behavior) = REQUIRED];
-  google.protobuf.BytesValue required_bytes_value = 165
-      [(google.api.field_behavior) = REQUIRED];
-
-  repeated google.protobuf.Any required_repeated_any_value = 170
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Struct required_repeated_struct_value = 171
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Value required_repeated_value_value = 172
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.ListValue required_repeated_list_value_value = 173
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Timestamp required_repeated_time_value = 174
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Duration required_repeated_duration_value = 175
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.FieldMask required_repeated_field_mask_value = 176
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Int32Value required_repeated_int32_value = 177
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.UInt32Value required_repeated_uint32_value = 178
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.Int64Value required_repeated_int64_value = 179
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.UInt64Value required_repeated_uint64_value = 180
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.FloatValue required_repeated_float_value = 181
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.DoubleValue required_repeated_double_value = 182
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.StringValue required_repeated_string_value = 183
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.BoolValue required_repeated_bool_value = 184
-      [(google.api.field_behavior) = REQUIRED];
-  repeated google.protobuf.BytesValue required_repeated_bytes_value = 185
-      [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Any required_any_value = 150 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Struct required_struct_value = 151 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Value required_value_value = 152 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.ListValue required_list_value_value = 153 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Timestamp required_time_value = 154 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Duration required_duration_value = 155 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.FieldMask required_field_mask_value = 156 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Int32Value required_int32_value = 157 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.UInt32Value required_uint32_value = 158 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Int64Value required_int64_value = 159 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.UInt64Value required_uint64_value = 160 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.FloatValue required_float_value = 161 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.DoubleValue required_double_value = 162 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.StringValue required_string_value = 163 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.BoolValue required_bool_value = 164 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.BytesValue required_bytes_value = 165 [(google.api.field_behavior) = REQUIRED];
+
+  repeated google.protobuf.Any required_repeated_any_value = 170 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Struct required_repeated_struct_value = 171 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Value required_repeated_value_value = 172 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.ListValue required_repeated_list_value_value = 173 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Timestamp required_repeated_time_value = 174 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Duration required_repeated_duration_value = 175 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.FieldMask required_repeated_field_mask_value = 176 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Int32Value required_repeated_int32_value = 177 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.UInt32Value required_repeated_uint32_value = 178 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.Int64Value required_repeated_int64_value = 179 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.UInt64Value required_repeated_uint64_value = 180 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.FloatValue required_repeated_float_value = 181 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.DoubleValue required_repeated_double_value = 182 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.StringValue required_repeated_string_value = 183 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.BoolValue required_repeated_bool_value = 184 [(google.api.field_behavior) = REQUIRED];
+  repeated google.protobuf.BytesValue required_repeated_bytes_value = 185 [(google.api.field_behavior) = REQUIRED];
 
   int32 optional_singular_int32 = 51;
   int64 optional_singular_int64 = 52;
@@ -1276,8 +1132,9 @@ message TestOptionalRequiredFlatteningParamsRequest {
   string optional_singular_string = 57;
   bytes optional_singular_bytes = 58;
   InnerMessage optional_singular_message = 59;
-  string optional_singular_resource_name = 60
-      [(google.api.resource_reference).type = "library.googleapis.com/Book"];
+  string optional_singular_resource_name = 60 [
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
   string optional_singular_resource_name_oneof = 61 [
     (google.api.resource_reference).type = "library.googleapis.com/Book"
     // Test that we can reference Resource Name One Of by its name.
@@ -1295,10 +1152,12 @@ message TestOptionalRequiredFlatteningParamsRequest {
   repeated string optional_repeated_string = 77;
   repeated bytes optional_repeated_bytes = 78;
   repeated InnerMessage optional_repeated_message = 79;
-  repeated string optional_repeated_resource_name = 80
-      [(google.api.resource_reference).type = "library.googleapis.com/Book"];
-  repeated string optional_repeated_resource_name_oneof = 81
-      [(google.api.resource_reference).type = "library.googleapis.com/Book"];
+  repeated string optional_repeated_resource_name = 80 [
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
+  repeated string optional_repeated_resource_name_oneof = 81 [
+    (google.api.resource_reference).type = "library.googleapis.com/Book"
+  ];
   repeated string optional_repeated_resource_name_common = 84;
   repeated fixed32 optional_repeated_fixed32 = 82;
   repeated fixed64 optional_repeated_fixed64 = 83;
@@ -1340,20 +1199,26 @@ message TestOptionalRequiredFlatteningParamsRequest {
   repeated google.protobuf.BytesValue repeated_bytes_value = 135;
 }
 
-message TestOptionalRequiredFlatteningParamsResponse {}
+message TestOptionalRequiredFlatteningParamsResponse {
+}
 
 message MoveBooksRequest {
-  string source = 1 [(google.api.resource_reference).child_type =
-                         "library.googleapis.com/Book"];
 
-  string destination = 2 [(google.api.resource_reference).child_type =
-                              "library.googleapis.com/Book"];
+  string source = 1 [
+    (google.api.resource_reference).child_type = "library.googleapis.com/Book"
+  ];
+
+  string destination = 2 [
+    (google.api.resource_reference).child_type = "library.googleapis.com/Book"
+  ];
 
-  repeated string publishers = 3 [(google.api.resource_reference).type =
-                                      "library.googleapis.com/Publisher"];
+  repeated string publishers = 3 [
+    (google.api.resource_reference).type = "library.googleapis.com/Publisher"
+  ];
 
-  string project = 4 [(google.api.resource_reference).type =
-                          "cloudresourcemanager.googleapis.com/Project"];
+  string project = 4 [
+    (google.api.resource_reference).type = "cloudresourcemanager.googleapis.com/Project"
+  ];
 }
 
 message MoveBooksResponse {
@@ -1361,11 +1226,14 @@ message MoveBooksResponse {
 }
 
 message ArchiveBooksRequest {
-  string source = 1 [(google.api.resource_reference).child_type =
-                         "library.googleapis.com/Book"];
 
-  string archive = 2
-      [(google.api.resource_reference).type = "library.googleapis.com/Archive"];
+  string source = 1 [
+    (google.api.resource_reference).child_type = "library.googleapis.com/Book"
+  ];
+
+  string archive = 2 [
+    (google.api.resource_reference).type = "library.googleapis.com/Archive"
+  ];
 }
 
 message ArchiveBooksResponse {