From 0a71cbf7092279c50f9f5114b79d8c674cdef997 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Mon, 22 Apr 2024 16:08:51 -0400 Subject: [PATCH] deps: update gapic-showcase to v0.33.0 (#2653) update gapic-showcase so that we can pickup changes in https://github.com/googleapis/gapic-showcase/pull/1484 Steps: 1) Updated the gapic-showcase version in `gapic-showcase/pom.xml` to 0.33.0 2) Ran `mvn compile -P update` --- WORKSPACE | 11 - showcase/gapic-showcase/pom.xml | 2 +- .../google/showcase/v1beta1/EchoClient.java | 5 + .../google/showcase/v1beta1/package-info.java | 1 + .../showcase/v1beta1/stub/GrpcEchoStub.java | 3 + .../v1beta1/stub/HttpJsonEchoStub.java | 3 + .../showcase/v1beta1/EchoOuterClass.java | 204 +++++------ .../google/showcase/v1beta1/EchoRequest.java | 210 ++++++++++- .../v1beta1/EchoRequestOrBuilder.java | 33 +- .../google/showcase/v1beta1/EchoResponse.java | 328 ++++++++++++++++++ .../v1beta1/EchoResponseOrBuilder.java | 40 +++ .../schema/google/showcase/v1beta1/echo.proto | 15 +- 12 files changed, 733 insertions(+), 122 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index b0704997f8..4612984c09 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -106,17 +106,6 @@ http_archive( urls = ["https://github.com/googleapis/disco-to-proto3-converter/archive/%s.zip" % _disco_to_proto3_converter_commit], ) -# Showcase -_showcase_version = "0.28.2" - -http_archive( - name = "com_google_gapic_showcase", - strip_prefix = "gapic-showcase-%s" % _showcase_version, - urls = [ - "https://github.com/googleapis/gapic-showcase/archive/refs/tags/v%s.zip" % _showcase_version, - ], -) - http_archive( name = "rules_pkg", sha256 = "8a298e832762eda1830597d64fe7db58178aa84cd5926d76d5b744d6558941c2", diff --git a/showcase/gapic-showcase/pom.xml b/showcase/gapic-showcase/pom.xml index d049d1723d..5bdc31a945 100644 --- a/showcase/gapic-showcase/pom.xml +++ b/showcase/gapic-showcase/pom.xml @@ -19,7 +19,7 @@ - 0.30.0 + 0.33.0 diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java index 24749d8a0b..5cd400c2aa 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java @@ -75,6 +75,7 @@ * .setHeader("header-1221270899") * .setOtherHeader("otherHeader-2026585667") * .setRequestId("requestId693933066") + * .setOtherRequestId("otherRequestId1248995034") * .build(); * EchoResponse response = echoClient.echo(request); * } @@ -440,6 +441,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * .setHeader("header-1221270899") * .setOtherHeader("otherHeader-2026585667") * .setRequestId("requestId693933066") + * .setOtherRequestId("otherRequestId1248995034") * .build(); * EchoResponse response = echoClient.echo(request); * } @@ -471,6 +473,7 @@ public final EchoResponse echo(EchoRequest request) { * .setHeader("header-1221270899") * .setOtherHeader("otherHeader-2026585667") * .setRequestId("requestId693933066") + * .setOtherRequestId("otherRequestId1248995034") * .build(); * ApiFuture future = echoClient.echoCallable().futureCall(request); * // Do something. @@ -620,6 +623,7 @@ public final ServerStreamingCallable expandCallable * .setHeader("header-1221270899") * .setOtherHeader("otherHeader-2026585667") * .setRequestId("requestId693933066") + * .setOtherRequestId("otherRequestId1248995034") * .build(); * requestObserver.onNext(request); * } @@ -650,6 +654,7 @@ public final ClientStreamingCallable collectCallable( * .setHeader("header-1221270899") * .setOtherHeader("otherHeader-2026585667") * .setRequestId("requestId693933066") + * .setOtherRequestId("otherRequestId1248995034") * .build(); * bidiStream.send(request); * for (EchoResponse response : bidiStream) { diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/package-info.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/package-info.java index ceb4779c4c..8b4ef84373 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/package-info.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/package-info.java @@ -76,6 +76,7 @@ * .setHeader("header-1221270899") * .setOtherHeader("otherHeader-2026585667") * .setRequestId("requestId693933066") + * .setOtherRequestId("otherRequestId1248995034") * .build(); * EchoResponse response = echoClient.echo(request); * } diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java index e7891eaa8b..0b7ac11084 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java @@ -313,6 +313,9 @@ protected GrpcEchoStub( if (Strings.isNullOrEmpty(request.getRequestId())) { requestBuilder.setRequestId(UUID.randomUUID().toString()); } + if (Strings.isNullOrEmpty(request.getOtherRequestId())) { + requestBuilder.setOtherRequestId(UUID.randomUUID().toString()); + } return requestBuilder.build(); }) .build(); diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/HttpJsonEchoStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/HttpJsonEchoStub.java index b41e0e6073..b2ffcfaf19 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/HttpJsonEchoStub.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/HttpJsonEchoStub.java @@ -668,6 +668,9 @@ protected HttpJsonEchoStub( if (Strings.isNullOrEmpty(request.getRequestId())) { requestBuilder.setRequestId(UUID.randomUUID().toString()); } + if (Strings.isNullOrEmpty(request.getOtherRequestId())) { + requestBuilder.setOtherRequestId(UUID.randomUUID().toString()); + } return requestBuilder.build(); }) .build(); diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoOuterClass.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoOuterClass.java index f6f2874138..d215dcb29a 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoOuterClass.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoOuterClass.java @@ -133,107 +133,110 @@ public static void registerAllExtensions( "ns.proto\032\031google/protobuf/any.proto\032\036goo" + "gle/protobuf/duration.proto\032\037google/prot" + "obuf/timestamp.proto\032\027google/rpc/status." + - "proto\"\312\001\n\013EchoRequest\022\021\n\007content\030\001 \001(\tH\000" + + "proto\"\210\002\n\013EchoRequest\022\021\n\007content\030\001 \001(\tH\000" + "\022#\n\005error\030\002 \001(\0132\022.google.rpc.StatusH\000\0223\n" + "\010severity\030\003 \001(\0162!.google.showcase.v1beta" + "1.Severity\022\016\n\006header\030\004 \001(\t\022\024\n\014other_head" + - "er\030\005 \001(\t\022\034\n\nrequest_id\030\007 \001(\tB\010\342\214\317\327\010\002\010\001B\n" + - "\n\010response\"T\n\014EchoResponse\022\017\n\007content\030\001 " + - "\001(\t\0223\n\010severity\030\002 \001(\0162!.google.showcase." + - "v1beta1.Severity\"P\n\027EchoErrorDetailsRequ" + - "est\022\032\n\022single_detail_text\030\001 \001(\t\022\031\n\021multi" + - "_detail_text\030\002 \003(\t\"\362\002\n\030EchoErrorDetailsR" + - "esponse\022U\n\rsingle_detail\030\001 \001(\0132>.google." + - "showcase.v1beta1.EchoErrorDetailsRespons" + - "e.SingleDetail\022[\n\020multiple_details\030\002 \001(\013" + - "2A.google.showcase.v1beta1.EchoErrorDeta" + - "ilsResponse.MultipleDetails\032M\n\014SingleDet" + - "ail\022=\n\005error\030\001 \001(\0132..google.showcase.v1b" + - "eta1.ErrorWithSingleDetail\032S\n\017MultipleDe" + - "tails\022@\n\005error\030\001 \001(\01321.google.showcase.v" + - "1beta1.ErrorWithMultipleDetails\">\n\025Error" + - "WithSingleDetail\022%\n\007details\030\001 \001(\0132\024.goog" + - "le.protobuf.Any\"A\n\030ErrorWithMultipleDeta" + - "ils\022%\n\007details\030\001 \003(\0132\024.google.protobuf.A" + - "ny\"x\n\rExpandRequest\022\017\n\007content\030\001 \001(\t\022!\n\005" + - "error\030\002 \001(\0132\022.google.rpc.Status\0223\n\020strea" + - "m_wait_time\030\003 \001(\0132\031.google.protobuf.Dura" + - "tion\"Q\n\022PagedExpandRequest\022\024\n\007content\030\001 " + - "\001(\tB\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" + - "n\030\003 \001(\t\"Y\n\030PagedExpandLegacyRequest\022\024\n\007c" + - "ontent\030\001 \001(\tB\003\340A\002\022\023\n\013max_results\030\002 \001(\005\022\022" + - "\n\npage_token\030\003 \001(\t\"h\n\023PagedExpandRespons" + - "e\0228\n\tresponses\030\001 \003(\0132%.google.showcase.v" + - "1beta1.EchoResponse\022\027\n\017next_page_token\030\002" + - " \001(\t\"(\n\027PagedExpandResponseList\022\r\n\005words" + - "\030\001 \003(\t\"\203\002\n\037PagedExpandLegacyMappedRespon" + - "se\022`\n\014alphabetized\030\001 \003(\0132J.google.showca" + - "se.v1beta1.PagedExpandLegacyMappedRespon" + - "se.AlphabetizedEntry\022\027\n\017next_page_token\030" + - "\002 \001(\t\032e\n\021AlphabetizedEntry\022\013\n\003key\030\001 \001(\t\022" + - "?\n\005value\030\002 \001(\01320.google.showcase.v1beta1" + - ".PagedExpandResponseList:\0028\001\"\331\001\n\013WaitReq" + - "uest\022.\n\010end_time\030\001 \001(\0132\032.google.protobuf" + - ".TimestampH\000\022(\n\003ttl\030\004 \001(\0132\031.google.proto" + - "buf.DurationH\000\022#\n\005error\030\002 \001(\0132\022.google.r" + - "pc.StatusH\001\0228\n\007success\030\003 \001(\0132%.google.sh" + - "owcase.v1beta1.WaitResponseH\001B\005\n\003endB\n\n\010" + - "response\"\037\n\014WaitResponse\022\017\n\007content\030\001 \001(" + - "\t\"<\n\014WaitMetadata\022,\n\010end_time\030\001 \001(\0132\032.go" + - "ogle.protobuf.Timestamp\"\255\001\n\014BlockRequest" + - "\0221\n\016response_delay\030\001 \001(\0132\031.google.protob" + - "uf.Duration\022#\n\005error\030\002 \001(\0132\022.google.rpc." + - "StatusH\000\0229\n\007success\030\003 \001(\0132&.google.showc" + - "ase.v1beta1.BlockResponseH\000B\n\n\010response\"" + - " \n\rBlockResponse\022\017\n\007content\030\001 \001(\t*D\n\010Sev" + - "erity\022\017\n\013UNNECESSARY\020\000\022\r\n\tNECESSARY\020\001\022\n\n" + - "\006URGENT\020\002\022\014\n\010CRITICAL\020\0032\241\r\n\004Echo\022\224\003\n\004Ech" + - "o\022$.google.showcase.v1beta1.EchoRequest\032" + - "%.google.showcase.v1beta1.EchoResponse\"\276" + - "\002\202\323\344\223\002\027\"\022/v1beta1/echo:echo:\001*\212\323\344\223\002\232\002\022\010\n" + - "\006header\022\031\n\006header\022\017{routing_id=**}\022+\n\006he" + - "ader\022!{table_name=regions/*/zones/*/**}\022" + - "\"\n\006header\022\030{super_id=projects/*}/**\0220\n\006h" + - "eader\022&{table_name=projects/*/instances/" + - "*/**}\0221\n\006header\022\'projects/*/{instance_id" + - "=instances/*}/**\022\030\n\014other_header\022\010{baz=*" + - "*}\022#\n\014other_header\022\023{qux=projects/*}/**\022" + - "\237\001\n\020EchoErrorDetails\0220.google.showcase.v" + - "1beta1.EchoErrorDetailsRequest\0321.google." + - "showcase.v1beta1.EchoErrorDetailsRespons" + - "e\"&\202\323\344\223\002 \"\033/v1beta1/echo:error-details:\001" + - "*\022\212\001\n\006Expand\022&.google.showcase.v1beta1.E" + - "xpandRequest\032%.google.showcase.v1beta1.E" + - "choResponse\"/\332A\rcontent,error\202\323\344\223\002\031\"\024/v1" + - "beta1/echo:expand:\001*0\001\022z\n\007Collect\022$.goog" + - "le.showcase.v1beta1.EchoRequest\032%.google" + - ".showcase.v1beta1.EchoResponse\" \202\323\344\223\002\032\"\025" + - "/v1beta1/echo:collect:\001*(\001\022W\n\004Chat\022$.goo" + - "gle.showcase.v1beta1.EchoRequest\032%.googl" + - "e.showcase.v1beta1.EchoResponse(\0010\001\022\216\001\n\013" + - "PagedExpand\022+.google.showcase.v1beta1.Pa" + - "gedExpandRequest\032,.google.showcase.v1bet" + - "a1.PagedExpandResponse\"$\202\323\344\223\002\036\"\031/v1beta1" + - "/echo:pagedExpand:\001*\022\240\001\n\021PagedExpandLega" + - "cy\0221.google.showcase.v1beta1.PagedExpand" + - "LegacyRequest\032,.google.showcase.v1beta1." + - "PagedExpandResponse\"*\202\323\344\223\002$\"\037/v1beta1/ec" + - "ho:pagedExpandLegacy:\001*\022\262\001\n\027PagedExpandL" + - "egacyMapped\022+.google.showcase.v1beta1.Pa" + - "gedExpandRequest\0328.google.showcase.v1bet" + - "a1.PagedExpandLegacyMappedResponse\"0\202\323\344\223" + - "\002*\"%/v1beta1/echo:pagedExpandLegacyMappe" + - "d:\001*\022\211\001\n\004Wait\022$.google.showcase.v1beta1." + - "WaitRequest\032\035.google.longrunning.Operati" + - "on\"<\312A\034\n\014WaitResponse\022\014WaitMetadata\202\323\344\223\002" + - "\027\"\022/v1beta1/echo:wait:\001*\022v\n\005Block\022%.goog" + - "le.showcase.v1beta1.BlockRequest\032&.googl" + - "e.showcase.v1beta1.BlockResponse\"\036\202\323\344\223\002\030" + - "\"\023/v1beta1/echo:block:\001*\032\021\312A\016localhost:7" + - "469Bq\n\033com.google.showcase.v1beta1P\001Z4gi" + - "thub.com/googleapis/gapic-showcase/serve" + - "r/genproto\352\002\031Google::Showcase::V1beta1b\006" + - "proto3" + "er\030\005 \001(\t\022\034\n\nrequest_id\030\007 \001(\tB\010\342\214\317\327\010\002\010\001\022\'" + + "\n\020other_request_id\030\010 \001(\tB\010\342\214\317\327\010\002\010\001H\001\210\001\001B" + + "\n\n\010responseB\023\n\021_other_request_id\"\202\001\n\014Ech" + + "oResponse\022\017\n\007content\030\001 \001(\t\0223\n\010severity\030\002" + + " \001(\0162!.google.showcase.v1beta1.Severity\022" + + "\022\n\nrequest_id\030\003 \001(\t\022\030\n\020other_request_id\030" + + "\004 \001(\t\"P\n\027EchoErrorDetailsRequest\022\032\n\022sing" + + "le_detail_text\030\001 \001(\t\022\031\n\021multi_detail_tex" + + "t\030\002 \003(\t\"\362\002\n\030EchoErrorDetailsResponse\022U\n\r" + + "single_detail\030\001 \001(\0132>.google.showcase.v1" + + "beta1.EchoErrorDetailsResponse.SingleDet" + + "ail\022[\n\020multiple_details\030\002 \001(\0132A.google.s" + + "howcase.v1beta1.EchoErrorDetailsResponse" + + ".MultipleDetails\032M\n\014SingleDetail\022=\n\005erro" + + "r\030\001 \001(\0132..google.showcase.v1beta1.ErrorW" + + "ithSingleDetail\032S\n\017MultipleDetails\022@\n\005er" + + "ror\030\001 \001(\01321.google.showcase.v1beta1.Erro" + + "rWithMultipleDetails\">\n\025ErrorWithSingleD" + + "etail\022%\n\007details\030\001 \001(\0132\024.google.protobuf" + + ".Any\"A\n\030ErrorWithMultipleDetails\022%\n\007deta" + + "ils\030\001 \003(\0132\024.google.protobuf.Any\"x\n\rExpan" + + "dRequest\022\017\n\007content\030\001 \001(\t\022!\n\005error\030\002 \001(\013" + + "2\022.google.rpc.Status\0223\n\020stream_wait_time" + + "\030\003 \001(\0132\031.google.protobuf.Duration\"Q\n\022Pag" + + "edExpandRequest\022\024\n\007content\030\001 \001(\tB\003\340A\002\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"Y\n\030" + + "PagedExpandLegacyRequest\022\024\n\007content\030\001 \001(" + + "\tB\003\340A\002\022\023\n\013max_results\030\002 \001(\005\022\022\n\npage_toke" + + "n\030\003 \001(\t\"h\n\023PagedExpandResponse\0228\n\trespon" + + "ses\030\001 \003(\0132%.google.showcase.v1beta1.Echo" + + "Response\022\027\n\017next_page_token\030\002 \001(\t\"(\n\027Pag" + + "edExpandResponseList\022\r\n\005words\030\001 \003(\t\"\203\002\n\037" + + "PagedExpandLegacyMappedResponse\022`\n\014alpha" + + "betized\030\001 \003(\0132J.google.showcase.v1beta1." + + "PagedExpandLegacyMappedResponse.Alphabet" + + "izedEntry\022\027\n\017next_page_token\030\002 \001(\t\032e\n\021Al" + + "phabetizedEntry\022\013\n\003key\030\001 \001(\t\022?\n\005value\030\002 " + + "\001(\01320.google.showcase.v1beta1.PagedExpan" + + "dResponseList:\0028\001\"\331\001\n\013WaitRequest\022.\n\010end" + + "_time\030\001 \001(\0132\032.google.protobuf.TimestampH" + + "\000\022(\n\003ttl\030\004 \001(\0132\031.google.protobuf.Duratio" + + "nH\000\022#\n\005error\030\002 \001(\0132\022.google.rpc.StatusH\001" + + "\0228\n\007success\030\003 \001(\0132%.google.showcase.v1be" + + "ta1.WaitResponseH\001B\005\n\003endB\n\n\010response\"\037\n" + + "\014WaitResponse\022\017\n\007content\030\001 \001(\t\"<\n\014WaitMe" + + "tadata\022,\n\010end_time\030\001 \001(\0132\032.google.protob" + + "uf.Timestamp\"\255\001\n\014BlockRequest\0221\n\016respons" + + "e_delay\030\001 \001(\0132\031.google.protobuf.Duration" + + "\022#\n\005error\030\002 \001(\0132\022.google.rpc.StatusH\000\0229\n" + + "\007success\030\003 \001(\0132&.google.showcase.v1beta1" + + ".BlockResponseH\000B\n\n\010response\" \n\rBlockRes" + + "ponse\022\017\n\007content\030\001 \001(\t*D\n\010Severity\022\017\n\013UN" + + "NECESSARY\020\000\022\r\n\tNECESSARY\020\001\022\n\n\006URGENT\020\002\022\014" + + "\n\010CRITICAL\020\0032\262\r\n\004Echo\022\224\003\n\004Echo\022$.google." + + "showcase.v1beta1.EchoRequest\032%.google.sh" + + "owcase.v1beta1.EchoResponse\"\276\002\202\323\344\223\002\027\"\022/v" + + "1beta1/echo:echo:\001*\212\323\344\223\002\232\002\022\010\n\006header\022\031\n\006" + + "header\022\017{routing_id=**}\022+\n\006header\022!{tabl" + + "e_name=regions/*/zones/*/**}\022\"\n\006header\022\030" + + "{super_id=projects/*}/**\0220\n\006header\022&{tab" + + "le_name=projects/*/instances/*/**}\0221\n\006he" + + "ader\022\'projects/*/{instance_id=instances/" + + "*}/**\022\030\n\014other_header\022\010{baz=**}\022#\n\014other" + + "_header\022\023{qux=projects/*}/**\022\237\001\n\020EchoErr" + + "orDetails\0220.google.showcase.v1beta1.Echo" + + "ErrorDetailsRequest\0321.google.showcase.v1" + + "beta1.EchoErrorDetailsResponse\"&\202\323\344\223\002 \"\033" + + "/v1beta1/echo:error-details:\001*\022\212\001\n\006Expan" + + "d\022&.google.showcase.v1beta1.ExpandReques" + + "t\032%.google.showcase.v1beta1.EchoResponse" + + "\"/\332A\rcontent,error\202\323\344\223\002\031\"\024/v1beta1/echo:" + + "expand:\001*0\001\022z\n\007Collect\022$.google.showcase" + + ".v1beta1.EchoRequest\032%.google.showcase.v" + + "1beta1.EchoResponse\" \202\323\344\223\002\032\"\025/v1beta1/ec" + + "ho:collect:\001*(\001\022W\n\004Chat\022$.google.showcas" + + "e.v1beta1.EchoRequest\032%.google.showcase." + + "v1beta1.EchoResponse(\0010\001\022\216\001\n\013PagedExpand" + + "\022+.google.showcase.v1beta1.PagedExpandRe" + + "quest\032,.google.showcase.v1beta1.PagedExp" + + "andResponse\"$\202\323\344\223\002\036\"\031/v1beta1/echo:paged" + + "Expand:\001*\022\240\001\n\021PagedExpandLegacy\0221.google" + + ".showcase.v1beta1.PagedExpandLegacyReque" + + "st\032,.google.showcase.v1beta1.PagedExpand" + + "Response\"*\202\323\344\223\002$\"\037/v1beta1/echo:pagedExp" + + "andLegacy:\001*\022\262\001\n\027PagedExpandLegacyMapped" + + "\022+.google.showcase.v1beta1.PagedExpandRe" + + "quest\0328.google.showcase.v1beta1.PagedExp" + + "andLegacyMappedResponse\"0\202\323\344\223\002*\"%/v1beta" + + "1/echo:pagedExpandLegacyMapped:\001*\022\211\001\n\004Wa" + + "it\022$.google.showcase.v1beta1.WaitRequest" + + "\032\035.google.longrunning.Operation\"<\312A\034\n\014Wa" + + "itResponse\022\014WaitMetadata\202\323\344\223\002\027\"\022/v1beta1" + + "/echo:wait:\001*\022v\n\005Block\022%.google.showcase" + + ".v1beta1.BlockRequest\032&.google.showcase." + + "v1beta1.BlockResponse\"\036\202\323\344\223\002\030\"\023/v1beta1/" + + "echo:block:\001*\032\"\312A\016localhost:7469\212\324\333\322\017\013v1" + + "_20240408Bq\n\033com.google.showcase.v1beta1" + + "P\001Z4github.com/googleapis/gapic-showcase" + + "/server/genproto\352\002\031Google::Showcase::V1b" + + "eta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -254,13 +257,13 @@ public static void registerAllExtensions( internal_static_google_showcase_v1beta1_EchoRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_showcase_v1beta1_EchoRequest_descriptor, - new java.lang.String[] { "Content", "Error", "Severity", "Header", "OtherHeader", "RequestId", "Response", }); + new java.lang.String[] { "Content", "Error", "Severity", "Header", "OtherHeader", "RequestId", "OtherRequestId", "Response", }); internal_static_google_showcase_v1beta1_EchoResponse_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_showcase_v1beta1_EchoResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_showcase_v1beta1_EchoResponse_descriptor, - new java.lang.String[] { "Content", "Severity", }); + new java.lang.String[] { "Content", "Severity", "RequestId", "OtherRequestId", }); internal_static_google_showcase_v1beta1_EchoErrorDetailsRequest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_showcase_v1beta1_EchoErrorDetailsRequest_fieldAccessorTable = new @@ -371,6 +374,7 @@ public static void registerAllExtensions( new java.lang.String[] { "Content", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.apiVersion); registry.add(com.google.api.ClientProto.defaultHost); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.FieldInfoProto.fieldInfo); diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoRequest.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoRequest.java index e5965aa907..76efd48438 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoRequest.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoRequest.java @@ -28,6 +28,7 @@ private EchoRequest() { header_ = ""; otherHeader_ = ""; requestId_ = ""; + otherRequestId_ = ""; } @java.lang.Override @@ -50,6 +51,7 @@ protected java.lang.Object newInstance( com.google.showcase.v1beta1.EchoRequest.class, com.google.showcase.v1beta1.EchoRequest.Builder.class); } + private int bitField0_; private int responseCase_ = 0; @SuppressWarnings("serial") private java.lang.Object response_; @@ -324,7 +326,7 @@ public java.lang.String getOtherHeader() { private volatile java.lang.Object requestId_ = ""; /** *
-   * Based on go/client-populate-request-id-design; subject to change
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
    * 
* * string request_id = 7 [(.google.api.field_info) = { ... } @@ -345,7 +347,7 @@ public java.lang.String getRequestId() { } /** *
-   * Based on go/client-populate-request-id-design; subject to change
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
    * 
* * string request_id = 7 [(.google.api.field_info) = { ... } @@ -366,6 +368,65 @@ public java.lang.String getRequestId() { } } + public static final int OTHER_REQUEST_ID_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object otherRequestId_ = ""; + /** + *
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
+   * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return Whether the otherRequestId field is set. + */ + @java.lang.Override + public boolean hasOtherRequestId() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
+   * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return The otherRequestId. + */ + @java.lang.Override + public java.lang.String getOtherRequestId() { + java.lang.Object ref = otherRequestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + otherRequestId_ = s; + return s; + } + } + /** + *
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
+   * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return The bytes for otherRequestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOtherRequestIdBytes() { + java.lang.Object ref = otherRequestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + otherRequestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -398,6 +459,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, requestId_); } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, otherRequestId_); + } getUnknownFields().writeTo(output); } @@ -427,6 +491,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, requestId_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, otherRequestId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -449,6 +516,11 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getOtherHeader())) return false; if (!getRequestId() .equals(other.getRequestId())) return false; + if (hasOtherRequestId() != other.hasOtherRequestId()) return false; + if (hasOtherRequestId()) { + if (!getOtherRequestId() + .equals(other.getOtherRequestId())) return false; + } if (!getResponseCase().equals(other.getResponseCase())) return false; switch (responseCase_) { case 1: @@ -481,6 +553,10 @@ public int hashCode() { hash = (53 * hash) + getOtherHeader().hashCode(); hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); + if (hasOtherRequestId()) { + hash = (37 * hash) + OTHER_REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getOtherRequestId().hashCode(); + } switch (responseCase_) { case 1: hash = (37 * hash) + CONTENT_FIELD_NUMBER; @@ -638,6 +714,7 @@ public Builder clear() { header_ = ""; otherHeader_ = ""; requestId_ = ""; + otherRequestId_ = ""; responseCase_ = 0; response_ = null; return this; @@ -686,6 +763,12 @@ private void buildPartial0(com.google.showcase.v1beta1.EchoRequest result) { if (((from_bitField0_ & 0x00000020) != 0)) { result.requestId_ = requestId_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.otherRequestId_ = otherRequestId_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.showcase.v1beta1.EchoRequest result) { @@ -759,6 +842,11 @@ public Builder mergeFrom(com.google.showcase.v1beta1.EchoRequest other) { bitField0_ |= 0x00000020; onChanged(); } + if (other.hasOtherRequestId()) { + otherRequestId_ = other.otherRequestId_; + bitField0_ |= 0x00000040; + onChanged(); + } switch (other.getResponseCase()) { case CONTENT: { responseCase_ = 1; @@ -833,6 +921,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000020; break; } // case 58 + case 66: { + otherRequestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -1420,7 +1513,7 @@ public Builder setOtherHeaderBytes( private java.lang.Object requestId_ = ""; /** *
-     * Based on go/client-populate-request-id-design; subject to change
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
      * 
* * string request_id = 7 [(.google.api.field_info) = { ... } @@ -1440,7 +1533,7 @@ public java.lang.String getRequestId() { } /** *
-     * Based on go/client-populate-request-id-design; subject to change
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
      * 
* * string request_id = 7 [(.google.api.field_info) = { ... } @@ -1461,7 +1554,7 @@ public java.lang.String getRequestId() { } /** *
-     * Based on go/client-populate-request-id-design; subject to change
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
      * 
* * string request_id = 7 [(.google.api.field_info) = { ... } @@ -1478,7 +1571,7 @@ public Builder setRequestId( } /** *
-     * Based on go/client-populate-request-id-design; subject to change
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
      * 
* * string request_id = 7 [(.google.api.field_info) = { ... } @@ -1492,7 +1585,7 @@ public Builder clearRequestId() { } /** *
-     * Based on go/client-populate-request-id-design; subject to change
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
      * 
* * string request_id = 7 [(.google.api.field_info) = { ... } @@ -1508,6 +1601,109 @@ public Builder setRequestIdBytes( onChanged(); return this; } + + private java.lang.Object otherRequestId_ = ""; + /** + *
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
+     * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return Whether the otherRequestId field is set. + */ + public boolean hasOtherRequestId() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
+     * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return The otherRequestId. + */ + public java.lang.String getOtherRequestId() { + java.lang.Object ref = otherRequestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + otherRequestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
+     * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return The bytes for otherRequestId. + */ + public com.google.protobuf.ByteString + getOtherRequestIdBytes() { + java.lang.Object ref = otherRequestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + otherRequestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
+     * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @param value The otherRequestId to set. + * @return This builder for chaining. + */ + public Builder setOtherRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + otherRequestId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
+     * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return This builder for chaining. + */ + public Builder clearOtherRequestId() { + otherRequestId_ = getDefaultInstance().getOtherRequestId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * To facilitate testing of https://google.aip.dev/client-libraries/4235
+     * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @param value The bytes for otherRequestId to set. + * @return This builder for chaining. + */ + public Builder setOtherRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + otherRequestId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoRequestOrBuilder.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoRequestOrBuilder.java index b95df17ab5..ab12471d39 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoRequestOrBuilder.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoRequestOrBuilder.java @@ -125,7 +125,7 @@ public interface EchoRequestOrBuilder extends /** *
-   * Based on go/client-populate-request-id-design; subject to change
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
    * 
* * string request_id = 7 [(.google.api.field_info) = { ... } @@ -134,7 +134,7 @@ public interface EchoRequestOrBuilder extends java.lang.String getRequestId(); /** *
-   * Based on go/client-populate-request-id-design; subject to change
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
    * 
* * string request_id = 7 [(.google.api.field_info) = { ... } @@ -143,5 +143,34 @@ public interface EchoRequestOrBuilder extends com.google.protobuf.ByteString getRequestIdBytes(); + /** + *
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
+   * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return Whether the otherRequestId field is set. + */ + boolean hasOtherRequestId(); + /** + *
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
+   * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return The otherRequestId. + */ + java.lang.String getOtherRequestId(); + /** + *
+   * To facilitate testing of https://google.aip.dev/client-libraries/4235
+   * 
+ * + * optional string other_request_id = 8 [(.google.api.field_info) = { ... } + * @return The bytes for otherRequestId. + */ + com.google.protobuf.ByteString + getOtherRequestIdBytes(); + com.google.showcase.v1beta1.EchoRequest.ResponseCase getResponseCase(); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoResponse.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoResponse.java index 5c3fb4461e..4c14bbce86 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoResponse.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoResponse.java @@ -23,6 +23,8 @@ private EchoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) private EchoResponse() { content_ = ""; severity_ = 0; + requestId_ = ""; + otherRequestId_ = ""; } @java.lang.Override @@ -118,6 +120,100 @@ public java.lang.String getContent() { return result == null ? com.google.showcase.v1beta1.Severity.UNRECOGNIZED : result; } + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * The request ID specified or autopopulated in the request.
+   * 
+ * + * string request_id = 3; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * The request ID specified or autopopulated in the request.
+   * 
+ * + * string request_id = 3; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OTHER_REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object otherRequestId_ = ""; + /** + *
+   * The other request ID specified or autopopulated in the request.
+   * 
+ * + * string other_request_id = 4; + * @return The otherRequestId. + */ + @java.lang.Override + public java.lang.String getOtherRequestId() { + java.lang.Object ref = otherRequestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + otherRequestId_ = s; + return s; + } + } + /** + *
+   * The other request ID specified or autopopulated in the request.
+   * 
+ * + * string other_request_id = 4; + * @return The bytes for otherRequestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOtherRequestIdBytes() { + java.lang.Object ref = otherRequestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + otherRequestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -138,6 +234,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (severity_ != com.google.showcase.v1beta1.Severity.UNNECESSARY.getNumber()) { output.writeEnum(2, severity_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(otherRequestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, otherRequestId_); + } getUnknownFields().writeTo(output); } @@ -154,6 +256,12 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, severity_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(otherRequestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, otherRequestId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -172,6 +280,10 @@ public boolean equals(final java.lang.Object obj) { if (!getContent() .equals(other.getContent())) return false; if (severity_ != other.severity_) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getOtherRequestId() + .equals(other.getOtherRequestId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -187,6 +299,10 @@ public int hashCode() { hash = (53 * hash) + getContent().hashCode(); hash = (37 * hash) + SEVERITY_FIELD_NUMBER; hash = (53 * hash) + severity_; + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + OTHER_REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getOtherRequestId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -324,6 +440,8 @@ public Builder clear() { bitField0_ = 0; content_ = ""; severity_ = 0; + requestId_ = ""; + otherRequestId_ = ""; return this; } @@ -363,6 +481,12 @@ private void buildPartial0(com.google.showcase.v1beta1.EchoResponse result) { if (((from_bitField0_ & 0x00000002) != 0)) { result.severity_ = severity_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.otherRequestId_ = otherRequestId_; + } } @java.lang.Override @@ -417,6 +541,16 @@ public Builder mergeFrom(com.google.showcase.v1beta1.EchoResponse other) { if (other.severity_ != 0) { setSeverityValue(other.getSeverityValue()); } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOtherRequestId().isEmpty()) { + otherRequestId_ = other.otherRequestId_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -453,6 +587,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + otherRequestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -634,6 +778,190 @@ public Builder clearSeverity() { onChanged(); return this; } + + private java.lang.Object requestId_ = ""; + /** + *
+     * The request ID specified or autopopulated in the request.
+     * 
+ * + * string request_id = 3; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The request ID specified or autopopulated in the request.
+     * 
+ * + * string request_id = 3; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The request ID specified or autopopulated in the request.
+     * 
+ * + * string request_id = 3; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The request ID specified or autopopulated in the request.
+     * 
+ * + * string request_id = 3; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The request ID specified or autopopulated in the request.
+     * 
+ * + * string request_id = 3; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object otherRequestId_ = ""; + /** + *
+     * The other request ID specified or autopopulated in the request.
+     * 
+ * + * string other_request_id = 4; + * @return The otherRequestId. + */ + public java.lang.String getOtherRequestId() { + java.lang.Object ref = otherRequestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + otherRequestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The other request ID specified or autopopulated in the request.
+     * 
+ * + * string other_request_id = 4; + * @return The bytes for otherRequestId. + */ + public com.google.protobuf.ByteString + getOtherRequestIdBytes() { + java.lang.Object ref = otherRequestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + otherRequestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The other request ID specified or autopopulated in the request.
+     * 
+ * + * string other_request_id = 4; + * @param value The otherRequestId to set. + * @return This builder for chaining. + */ + public Builder setOtherRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + otherRequestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The other request ID specified or autopopulated in the request.
+     * 
+ * + * string other_request_id = 4; + * @return This builder for chaining. + */ + public Builder clearOtherRequestId() { + otherRequestId_ = getDefaultInstance().getOtherRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The other request ID specified or autopopulated in the request.
+     * 
+ * + * string other_request_id = 4; + * @param value The bytes for otherRequestId to set. + * @return This builder for chaining. + */ + public Builder setOtherRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + otherRequestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoResponseOrBuilder.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoResponseOrBuilder.java index da43484b72..e2c2bdd395 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoResponseOrBuilder.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoResponseOrBuilder.java @@ -46,4 +46,44 @@ public interface EchoResponseOrBuilder extends * @return The severity. */ com.google.showcase.v1beta1.Severity getSeverity(); + + /** + *
+   * The request ID specified or autopopulated in the request.
+   * 
+ * + * string request_id = 3; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * The request ID specified or autopopulated in the request.
+   * 
+ * + * string request_id = 3; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); + + /** + *
+   * The other request ID specified or autopopulated in the request.
+   * 
+ * + * string other_request_id = 4; + * @return The otherRequestId. + */ + java.lang.String getOtherRequestId(); + /** + *
+   * The other request ID specified or autopopulated in the request.
+   * 
+ * + * string other_request_id = 4; + * @return The bytes for otherRequestId. + */ + com.google.protobuf.ByteString + getOtherRequestIdBytes(); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/proto/schema/google/showcase/v1beta1/echo.proto b/showcase/proto-gapic-showcase-v1beta1/src/main/proto/schema/google/showcase/v1beta1/echo.proto index 3e797adfc3..eda1861a2d 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/proto/schema/google/showcase/v1beta1/echo.proto +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/proto/schema/google/showcase/v1beta1/echo.proto @@ -43,6 +43,8 @@ service Echo { // This service is meant to only run locally on the port 7469 (keypad digits // for "show"). option (google.api.default_host) = "localhost:7469"; + // See https://github.com/aip-dev/google.aip.dev/pull/1331 + option (google.api.api_version) = "v1_20240408"; // This method simply echoes the request. This method showcases unary RPCs. rpc Echo(EchoRequest) returns (EchoResponse) { @@ -211,10 +213,15 @@ message EchoRequest { // Optional. This field can be set to test the routing annotation on the Echo method. string other_header = 5; - // Based on go/client-populate-request-id-design; subject to change + // To facilitate testing of https://google.aip.dev/client-libraries/4235 string request_id = 7 [ (google.api.field_info).format = UUID4 ]; + + // To facilitate testing of https://google.aip.dev/client-libraries/4235 + optional string other_request_id = 8 [ + (google.api.field_info).format = UUID4 + ]; } // The response message for the Echo methods. @@ -224,6 +231,12 @@ message EchoResponse { // The severity specified in the request. Severity severity = 2; + + // The request ID specified or autopopulated in the request. + string request_id = 3; + + // The other request ID specified or autopopulated in the request. + string other_request_id = 4; } // The request message used for the EchoErrorDetails method.