From c408f1d14f95f15fe741ff584554fce431146c00 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 21:18:48 +0000 Subject: [PATCH 01/11] chore: release 2.5.2-SNAPSHOT (#233) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- grpc-google-common-protos/pom.xml | 4 ++-- pom.xml | 4 ++-- proto-google-common-protos/pom.xml | 4 ++-- versions.txt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/grpc-google-common-protos/pom.xml b/grpc-google-common-protos/pom.xml index c046b94d..8aba627a 100644 --- a/grpc-google-common-protos/pom.xml +++ b/grpc-google-common-protos/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-common-protos - 2.5.1 + 2.5.2-SNAPSHOT grpc-google-common-protos GRPC library for grpc-google-common-protos com.google.api.grpc google-common-protos-parent - 2.5.1 + 2.5.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index 8c7ea57f..4253cfa8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.api.grpc google-common-protos-parent pom - 2.5.1 + 2.5.2-SNAPSHOT Google Common Protos Parent https://github.com/googleapis/java-iam @@ -88,7 +88,7 @@ com.google.api.grpc proto-google-common-protos - 2.5.1 + 2.5.2-SNAPSHOT com.google.guava diff --git a/proto-google-common-protos/pom.xml b/proto-google-common-protos/pom.xml index e0973cf1..cd85e643 100644 --- a/proto-google-common-protos/pom.xml +++ b/proto-google-common-protos/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-common-protos - 2.5.1 + 2.5.2-SNAPSHOT proto-google-common-protos PROTO library for proto-google-common-protos com.google.api.grpc google-common-protos-parent - 2.5.1 + 2.5.2-SNAPSHOT diff --git a/versions.txt b/versions.txt index 351c75d7..59eba80c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -proto-google-common-protos:2.5.1:2.5.1 +proto-google-common-protos:2.5.1:2.5.2-SNAPSHOT From 8c073d524df8f0365982cea29b6eb215e13ab6d7 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Tue, 28 Sep 2021 13:04:55 -0700 Subject: [PATCH 02/11] chore: change branch master to main (#235) --- .github/sync-repo-settings.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index efe88147..ee535a6e 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -2,7 +2,7 @@ rebaseMergeAllowed: false squashMergeAllowed: true mergeCommitAllowed: false branchProtectionRules: - - pattern: master + - pattern: main isAdminEnforced: true requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true From c42ab16e245e7aedeed714d37be31ddea6df72af Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 28 Sep 2021 13:05:24 -0700 Subject: [PATCH 03/11] chore: re-generated to pick up changes from synthtool (#234) * chore(java): rename master branch to main Source-Author: Neenu Shaji Source-Date: Mon Sep 27 10:04:11 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: 67ab4f9f4272ad13f4b809de47fd0dec05f425ad Source-Link: https://github.com/googleapis/synthtool/commit/67ab4f9f4272ad13f4b809de47fd0dec05f425ad * build: add jdk 17 to java units and dependency builds * update dependencies.sh to not pass MaxPermSize when jdk 17 is used. MaxPermSize is an unrecognized flag in jdk 17. Source-Author: BenWhitehead Source-Date: Mon Sep 27 11:34:46 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: a4be3384ccb92364795d981f2863f6986fcee620 Source-Link: https://github.com/googleapis/synthtool/commit/a4be3384ccb92364795d981f2863f6986fcee620 --- .github/blunderbuss.yml | 2 +- .github/workflows/ci.yaml | 21 +++++++++++++-------- .kokoro/dependencies.sh | 23 ++++++++++++++++++++++- synth.metadata | 4 ++-- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml index 1a23ea42..2176b054 100644 --- a/.github/blunderbuss.yml +++ b/.github/blunderbuss.yml @@ -1,5 +1,5 @@ # Configuration for the Blunderbuss GitHub app. For more info see -# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss assign_prs_by: - labels: - samples diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3becb5c0..2425d723 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ on: push: branches: - - master + - main pull_request: name: ci jobs: @@ -9,14 +9,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/build.sh @@ -29,8 +30,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.bat @@ -40,14 +42,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh @@ -58,8 +61,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh @@ -72,8 +76,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9030ba8f..9a5105d7 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -28,7 +28,28 @@ source ${scriptDir}/common.sh java -version echo $JOB_TYPE -export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" +function determineMavenOpts() { + local javaVersion=$( + # filter down to the version line, then pull out the version between quotes, + # then trim the version number down to its minimal number (removing any + # update or suffix number). + java -version 2>&1 | grep "version" \ + | sed -E 's/^.*"(.*?)".*$/\1/g' \ + | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' + ) + + case $javaVersion in + "17") + # MaxPermSize is no longer supported as of jdk 17 + echo -n "-Xmx1024m" + ;; + *) + echo -n "-Xmx1024m -XX:MaxPermSize=128m" + ;; + esac +} + +export MAVEN_OPTS=$(determineMavenOpts) # this should run maven enforcer retry_with_backoff 3 10 \ diff --git a/synth.metadata b/synth.metadata index 65bb035e..ebe587ff 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-common-protos.git", - "sha": "015cfd8b552926963aee30de019d1638133dce31" + "sha": "c408f1d14f95f15fe741ff584554fce431146c00" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0752ff727a19a467dffed335d5e59303689cf0d1" + "sha": "a4be3384ccb92364795d981f2863f6986fcee620" } } ], From b6e8683b68cd89686c775375ecddff3aa25bc4ce Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Wed, 29 Sep 2021 10:32:35 -0400 Subject: [PATCH 04/11] chore: change branch master to main in github configurations (#236) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b6a80b8d..83cbdd58 100644 --- a/README.md +++ b/README.md @@ -57,9 +57,9 @@ Apache 2.0 - See [LICENSE][license] for more information. [developer-console]: https://console.developers.google.com/ [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects [cloud-sdk]: https://cloud.google.com/sdk/ -[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting -[contributing]: https://github.com/googleapis/java-common-protos/blob/master/CONTRIBUTING.md -[code-of-conduct]: https://github.com/googleapis/java-common-protos/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct -[license]: https://github.com/googleapis/java-common-protos/blob/master/LICENSE +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-common-protos/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-common-protos/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-common-protos/blob/main/LICENSE [enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing [libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM From 92ec21ae83951a6b05da343c5f4bf3e8b9942b6d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 6 Oct 2021 03:16:18 +0200 Subject: [PATCH 05/11] deps: update dependency com.google.protobuf:protobuf-java to v3.18.1 (#238) --- proto-google-common-protos/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto-google-common-protos/build.gradle b/proto-google-common-protos/build.gradle index 19c2d6bb..a40b0546 100644 --- a/proto-google-common-protos/build.gradle +++ b/proto-google-common-protos/build.gradle @@ -18,7 +18,7 @@ repositories { } dependencies { - compile 'com.google.protobuf:protobuf-java:3.18.0' + compile 'com.google.protobuf:protobuf-java:3.18.1' } sourceSets { From e6da4bb3ba18fa39eae1fbe04c65b866097e5801 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 6 Oct 2021 03:16:29 +0200 Subject: [PATCH 06/11] deps: update dependency com.google.protobuf:protobuf-bom to v3.18.1 (#237) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4253cfa8..8775ffff 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,7 @@ UTF-8 github google-iam-parent - 3.18.0 + 3.18.1 4.13.2 1.38.1 30.1-android From 08b5c8545ed6f29a11ae4d3f061df47f40234bd1 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Thu, 7 Oct 2021 10:41:03 -0700 Subject: [PATCH 07/11] chore: update repo-metadata.json client_documentation link (#240) * chore: updating doc link * chore: fix missing comma --- .repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 75c60bf2..8764d182 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -3,7 +3,7 @@ "name_pretty": "Common Protos", "product_documentation": "n/a", "api_description": "n/a", - "client_documentation": "https://googleapis.dev/java/proto-google-common-protos/latest/index.html", + "client_documentation": "https://cloud.google.com/java/docs/reference/proto-google-common-protos/latest/history", "release_level": "ga", "transport": "grpc", "requires_billing": true, From d1136e139cd74bef717a73b3a8fc3b82055ab18e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 11 Oct 2021 08:14:09 -0700 Subject: [PATCH 08/11] feat: add API classes for routing information (#241) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4db06ecf-7313-498a-aa95-e6ea8e5262e7/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) --- .../java/com/google/api/RoutingParameter.java | 1120 ++++++++++++ .../google/api/RoutingParameterOrBuilder.java | 165 ++ .../java/com/google/api/RoutingProto.java | 102 ++ .../main/java/com/google/api/RoutingRule.java | 1588 +++++++++++++++++ .../com/google/api/RoutingRuleOrBuilder.java | 102 ++ synth.metadata | 7 +- 6 files changed, 3083 insertions(+), 1 deletion(-) create mode 100644 proto-google-common-protos/src/main/java/com/google/api/RoutingParameter.java create mode 100644 proto-google-common-protos/src/main/java/com/google/api/RoutingParameterOrBuilder.java create mode 100644 proto-google-common-protos/src/main/java/com/google/api/RoutingProto.java create mode 100644 proto-google-common-protos/src/main/java/com/google/api/RoutingRule.java create mode 100644 proto-google-common-protos/src/main/java/com/google/api/RoutingRuleOrBuilder.java diff --git a/proto-google-common-protos/src/main/java/com/google/api/RoutingParameter.java b/proto-google-common-protos/src/main/java/com/google/api/RoutingParameter.java new file mode 100644 index 00000000..664fd4be --- /dev/null +++ b/proto-google-common-protos/src/main/java/com/google/api/RoutingParameter.java @@ -0,0 +1,1120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/routing.proto + +package com.google.api; + +/** + * + * + *
+ * A projection from an input message to the GRPC or REST header.
+ * 
+ * + * Protobuf type {@code google.api.RoutingParameter} + */ +public final class RoutingParameter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.RoutingParameter) + RoutingParameterOrBuilder { + private static final long serialVersionUID = 0L; + // Use RoutingParameter.newBuilder() to construct. + private RoutingParameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RoutingParameter() { + field_ = ""; + pathTemplate_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RoutingParameter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RoutingParameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + field_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pathTemplate_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.RoutingProto.internal_static_google_api_RoutingParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.RoutingProto + .internal_static_google_api_RoutingParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.RoutingParameter.class, com.google.api.RoutingParameter.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private volatile java.lang.Object field_; + /** + * + * + *
+   * A request field to extract the header key-value pair from.
+   * 
+ * + * string field = 1; + * + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + 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(); + field_ = s; + return s; + } + } + /** + * + * + *
+   * A request field to extract the header key-value pair from.
+   * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_TEMPLATE_FIELD_NUMBER = 2; + private volatile java.lang.Object pathTemplate_; + /** + * + * + *
+   * A pattern matching the key-value field. Optional.
+   * If not specified, the whole field specified in the `field` field will be
+   * taken as value, and its name used as key. If specified, it MUST contain
+   * exactly one named segment (along with any number of unnamed segments) The
+   * pattern will be matched over the field specified in the `field` field, then
+   * if the match is successful:
+   * - the name of the single named segment will be used as a header name,
+   * - the match value of the segment will be used as a header value;
+   * if the match is NOT successful, nothing will be sent.
+   * Example:
+   *               -- This is a field in the request message
+   *              |   that the header value will be extracted from.
+   *              |
+   *              |                     -- This is the key name in the
+   *              |                    |   routing header.
+   *              V                    |
+   *     field: "table_name"           v
+   *     path_template: "projects/*/{table_location=instances/*}/tables/*"
+   *                                                ^            ^
+   *                                                |            |
+   *       In the {} brackets is the pattern that --             |
+   *       specifies what to extract from the                    |
+   *       field as a value to be sent.                          |
+   *                                                             |
+   *      The string in the field must match the whole pattern --
+   *      before brackets, inside brackets, after brackets.
+   * When looking at this specific example, we can see that:
+   * - A key-value pair with the key `table_location`
+   *   and the value matching `instances/*` should be added
+   *   to the x-goog-request-params routing header.
+   * - The value is extracted from the request message's `table_name` field
+   *   if it matches the full pattern specified:
+   *   `projects/*/instances/*/tables/*`.
+   * **NB:** If the `path_template` field is not provided, the key name is
+   * equal to the field name, and the whole field should be sent as a value.
+   * This makes the pattern for the field and the value functionally equivalent
+   * to `**`, and the configuration
+   *     {
+   *       field: "table_name"
+   *     }
+   * is a functionally equivalent shorthand to:
+   *     {
+   *       field: "table_name"
+   *       path_template: "{table_name=**}"
+   *     }
+   * See Example 1 for more details.
+   * 
+ * + * string path_template = 2; + * + * @return The pathTemplate. + */ + @java.lang.Override + public java.lang.String getPathTemplate() { + java.lang.Object ref = pathTemplate_; + 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(); + pathTemplate_ = s; + return s; + } + } + /** + * + * + *
+   * A pattern matching the key-value field. Optional.
+   * If not specified, the whole field specified in the `field` field will be
+   * taken as value, and its name used as key. If specified, it MUST contain
+   * exactly one named segment (along with any number of unnamed segments) The
+   * pattern will be matched over the field specified in the `field` field, then
+   * if the match is successful:
+   * - the name of the single named segment will be used as a header name,
+   * - the match value of the segment will be used as a header value;
+   * if the match is NOT successful, nothing will be sent.
+   * Example:
+   *               -- This is a field in the request message
+   *              |   that the header value will be extracted from.
+   *              |
+   *              |                     -- This is the key name in the
+   *              |                    |   routing header.
+   *              V                    |
+   *     field: "table_name"           v
+   *     path_template: "projects/*/{table_location=instances/*}/tables/*"
+   *                                                ^            ^
+   *                                                |            |
+   *       In the {} brackets is the pattern that --             |
+   *       specifies what to extract from the                    |
+   *       field as a value to be sent.                          |
+   *                                                             |
+   *      The string in the field must match the whole pattern --
+   *      before brackets, inside brackets, after brackets.
+   * When looking at this specific example, we can see that:
+   * - A key-value pair with the key `table_location`
+   *   and the value matching `instances/*` should be added
+   *   to the x-goog-request-params routing header.
+   * - The value is extracted from the request message's `table_name` field
+   *   if it matches the full pattern specified:
+   *   `projects/*/instances/*/tables/*`.
+   * **NB:** If the `path_template` field is not provided, the key name is
+   * equal to the field name, and the whole field should be sent as a value.
+   * This makes the pattern for the field and the value functionally equivalent
+   * to `**`, and the configuration
+   *     {
+   *       field: "table_name"
+   *     }
+   * is a functionally equivalent shorthand to:
+   *     {
+   *       field: "table_name"
+   *       path_template: "{table_name=**}"
+   *     }
+   * See Example 1 for more details.
+   * 
+ * + * string path_template = 2; + * + * @return The bytes for pathTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathTemplateBytes() { + java.lang.Object ref = pathTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pathTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getFieldBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); + } + if (!getPathTemplateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pathTemplate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFieldBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); + } + if (!getPathTemplateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pathTemplate_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.RoutingParameter)) { + return super.equals(obj); + } + com.google.api.RoutingParameter other = (com.google.api.RoutingParameter) obj; + + if (!getField().equals(other.getField())) return false; + if (!getPathTemplate().equals(other.getPathTemplate())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + hash = (37 * hash) + PATH_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getPathTemplate().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.RoutingParameter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.RoutingParameter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.RoutingParameter parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.RoutingParameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.RoutingParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.RoutingParameter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.RoutingParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.RoutingParameter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.RoutingParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.RoutingParameter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.RoutingParameter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.RoutingParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.RoutingParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A projection from an input message to the GRPC or REST header.
+   * 
+ * + * Protobuf type {@code google.api.RoutingParameter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.RoutingParameter) + com.google.api.RoutingParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.RoutingProto.internal_static_google_api_RoutingParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.RoutingProto + .internal_static_google_api_RoutingParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.RoutingParameter.class, com.google.api.RoutingParameter.Builder.class); + } + + // Construct using com.google.api.RoutingParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = ""; + + pathTemplate_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.RoutingProto.internal_static_google_api_RoutingParameter_descriptor; + } + + @java.lang.Override + public com.google.api.RoutingParameter getDefaultInstanceForType() { + return com.google.api.RoutingParameter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.RoutingParameter build() { + com.google.api.RoutingParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.RoutingParameter buildPartial() { + com.google.api.RoutingParameter result = new com.google.api.RoutingParameter(this); + result.field_ = field_; + result.pathTemplate_ = pathTemplate_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.RoutingParameter) { + return mergeFrom((com.google.api.RoutingParameter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.RoutingParameter other) { + if (other == com.google.api.RoutingParameter.getDefaultInstance()) return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + onChanged(); + } + if (!other.getPathTemplate().isEmpty()) { + pathTemplate_ = other.pathTemplate_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.RoutingParameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.RoutingParameter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object field_ = ""; + /** + * + * + *
+     * A request field to extract the header key-value pair from.
+     * 
+ * + * string field = 1; + * + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A request field to extract the header key-value pair from.
+     * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A request field to extract the header key-value pair from.
+     * 
+ * + * string field = 1; + * + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + field_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A request field to extract the header key-value pair from.
+     * 
+ * + * string field = 1; + * + * @return This builder for chaining. + */ + public Builder clearField() { + + field_ = getDefaultInstance().getField(); + onChanged(); + return this; + } + /** + * + * + *
+     * A request field to extract the header key-value pair from.
+     * 
+ * + * string field = 1; + * + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + field_ = value; + onChanged(); + return this; + } + + private java.lang.Object pathTemplate_ = ""; + /** + * + * + *
+     * A pattern matching the key-value field. Optional.
+     * If not specified, the whole field specified in the `field` field will be
+     * taken as value, and its name used as key. If specified, it MUST contain
+     * exactly one named segment (along with any number of unnamed segments) The
+     * pattern will be matched over the field specified in the `field` field, then
+     * if the match is successful:
+     * - the name of the single named segment will be used as a header name,
+     * - the match value of the segment will be used as a header value;
+     * if the match is NOT successful, nothing will be sent.
+     * Example:
+     *               -- This is a field in the request message
+     *              |   that the header value will be extracted from.
+     *              |
+     *              |                     -- This is the key name in the
+     *              |                    |   routing header.
+     *              V                    |
+     *     field: "table_name"           v
+     *     path_template: "projects/*/{table_location=instances/*}/tables/*"
+     *                                                ^            ^
+     *                                                |            |
+     *       In the {} brackets is the pattern that --             |
+     *       specifies what to extract from the                    |
+     *       field as a value to be sent.                          |
+     *                                                             |
+     *      The string in the field must match the whole pattern --
+     *      before brackets, inside brackets, after brackets.
+     * When looking at this specific example, we can see that:
+     * - A key-value pair with the key `table_location`
+     *   and the value matching `instances/*` should be added
+     *   to the x-goog-request-params routing header.
+     * - The value is extracted from the request message's `table_name` field
+     *   if it matches the full pattern specified:
+     *   `projects/*/instances/*/tables/*`.
+     * **NB:** If the `path_template` field is not provided, the key name is
+     * equal to the field name, and the whole field should be sent as a value.
+     * This makes the pattern for the field and the value functionally equivalent
+     * to `**`, and the configuration
+     *     {
+     *       field: "table_name"
+     *     }
+     * is a functionally equivalent shorthand to:
+     *     {
+     *       field: "table_name"
+     *       path_template: "{table_name=**}"
+     *     }
+     * See Example 1 for more details.
+     * 
+ * + * string path_template = 2; + * + * @return The pathTemplate. + */ + public java.lang.String getPathTemplate() { + java.lang.Object ref = pathTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pathTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A pattern matching the key-value field. Optional.
+     * If not specified, the whole field specified in the `field` field will be
+     * taken as value, and its name used as key. If specified, it MUST contain
+     * exactly one named segment (along with any number of unnamed segments) The
+     * pattern will be matched over the field specified in the `field` field, then
+     * if the match is successful:
+     * - the name of the single named segment will be used as a header name,
+     * - the match value of the segment will be used as a header value;
+     * if the match is NOT successful, nothing will be sent.
+     * Example:
+     *               -- This is a field in the request message
+     *              |   that the header value will be extracted from.
+     *              |
+     *              |                     -- This is the key name in the
+     *              |                    |   routing header.
+     *              V                    |
+     *     field: "table_name"           v
+     *     path_template: "projects/*/{table_location=instances/*}/tables/*"
+     *                                                ^            ^
+     *                                                |            |
+     *       In the {} brackets is the pattern that --             |
+     *       specifies what to extract from the                    |
+     *       field as a value to be sent.                          |
+     *                                                             |
+     *      The string in the field must match the whole pattern --
+     *      before brackets, inside brackets, after brackets.
+     * When looking at this specific example, we can see that:
+     * - A key-value pair with the key `table_location`
+     *   and the value matching `instances/*` should be added
+     *   to the x-goog-request-params routing header.
+     * - The value is extracted from the request message's `table_name` field
+     *   if it matches the full pattern specified:
+     *   `projects/*/instances/*/tables/*`.
+     * **NB:** If the `path_template` field is not provided, the key name is
+     * equal to the field name, and the whole field should be sent as a value.
+     * This makes the pattern for the field and the value functionally equivalent
+     * to `**`, and the configuration
+     *     {
+     *       field: "table_name"
+     *     }
+     * is a functionally equivalent shorthand to:
+     *     {
+     *       field: "table_name"
+     *       path_template: "{table_name=**}"
+     *     }
+     * See Example 1 for more details.
+     * 
+ * + * string path_template = 2; + * + * @return The bytes for pathTemplate. + */ + public com.google.protobuf.ByteString getPathTemplateBytes() { + java.lang.Object ref = pathTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pathTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A pattern matching the key-value field. Optional.
+     * If not specified, the whole field specified in the `field` field will be
+     * taken as value, and its name used as key. If specified, it MUST contain
+     * exactly one named segment (along with any number of unnamed segments) The
+     * pattern will be matched over the field specified in the `field` field, then
+     * if the match is successful:
+     * - the name of the single named segment will be used as a header name,
+     * - the match value of the segment will be used as a header value;
+     * if the match is NOT successful, nothing will be sent.
+     * Example:
+     *               -- This is a field in the request message
+     *              |   that the header value will be extracted from.
+     *              |
+     *              |                     -- This is the key name in the
+     *              |                    |   routing header.
+     *              V                    |
+     *     field: "table_name"           v
+     *     path_template: "projects/*/{table_location=instances/*}/tables/*"
+     *                                                ^            ^
+     *                                                |            |
+     *       In the {} brackets is the pattern that --             |
+     *       specifies what to extract from the                    |
+     *       field as a value to be sent.                          |
+     *                                                             |
+     *      The string in the field must match the whole pattern --
+     *      before brackets, inside brackets, after brackets.
+     * When looking at this specific example, we can see that:
+     * - A key-value pair with the key `table_location`
+     *   and the value matching `instances/*` should be added
+     *   to the x-goog-request-params routing header.
+     * - The value is extracted from the request message's `table_name` field
+     *   if it matches the full pattern specified:
+     *   `projects/*/instances/*/tables/*`.
+     * **NB:** If the `path_template` field is not provided, the key name is
+     * equal to the field name, and the whole field should be sent as a value.
+     * This makes the pattern for the field and the value functionally equivalent
+     * to `**`, and the configuration
+     *     {
+     *       field: "table_name"
+     *     }
+     * is a functionally equivalent shorthand to:
+     *     {
+     *       field: "table_name"
+     *       path_template: "{table_name=**}"
+     *     }
+     * See Example 1 for more details.
+     * 
+ * + * string path_template = 2; + * + * @param value The pathTemplate to set. + * @return This builder for chaining. + */ + public Builder setPathTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pathTemplate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A pattern matching the key-value field. Optional.
+     * If not specified, the whole field specified in the `field` field will be
+     * taken as value, and its name used as key. If specified, it MUST contain
+     * exactly one named segment (along with any number of unnamed segments) The
+     * pattern will be matched over the field specified in the `field` field, then
+     * if the match is successful:
+     * - the name of the single named segment will be used as a header name,
+     * - the match value of the segment will be used as a header value;
+     * if the match is NOT successful, nothing will be sent.
+     * Example:
+     *               -- This is a field in the request message
+     *              |   that the header value will be extracted from.
+     *              |
+     *              |                     -- This is the key name in the
+     *              |                    |   routing header.
+     *              V                    |
+     *     field: "table_name"           v
+     *     path_template: "projects/*/{table_location=instances/*}/tables/*"
+     *                                                ^            ^
+     *                                                |            |
+     *       In the {} brackets is the pattern that --             |
+     *       specifies what to extract from the                    |
+     *       field as a value to be sent.                          |
+     *                                                             |
+     *      The string in the field must match the whole pattern --
+     *      before brackets, inside brackets, after brackets.
+     * When looking at this specific example, we can see that:
+     * - A key-value pair with the key `table_location`
+     *   and the value matching `instances/*` should be added
+     *   to the x-goog-request-params routing header.
+     * - The value is extracted from the request message's `table_name` field
+     *   if it matches the full pattern specified:
+     *   `projects/*/instances/*/tables/*`.
+     * **NB:** If the `path_template` field is not provided, the key name is
+     * equal to the field name, and the whole field should be sent as a value.
+     * This makes the pattern for the field and the value functionally equivalent
+     * to `**`, and the configuration
+     *     {
+     *       field: "table_name"
+     *     }
+     * is a functionally equivalent shorthand to:
+     *     {
+     *       field: "table_name"
+     *       path_template: "{table_name=**}"
+     *     }
+     * See Example 1 for more details.
+     * 
+ * + * string path_template = 2; + * + * @return This builder for chaining. + */ + public Builder clearPathTemplate() { + + pathTemplate_ = getDefaultInstance().getPathTemplate(); + onChanged(); + return this; + } + /** + * + * + *
+     * A pattern matching the key-value field. Optional.
+     * If not specified, the whole field specified in the `field` field will be
+     * taken as value, and its name used as key. If specified, it MUST contain
+     * exactly one named segment (along with any number of unnamed segments) The
+     * pattern will be matched over the field specified in the `field` field, then
+     * if the match is successful:
+     * - the name of the single named segment will be used as a header name,
+     * - the match value of the segment will be used as a header value;
+     * if the match is NOT successful, nothing will be sent.
+     * Example:
+     *               -- This is a field in the request message
+     *              |   that the header value will be extracted from.
+     *              |
+     *              |                     -- This is the key name in the
+     *              |                    |   routing header.
+     *              V                    |
+     *     field: "table_name"           v
+     *     path_template: "projects/*/{table_location=instances/*}/tables/*"
+     *                                                ^            ^
+     *                                                |            |
+     *       In the {} brackets is the pattern that --             |
+     *       specifies what to extract from the                    |
+     *       field as a value to be sent.                          |
+     *                                                             |
+     *      The string in the field must match the whole pattern --
+     *      before brackets, inside brackets, after brackets.
+     * When looking at this specific example, we can see that:
+     * - A key-value pair with the key `table_location`
+     *   and the value matching `instances/*` should be added
+     *   to the x-goog-request-params routing header.
+     * - The value is extracted from the request message's `table_name` field
+     *   if it matches the full pattern specified:
+     *   `projects/*/instances/*/tables/*`.
+     * **NB:** If the `path_template` field is not provided, the key name is
+     * equal to the field name, and the whole field should be sent as a value.
+     * This makes the pattern for the field and the value functionally equivalent
+     * to `**`, and the configuration
+     *     {
+     *       field: "table_name"
+     *     }
+     * is a functionally equivalent shorthand to:
+     *     {
+     *       field: "table_name"
+     *       path_template: "{table_name=**}"
+     *     }
+     * See Example 1 for more details.
+     * 
+ * + * string path_template = 2; + * + * @param value The bytes for pathTemplate to set. + * @return This builder for chaining. + */ + public Builder setPathTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pathTemplate_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.RoutingParameter) + } + + // @@protoc_insertion_point(class_scope:google.api.RoutingParameter) + private static final com.google.api.RoutingParameter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.RoutingParameter(); + } + + public static com.google.api.RoutingParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RoutingParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RoutingParameter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.RoutingParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-common-protos/src/main/java/com/google/api/RoutingParameterOrBuilder.java b/proto-google-common-protos/src/main/java/com/google/api/RoutingParameterOrBuilder.java new file mode 100644 index 00000000..cb948dbd --- /dev/null +++ b/proto-google-common-protos/src/main/java/com/google/api/RoutingParameterOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/routing.proto + +package com.google.api; + +public interface RoutingParameterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.RoutingParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A request field to extract the header key-value pair from.
+   * 
+ * + * string field = 1; + * + * @return The field. + */ + java.lang.String getField(); + /** + * + * + *
+   * A request field to extract the header key-value pair from.
+   * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + com.google.protobuf.ByteString getFieldBytes(); + + /** + * + * + *
+   * A pattern matching the key-value field. Optional.
+   * If not specified, the whole field specified in the `field` field will be
+   * taken as value, and its name used as key. If specified, it MUST contain
+   * exactly one named segment (along with any number of unnamed segments) The
+   * pattern will be matched over the field specified in the `field` field, then
+   * if the match is successful:
+   * - the name of the single named segment will be used as a header name,
+   * - the match value of the segment will be used as a header value;
+   * if the match is NOT successful, nothing will be sent.
+   * Example:
+   *               -- This is a field in the request message
+   *              |   that the header value will be extracted from.
+   *              |
+   *              |                     -- This is the key name in the
+   *              |                    |   routing header.
+   *              V                    |
+   *     field: "table_name"           v
+   *     path_template: "projects/*/{table_location=instances/*}/tables/*"
+   *                                                ^            ^
+   *                                                |            |
+   *       In the {} brackets is the pattern that --             |
+   *       specifies what to extract from the                    |
+   *       field as a value to be sent.                          |
+   *                                                             |
+   *      The string in the field must match the whole pattern --
+   *      before brackets, inside brackets, after brackets.
+   * When looking at this specific example, we can see that:
+   * - A key-value pair with the key `table_location`
+   *   and the value matching `instances/*` should be added
+   *   to the x-goog-request-params routing header.
+   * - The value is extracted from the request message's `table_name` field
+   *   if it matches the full pattern specified:
+   *   `projects/*/instances/*/tables/*`.
+   * **NB:** If the `path_template` field is not provided, the key name is
+   * equal to the field name, and the whole field should be sent as a value.
+   * This makes the pattern for the field and the value functionally equivalent
+   * to `**`, and the configuration
+   *     {
+   *       field: "table_name"
+   *     }
+   * is a functionally equivalent shorthand to:
+   *     {
+   *       field: "table_name"
+   *       path_template: "{table_name=**}"
+   *     }
+   * See Example 1 for more details.
+   * 
+ * + * string path_template = 2; + * + * @return The pathTemplate. + */ + java.lang.String getPathTemplate(); + /** + * + * + *
+   * A pattern matching the key-value field. Optional.
+   * If not specified, the whole field specified in the `field` field will be
+   * taken as value, and its name used as key. If specified, it MUST contain
+   * exactly one named segment (along with any number of unnamed segments) The
+   * pattern will be matched over the field specified in the `field` field, then
+   * if the match is successful:
+   * - the name of the single named segment will be used as a header name,
+   * - the match value of the segment will be used as a header value;
+   * if the match is NOT successful, nothing will be sent.
+   * Example:
+   *               -- This is a field in the request message
+   *              |   that the header value will be extracted from.
+   *              |
+   *              |                     -- This is the key name in the
+   *              |                    |   routing header.
+   *              V                    |
+   *     field: "table_name"           v
+   *     path_template: "projects/*/{table_location=instances/*}/tables/*"
+   *                                                ^            ^
+   *                                                |            |
+   *       In the {} brackets is the pattern that --             |
+   *       specifies what to extract from the                    |
+   *       field as a value to be sent.                          |
+   *                                                             |
+   *      The string in the field must match the whole pattern --
+   *      before brackets, inside brackets, after brackets.
+   * When looking at this specific example, we can see that:
+   * - A key-value pair with the key `table_location`
+   *   and the value matching `instances/*` should be added
+   *   to the x-goog-request-params routing header.
+   * - The value is extracted from the request message's `table_name` field
+   *   if it matches the full pattern specified:
+   *   `projects/*/instances/*/tables/*`.
+   * **NB:** If the `path_template` field is not provided, the key name is
+   * equal to the field name, and the whole field should be sent as a value.
+   * This makes the pattern for the field and the value functionally equivalent
+   * to `**`, and the configuration
+   *     {
+   *       field: "table_name"
+   *     }
+   * is a functionally equivalent shorthand to:
+   *     {
+   *       field: "table_name"
+   *       path_template: "{table_name=**}"
+   *     }
+   * See Example 1 for more details.
+   * 
+ * + * string path_template = 2; + * + * @return The bytes for pathTemplate. + */ + com.google.protobuf.ByteString getPathTemplateBytes(); +} diff --git a/proto-google-common-protos/src/main/java/com/google/api/RoutingProto.java b/proto-google-common-protos/src/main/java/com/google/api/RoutingProto.java new file mode 100644 index 00000000..31189bf5 --- /dev/null +++ b/proto-google-common-protos/src/main/java/com/google/api/RoutingProto.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/routing.proto + +package com.google.api; + +public final class RoutingProto { + private RoutingProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.google.api.RoutingProto.routing); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static final int ROUTING_FIELD_NUMBER = 72295729; + /** + * + * + *
+   * See RoutingRule.
+   * 
+ * + * extend .google.protobuf.MethodOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, com.google.api.RoutingRule> + routing = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + com.google.api.RoutingRule.class, com.google.api.RoutingRule.getDefaultInstance()); + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_RoutingRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_RoutingRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_RoutingParameter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_RoutingParameter_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\030google/api/routing.proto\022\ngoogle.api\032 " + + "google/protobuf/descriptor.proto\"G\n\013Rout" + + "ingRule\0228\n\022routing_parameters\030\002 \003(\0132\034.go" + + "ogle.api.RoutingParameter\"8\n\020RoutingPara" + + "meter\022\r\n\005field\030\001 \001(\t\022\025\n\rpath_template\030\002 " + + "\001(\t:K\n\007routing\022\036.google.protobuf.MethodO" + + "ptions\030\261\312\274\" \001(\0132\027.google.api.RoutingRule" + + "Bj\n\016com.google.apiB\014RoutingProtoP\001ZAgoog" + + "le.golang.org/genproto/googleapis/api/an" + + "notations;annotations\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DescriptorProtos.getDescriptor(), + }); + internal_static_google_api_RoutingRule_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_RoutingRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_RoutingRule_descriptor, + new java.lang.String[] { + "RoutingParameters", + }); + internal_static_google_api_RoutingParameter_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_RoutingParameter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_RoutingParameter_descriptor, + new java.lang.String[] { + "Field", "PathTemplate", + }); + routing.internalInit(descriptor.getExtensions().get(0)); + com.google.protobuf.DescriptorProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-common-protos/src/main/java/com/google/api/RoutingRule.java b/proto-google-common-protos/src/main/java/com/google/api/RoutingRule.java new file mode 100644 index 00000000..08e1e223 --- /dev/null +++ b/proto-google-common-protos/src/main/java/com/google/api/RoutingRule.java @@ -0,0 +1,1588 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/routing.proto + +package com.google.api; + +/** + * + * + *
+ * Specifies the routing information that should be sent along with the request
+ * in the form of routing header.
+ * **NOTE:** All service configuration rules follow the "last one wins" order.
+ * The examples below will apply to an RPC which has the following request type:
+ * Message Definition:
+ *     message Request {
+ *       // The name of the Table
+ *       // Values can be of the following formats:
+ *       // - `projects/<project>/tables/<table>`
+ *       // - `projects/<project>/instances/<instance>/tables/<table>`
+ *       // - `region/<region>/zones/<zone>/tables/<table>`
+ *       string table_name = 1;
+ *       // This value specifies routing for replication.
+ *       // It can be in the following formats:
+ *       // - `profiles/<profile_id>`
+ *       // - a legacy `profile_id` that can be any string
+ *       string app_profile_id = 2;
+ *     }
+ * Example message:
+ *     {
+ *       table_name: projects/proj_foo/instances/instance_bar/table/table_baz,
+ *       app_profile_id: profiles/prof_qux
+ *     }
+ * The routing header consists of one or multiple key-value pairs. Every key
+ * and value must be percent-encoded, and joined together in the format of
+ * `key1=value1&key2=value2`.
+ * In the examples below I am skipping the percent-encoding for readablity.
+ * Example 1
+ * Extracting a field from the request to put into the routing header
+ * unchanged, with the key equal to the field name.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // Take the `app_profile_id`.
+ *       routing_parameters {
+ *         field: "app_profile_id"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params: app_profile_id=profiles/prof_qux
+ * Example 2
+ * Extracting a field from the request to put into the routing header
+ * unchanged, with the key different from the field name.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // Take the `app_profile_id`, but name it `routing_id` in the header.
+ *       routing_parameters {
+ *         field: "app_profile_id"
+ *         path_template: "{routing_id=**}"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params: routing_id=profiles/prof_qux
+ * Example 3
+ * Extracting a field from the request to put into the routing
+ * header, while matching a path template syntax on the field's value.
+ * NB: it is more useful to send nothing than to send garbage for the purpose
+ * of dynamic routing, since garbage pollutes cache. Thus the matching.
+ * Sub-example 3a
+ * The field matches the template.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // Take the `table_name`, if it's well-formed (with project-based
+ *       // syntax).
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{table_name=projects/*/instances/*/**}"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params:
+ *     table_name=projects/proj_foo/instances/instance_bar/table/table_baz
+ * Sub-example 3b
+ * The field does not match the template.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // Take the `table_name`, if it's well-formed (with region-based
+ *       // syntax).
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{table_name=regions/*/zones/*/**}"
+ *       }
+ *     };
+ * result:
+ *     <no routing header will be sent>
+ * Sub-example 3c
+ * Multiple alternative conflictingly named path templates are
+ * specified. The one that matches is used to construct the header.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // Take the `table_name`, if it's well-formed, whether
+ *       // using the region- or projects-based syntax.
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{table_name=regions/*/zones/*/**}"
+ *       }
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{table_name=projects/*/instances/*/**}"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params:
+ *     table_name=projects/proj_foo/instances/instance_bar/table/table_baz
+ * Example 4
+ * Extracting a single routing header key-value pair by matching a
+ * template syntax on (a part of) a single request field.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // Take just the project id from the `table_name` field.
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{routing_id=projects/*}/**"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params: routing_id=projects/proj_foo
+ * Example 5
+ * Extracting a single routing header key-value pair by matching
+ * several conflictingly named path templates on (parts of) a single request
+ * field. The last template to match "wins" the conflict.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // If the `table_name` does not have instances information,
+ *       // take just the project id for routing.
+ *       // Otherwise take project + instance.
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{routing_id=projects/*}/**"
+ *       }
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{routing_id=projects/*/instances/*}/**"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params:
+ *     routing_id=projects/proj_foo/instances/instance_bar
+ * Example 6
+ * Extracting multiple routing header key-value pairs by matching
+ * several non-conflicting path templates on (parts of) a single request field.
+ * Sub-example 6a
+ * Make the templates strict, so that if the `table_name` does not
+ * have an instance information, nothing is sent.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // The routing code needs two keys instead of one composite
+ *       // but works only for the tables with the "project-instance" name
+ *       // syntax.
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{project_id=projects/*}/instances/*/**"
+ *       }
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "projects/*/{instance_id=instances/*}/**"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params:
+ *     project_id=projects/proj_foo&instance_id=instances/instance_bar
+ * Sub-example 6b
+ * Make the templates loose, so that if the `table_name` does not
+ * have an instance information, just the project id part is sent.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // The routing code wants two keys instead of one composite
+ *       // but will work with just the `project_id` for tables without
+ *       // an instance in the `table_name`.
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{project_id=projects/*}/**"
+ *       }
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "projects/*/{instance_id=instances/*}/**"
+ *       }
+ *     };
+ * result (is the same as 6a for our example message because it has the instance
+ * information):
+ *     x-goog-request-params:
+ *     project_id=projects/proj_foo&instance_id=instances/instance_bar
+ * Example 7
+ * Extracting multiple routing header key-value pairs by matching
+ * several path templates on multiple request fields.
+ * NB: note that here there is no way to specify sending nothing if one of the
+ * fields does not match its template. E.g. if the `table_name` is in the wrong
+ * format, the `project_id` will not be sent, but the `routing_id` will be.
+ * The backend routing code has to be aware of that and be prepared to not
+ * receive a full complement of keys if it expects multiple.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // The routing needs both `project_id` and `routing_id`
+ *       // (from the `app_profile_id` field) for routing.
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{project_id=projects/*}/**"
+ *       }
+ *       routing_parameters {
+ *         field: "app_profile_id"
+ *         path_template: "{routing_id=**}"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params:
+ *     project_id=projects/proj_foo&routing_id=profiles/prof_qux
+ * Example 8
+ * Extracting a single routing header key-value pair by matching
+ * several conflictingly named path templates on several request fields. The
+ * last template to match "wins" the conflict.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // The `routing_id` can be a project id or a region id depending on
+ *       // the table name format, but only if the `app_profile_id` is not set.
+ *       // If `app_profile_id` is set it should be used instead.
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{routing_id=projects/*}/**"
+ *       }
+ *       routing_parameters {
+ *          field: "table_name"
+ *          path_template: "{routing_id=regions/*}/**"
+ *       }
+ *       routing_parameters {
+ *         field: "app_profile_id"
+ *         path_template: "{routing_id=**}"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params: routing_id=profiles/prof_qux
+ * Example 9
+ * Bringing it all together.
+ * annotation:
+ *     option (google.api.routing) = {
+ *       // For routing both `table_location` and a `routing_id` are needed.
+ *       //
+ *       // table_location can be either an instance id or a region+zone id.
+ *       //
+ *       // For `routing_id`, take the value of `app_profile_id`
+ *       // - If it's in the format `profiles/<profile_id>`, send
+ *       // just the `<profile_id>` part.
+ *       // - If it's any other literal, send it as is.
+ *       // If the `app_profile_id` is empty, and the `table_name` starts with
+ *       // the project_id, send that instead.
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "projects/*/{table_location=instances/*}/tables/*"
+ *       }
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{table_location=regions/*/zones/*}/tables/*"
+ *       }
+ *       routing_parameters {
+ *         field: "table_name"
+ *         path_template: "{routing_id=projects/*}/**"
+ *       }
+ *       routing_parameters {
+ *         field: "app_profile_id"
+ *         path_template: "{routing_id=**}"
+ *       }
+ *       routing_parameters {
+ *         field: "app_profile_id"
+ *         path_template: "profiles/{routing_id=*}"
+ *       }
+ *     };
+ * result:
+ *     x-goog-request-params:
+ *     table_location=instances/instance_bar&routing_id=prof_qux
+ * 
+ * + * Protobuf type {@code google.api.RoutingRule} + */ +public final class RoutingRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.RoutingRule) + RoutingRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use RoutingRule.newBuilder() to construct. + private RoutingRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RoutingRule() { + routingParameters_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RoutingRule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RoutingRule( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + routingParameters_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + routingParameters_.add( + input.readMessage(com.google.api.RoutingParameter.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + routingParameters_ = java.util.Collections.unmodifiableList(routingParameters_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.RoutingProto.internal_static_google_api_RoutingRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.RoutingProto.internal_static_google_api_RoutingRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.RoutingRule.class, com.google.api.RoutingRule.Builder.class); + } + + public static final int ROUTING_PARAMETERS_FIELD_NUMBER = 2; + private java.util.List routingParameters_; + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + @java.lang.Override + public java.util.List getRoutingParametersList() { + return routingParameters_; + } + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + @java.lang.Override + public java.util.List + getRoutingParametersOrBuilderList() { + return routingParameters_; + } + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + @java.lang.Override + public int getRoutingParametersCount() { + return routingParameters_.size(); + } + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + @java.lang.Override + public com.google.api.RoutingParameter getRoutingParameters(int index) { + return routingParameters_.get(index); + } + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + @java.lang.Override + public com.google.api.RoutingParameterOrBuilder getRoutingParametersOrBuilder(int index) { + return routingParameters_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < routingParameters_.size(); i++) { + output.writeMessage(2, routingParameters_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < routingParameters_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, routingParameters_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.RoutingRule)) { + return super.equals(obj); + } + com.google.api.RoutingRule other = (com.google.api.RoutingRule) obj; + + if (!getRoutingParametersList().equals(other.getRoutingParametersList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRoutingParametersCount() > 0) { + hash = (37 * hash) + ROUTING_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getRoutingParametersList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.RoutingRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.RoutingRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.RoutingRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.RoutingRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.RoutingRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.RoutingRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.RoutingRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.RoutingRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.RoutingRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.RoutingRule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.RoutingRule parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.RoutingRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.RoutingRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Specifies the routing information that should be sent along with the request
+   * in the form of routing header.
+   * **NOTE:** All service configuration rules follow the "last one wins" order.
+   * The examples below will apply to an RPC which has the following request type:
+   * Message Definition:
+   *     message Request {
+   *       // The name of the Table
+   *       // Values can be of the following formats:
+   *       // - `projects/<project>/tables/<table>`
+   *       // - `projects/<project>/instances/<instance>/tables/<table>`
+   *       // - `region/<region>/zones/<zone>/tables/<table>`
+   *       string table_name = 1;
+   *       // This value specifies routing for replication.
+   *       // It can be in the following formats:
+   *       // - `profiles/<profile_id>`
+   *       // - a legacy `profile_id` that can be any string
+   *       string app_profile_id = 2;
+   *     }
+   * Example message:
+   *     {
+   *       table_name: projects/proj_foo/instances/instance_bar/table/table_baz,
+   *       app_profile_id: profiles/prof_qux
+   *     }
+   * The routing header consists of one or multiple key-value pairs. Every key
+   * and value must be percent-encoded, and joined together in the format of
+   * `key1=value1&key2=value2`.
+   * In the examples below I am skipping the percent-encoding for readablity.
+   * Example 1
+   * Extracting a field from the request to put into the routing header
+   * unchanged, with the key equal to the field name.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // Take the `app_profile_id`.
+   *       routing_parameters {
+   *         field: "app_profile_id"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params: app_profile_id=profiles/prof_qux
+   * Example 2
+   * Extracting a field from the request to put into the routing header
+   * unchanged, with the key different from the field name.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // Take the `app_profile_id`, but name it `routing_id` in the header.
+   *       routing_parameters {
+   *         field: "app_profile_id"
+   *         path_template: "{routing_id=**}"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params: routing_id=profiles/prof_qux
+   * Example 3
+   * Extracting a field from the request to put into the routing
+   * header, while matching a path template syntax on the field's value.
+   * NB: it is more useful to send nothing than to send garbage for the purpose
+   * of dynamic routing, since garbage pollutes cache. Thus the matching.
+   * Sub-example 3a
+   * The field matches the template.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // Take the `table_name`, if it's well-formed (with project-based
+   *       // syntax).
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{table_name=projects/*/instances/*/**}"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params:
+   *     table_name=projects/proj_foo/instances/instance_bar/table/table_baz
+   * Sub-example 3b
+   * The field does not match the template.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // Take the `table_name`, if it's well-formed (with region-based
+   *       // syntax).
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{table_name=regions/*/zones/*/**}"
+   *       }
+   *     };
+   * result:
+   *     <no routing header will be sent>
+   * Sub-example 3c
+   * Multiple alternative conflictingly named path templates are
+   * specified. The one that matches is used to construct the header.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // Take the `table_name`, if it's well-formed, whether
+   *       // using the region- or projects-based syntax.
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{table_name=regions/*/zones/*/**}"
+   *       }
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{table_name=projects/*/instances/*/**}"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params:
+   *     table_name=projects/proj_foo/instances/instance_bar/table/table_baz
+   * Example 4
+   * Extracting a single routing header key-value pair by matching a
+   * template syntax on (a part of) a single request field.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // Take just the project id from the `table_name` field.
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{routing_id=projects/*}/**"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params: routing_id=projects/proj_foo
+   * Example 5
+   * Extracting a single routing header key-value pair by matching
+   * several conflictingly named path templates on (parts of) a single request
+   * field. The last template to match "wins" the conflict.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // If the `table_name` does not have instances information,
+   *       // take just the project id for routing.
+   *       // Otherwise take project + instance.
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{routing_id=projects/*}/**"
+   *       }
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{routing_id=projects/*/instances/*}/**"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params:
+   *     routing_id=projects/proj_foo/instances/instance_bar
+   * Example 6
+   * Extracting multiple routing header key-value pairs by matching
+   * several non-conflicting path templates on (parts of) a single request field.
+   * Sub-example 6a
+   * Make the templates strict, so that if the `table_name` does not
+   * have an instance information, nothing is sent.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // The routing code needs two keys instead of one composite
+   *       // but works only for the tables with the "project-instance" name
+   *       // syntax.
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{project_id=projects/*}/instances/*/**"
+   *       }
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "projects/*/{instance_id=instances/*}/**"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params:
+   *     project_id=projects/proj_foo&instance_id=instances/instance_bar
+   * Sub-example 6b
+   * Make the templates loose, so that if the `table_name` does not
+   * have an instance information, just the project id part is sent.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // The routing code wants two keys instead of one composite
+   *       // but will work with just the `project_id` for tables without
+   *       // an instance in the `table_name`.
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{project_id=projects/*}/**"
+   *       }
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "projects/*/{instance_id=instances/*}/**"
+   *       }
+   *     };
+   * result (is the same as 6a for our example message because it has the instance
+   * information):
+   *     x-goog-request-params:
+   *     project_id=projects/proj_foo&instance_id=instances/instance_bar
+   * Example 7
+   * Extracting multiple routing header key-value pairs by matching
+   * several path templates on multiple request fields.
+   * NB: note that here there is no way to specify sending nothing if one of the
+   * fields does not match its template. E.g. if the `table_name` is in the wrong
+   * format, the `project_id` will not be sent, but the `routing_id` will be.
+   * The backend routing code has to be aware of that and be prepared to not
+   * receive a full complement of keys if it expects multiple.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // The routing needs both `project_id` and `routing_id`
+   *       // (from the `app_profile_id` field) for routing.
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{project_id=projects/*}/**"
+   *       }
+   *       routing_parameters {
+   *         field: "app_profile_id"
+   *         path_template: "{routing_id=**}"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params:
+   *     project_id=projects/proj_foo&routing_id=profiles/prof_qux
+   * Example 8
+   * Extracting a single routing header key-value pair by matching
+   * several conflictingly named path templates on several request fields. The
+   * last template to match "wins" the conflict.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // The `routing_id` can be a project id or a region id depending on
+   *       // the table name format, but only if the `app_profile_id` is not set.
+   *       // If `app_profile_id` is set it should be used instead.
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{routing_id=projects/*}/**"
+   *       }
+   *       routing_parameters {
+   *          field: "table_name"
+   *          path_template: "{routing_id=regions/*}/**"
+   *       }
+   *       routing_parameters {
+   *         field: "app_profile_id"
+   *         path_template: "{routing_id=**}"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params: routing_id=profiles/prof_qux
+   * Example 9
+   * Bringing it all together.
+   * annotation:
+   *     option (google.api.routing) = {
+   *       // For routing both `table_location` and a `routing_id` are needed.
+   *       //
+   *       // table_location can be either an instance id or a region+zone id.
+   *       //
+   *       // For `routing_id`, take the value of `app_profile_id`
+   *       // - If it's in the format `profiles/<profile_id>`, send
+   *       // just the `<profile_id>` part.
+   *       // - If it's any other literal, send it as is.
+   *       // If the `app_profile_id` is empty, and the `table_name` starts with
+   *       // the project_id, send that instead.
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "projects/*/{table_location=instances/*}/tables/*"
+   *       }
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{table_location=regions/*/zones/*}/tables/*"
+   *       }
+   *       routing_parameters {
+   *         field: "table_name"
+   *         path_template: "{routing_id=projects/*}/**"
+   *       }
+   *       routing_parameters {
+   *         field: "app_profile_id"
+   *         path_template: "{routing_id=**}"
+   *       }
+   *       routing_parameters {
+   *         field: "app_profile_id"
+   *         path_template: "profiles/{routing_id=*}"
+   *       }
+   *     };
+   * result:
+   *     x-goog-request-params:
+   *     table_location=instances/instance_bar&routing_id=prof_qux
+   * 
+ * + * Protobuf type {@code google.api.RoutingRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.RoutingRule) + com.google.api.RoutingRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.RoutingProto.internal_static_google_api_RoutingRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.RoutingProto.internal_static_google_api_RoutingRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.RoutingRule.class, com.google.api.RoutingRule.Builder.class); + } + + // Construct using com.google.api.RoutingRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRoutingParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (routingParametersBuilder_ == null) { + routingParameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + routingParametersBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.RoutingProto.internal_static_google_api_RoutingRule_descriptor; + } + + @java.lang.Override + public com.google.api.RoutingRule getDefaultInstanceForType() { + return com.google.api.RoutingRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.RoutingRule build() { + com.google.api.RoutingRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.RoutingRule buildPartial() { + com.google.api.RoutingRule result = new com.google.api.RoutingRule(this); + int from_bitField0_ = bitField0_; + if (routingParametersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + routingParameters_ = java.util.Collections.unmodifiableList(routingParameters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.routingParameters_ = routingParameters_; + } else { + result.routingParameters_ = routingParametersBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.RoutingRule) { + return mergeFrom((com.google.api.RoutingRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.RoutingRule other) { + if (other == com.google.api.RoutingRule.getDefaultInstance()) return this; + if (routingParametersBuilder_ == null) { + if (!other.routingParameters_.isEmpty()) { + if (routingParameters_.isEmpty()) { + routingParameters_ = other.routingParameters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRoutingParametersIsMutable(); + routingParameters_.addAll(other.routingParameters_); + } + onChanged(); + } + } else { + if (!other.routingParameters_.isEmpty()) { + if (routingParametersBuilder_.isEmpty()) { + routingParametersBuilder_.dispose(); + routingParametersBuilder_ = null; + routingParameters_ = other.routingParameters_; + bitField0_ = (bitField0_ & ~0x00000001); + routingParametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRoutingParametersFieldBuilder() + : null; + } else { + routingParametersBuilder_.addAllMessages(other.routingParameters_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.RoutingRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.RoutingRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List routingParameters_ = + java.util.Collections.emptyList(); + + private void ensureRoutingParametersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + routingParameters_ = + new java.util.ArrayList(routingParameters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.RoutingParameter, + com.google.api.RoutingParameter.Builder, + com.google.api.RoutingParameterOrBuilder> + routingParametersBuilder_; + + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public java.util.List getRoutingParametersList() { + if (routingParametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(routingParameters_); + } else { + return routingParametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public int getRoutingParametersCount() { + if (routingParametersBuilder_ == null) { + return routingParameters_.size(); + } else { + return routingParametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public com.google.api.RoutingParameter getRoutingParameters(int index) { + if (routingParametersBuilder_ == null) { + return routingParameters_.get(index); + } else { + return routingParametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public Builder setRoutingParameters(int index, com.google.api.RoutingParameter value) { + if (routingParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingParametersIsMutable(); + routingParameters_.set(index, value); + onChanged(); + } else { + routingParametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public Builder setRoutingParameters( + int index, com.google.api.RoutingParameter.Builder builderForValue) { + if (routingParametersBuilder_ == null) { + ensureRoutingParametersIsMutable(); + routingParameters_.set(index, builderForValue.build()); + onChanged(); + } else { + routingParametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public Builder addRoutingParameters(com.google.api.RoutingParameter value) { + if (routingParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingParametersIsMutable(); + routingParameters_.add(value); + onChanged(); + } else { + routingParametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public Builder addRoutingParameters(int index, com.google.api.RoutingParameter value) { + if (routingParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingParametersIsMutable(); + routingParameters_.add(index, value); + onChanged(); + } else { + routingParametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public Builder addRoutingParameters(com.google.api.RoutingParameter.Builder builderForValue) { + if (routingParametersBuilder_ == null) { + ensureRoutingParametersIsMutable(); + routingParameters_.add(builderForValue.build()); + onChanged(); + } else { + routingParametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public Builder addRoutingParameters( + int index, com.google.api.RoutingParameter.Builder builderForValue) { + if (routingParametersBuilder_ == null) { + ensureRoutingParametersIsMutable(); + routingParameters_.add(index, builderForValue.build()); + onChanged(); + } else { + routingParametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public Builder addAllRoutingParameters( + java.lang.Iterable values) { + if (routingParametersBuilder_ == null) { + ensureRoutingParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routingParameters_); + onChanged(); + } else { + routingParametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public Builder clearRoutingParameters() { + if (routingParametersBuilder_ == null) { + routingParameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + routingParametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public Builder removeRoutingParameters(int index) { + if (routingParametersBuilder_ == null) { + ensureRoutingParametersIsMutable(); + routingParameters_.remove(index); + onChanged(); + } else { + routingParametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public com.google.api.RoutingParameter.Builder getRoutingParametersBuilder(int index) { + return getRoutingParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public com.google.api.RoutingParameterOrBuilder getRoutingParametersOrBuilder(int index) { + if (routingParametersBuilder_ == null) { + return routingParameters_.get(index); + } else { + return routingParametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public java.util.List + getRoutingParametersOrBuilderList() { + if (routingParametersBuilder_ != null) { + return routingParametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(routingParameters_); + } + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public com.google.api.RoutingParameter.Builder addRoutingParametersBuilder() { + return getRoutingParametersFieldBuilder() + .addBuilder(com.google.api.RoutingParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public com.google.api.RoutingParameter.Builder addRoutingParametersBuilder(int index) { + return getRoutingParametersFieldBuilder() + .addBuilder(index, com.google.api.RoutingParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A collection of Routing Parameter specifications.
+     * **NOTE:** If multiple Routing Parameters describe the same key
+     * (via the `path_template` field or via the `field` field when
+     * `path_template` is not provided), "last one wins" rule
+     * determines which Parameter gets used.
+     * See the examples for more details.
+     * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + public java.util.List + getRoutingParametersBuilderList() { + return getRoutingParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.RoutingParameter, + com.google.api.RoutingParameter.Builder, + com.google.api.RoutingParameterOrBuilder> + getRoutingParametersFieldBuilder() { + if (routingParametersBuilder_ == null) { + routingParametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.RoutingParameter, + com.google.api.RoutingParameter.Builder, + com.google.api.RoutingParameterOrBuilder>( + routingParameters_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + routingParameters_ = null; + } + return routingParametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.RoutingRule) + } + + // @@protoc_insertion_point(class_scope:google.api.RoutingRule) + private static final com.google.api.RoutingRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.RoutingRule(); + } + + public static com.google.api.RoutingRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RoutingRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RoutingRule(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.RoutingRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-common-protos/src/main/java/com/google/api/RoutingRuleOrBuilder.java b/proto-google-common-protos/src/main/java/com/google/api/RoutingRuleOrBuilder.java new file mode 100644 index 00000000..76b09e5e --- /dev/null +++ b/proto-google-common-protos/src/main/java/com/google/api/RoutingRuleOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/routing.proto + +package com.google.api; + +public interface RoutingRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.RoutingRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + java.util.List getRoutingParametersList(); + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + com.google.api.RoutingParameter getRoutingParameters(int index); + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + int getRoutingParametersCount(); + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + java.util.List + getRoutingParametersOrBuilderList(); + /** + * + * + *
+   * A collection of Routing Parameter specifications.
+   * **NOTE:** If multiple Routing Parameters describe the same key
+   * (via the `path_template` field or via the `field` field when
+   * `path_template` is not provided), "last one wins" rule
+   * determines which Parameter gets used.
+   * See the examples for more details.
+   * 
+ * + * repeated .google.api.RoutingParameter routing_parameters = 2; + */ + com.google.api.RoutingParameterOrBuilder getRoutingParametersOrBuilder(int index); +} diff --git a/synth.metadata b/synth.metadata index ebe587ff..22e23d7f 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-common-protos.git", - "sha": "c408f1d14f95f15fe741ff584554fce431146c00" + "sha": "08b5c8545ed6f29a11ae4d3f061df47f40234bd1" } }, { @@ -200,6 +200,11 @@ "proto-google-common-protos/src/main/java/com/google/api/ResourceProto.java", "proto-google-common-protos/src/main/java/com/google/api/ResourceReference.java", "proto-google-common-protos/src/main/java/com/google/api/ResourceReferenceOrBuilder.java", + "proto-google-common-protos/src/main/java/com/google/api/RoutingParameter.java", + "proto-google-common-protos/src/main/java/com/google/api/RoutingParameterOrBuilder.java", + "proto-google-common-protos/src/main/java/com/google/api/RoutingProto.java", + "proto-google-common-protos/src/main/java/com/google/api/RoutingRule.java", + "proto-google-common-protos/src/main/java/com/google/api/RoutingRuleOrBuilder.java", "proto-google-common-protos/src/main/java/com/google/api/Service.java", "proto-google-common-protos/src/main/java/com/google/api/ServiceOrBuilder.java", "proto-google-common-protos/src/main/java/com/google/api/ServiceProto.java", From 0308146d9c618f50bb25937ab8fd9e522046d62c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Oct 2021 17:32:29 +0200 Subject: [PATCH 09/11] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.1.0 (#242) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.0.3` -> `1.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/compatibility-slim/1.0.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/confidence-slim/1.0.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.1.0`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​110-httpswwwgithubcomgoogleapisjava-shared-configcomparev103v110-2021-10-12) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.0.3...v1.1.0) ##### Features - introduce Maven configuration for GraalVM testing ([#​314](https://www.togithub.com/googleapis/java-shared-config/issues/314)) ([28fbeb8](https://www.github.com/googleapis/java-shared-config/commit/28fbeb86c4466a58a05d6933584564dbf3352e79)) ##### Bug Fixes - update doclet version ([#​332](https://www.togithub.com/googleapis/java-shared-config/issues/332)) ([3fd0350](https://www.github.com/googleapis/java-shared-config/commit/3fd035030e4f0954dd1f62f7b8ea62583685880c)) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v9.0.1 ([#​327](https://www.togithub.com/googleapis/java-shared-config/issues/327)) ([b6c9b65](https://www.github.com/googleapis/java-shared-config/commit/b6c9b657550db2dee6b36edbb9a6084baee125e2)) - update dependency org.graalvm.buildtools:junit-platform-native to v0.9.6 ([#​330](https://www.togithub.com/googleapis/java-shared-config/issues/330)) ([271ed7d](https://www.github.com/googleapis/java-shared-config/commit/271ed7dba35623e22fc8a7f7d477e6043e772014)) - update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.6 ([#​331](https://www.togithub.com/googleapis/java-shared-config/issues/331)) ([4f9ba15](https://www.github.com/googleapis/java-shared-config/commit/4f9ba1551df0a2d4fc8c9acca8a951afbe8cb78a)) - update dependency org.junit.vintage:junit-vintage-engine to v5.8.1 ([#​329](https://www.togithub.com/googleapis/java-shared-config/issues/329)) ([4a8789e](https://www.github.com/googleapis/java-shared-config/commit/4a8789ee814ba8a3480beecc76c16fd1cb4e5f12)) ##### [1.0.3](https://www.github.com/googleapis/java-shared-config/compare/v1.0.2...v1.0.3) (2021-09-21) ##### Bug Fixes - update java-docfx-doclet version ([#​315](https://www.togithub.com/googleapis/java-shared-config/issues/315)) ([07af07c](https://www.github.com/googleapis/java-shared-config/commit/07af07c188447ea5728ecd2700121ff477d1c58a)) ##### [1.0.2](https://www.github.com/googleapis/java-shared-config/compare/v1.0.1...v1.0.2) (2021-09-13) ##### Bug Fixes - specify animal-sniffer-maven-plugin version ([#​308](https://www.togithub.com/googleapis/java-shared-config/issues/308)) ([378bf43](https://www.github.com/googleapis/java-shared-config/commit/378bf431383306c1cdd0a4f922956c87edf321b5)) - update java docfx doclet version ([#​312](https://www.togithub.com/googleapis/java-shared-config/issues/312)) ([dd7f6e0](https://www.github.com/googleapis/java-shared-config/commit/dd7f6e0c1a7cc73831b74b4475457611a8c097d3)) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v9 ([#​303](https://www.togithub.com/googleapis/java-shared-config/issues/303)) ([71faea3](https://www.github.com/googleapis/java-shared-config/commit/71faea38d4132407598550e2bb4c77f9d4a4d83d)) ##### [1.0.1](https://www.github.com/googleapis/java-shared-config/compare/v1.0.0...v1.0.1) (2021-08-18) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v8.45.1 ([#​292](https://www.togithub.com/googleapis/java-shared-config/issues/292)) ([66bf6e6](https://www.github.com/googleapis/java-shared-config/commit/66bf6e6fb95997b9eb4b34268b8d20c2fbe9ed5a))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-common-protos). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8775ffff..79809bcf 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.0.3 + 1.1.0 From f0c638a178e8ee02883f6570110f614f154f4814 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Thu, 14 Oct 2021 10:23:56 -0400 Subject: [PATCH 10/11] deps: update dependency io.grpc:grpc-bom to v1.41.0 and com.google.guava:guava to v31 (#244) * deps: update dependency io.grpc:grpc-bom to v1.41.0 and com.google.guava:guava to v31 * chore: exclude errorprone-annotation from dependencies check * chore: exclude depndencies.sh --- .kokoro/dependencies.sh | 4 ++-- pom.xml | 4 ++-- synth.py | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7..f18c6b8d 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -68,11 +68,11 @@ function completenessCheck() { # This is stripped from the output as it is not present in the flattened pom. # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. msg "Generating dependency list using original pom..." - mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt + mvn dependency:list -f pom.xml -DexcludeArtifactIds=error_prone_annotations -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) msg "Generating dependency list using flattened pom..." - mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + mvn dependency:list -f .flattened-pom.xml -DexcludeArtifactIds=error_prone_annotations -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt # Compare two dependency lists msg "Comparing dependency lists..." diff --git a/pom.xml b/pom.xml index 79809bcf..d9fa64ff 100644 --- a/pom.xml +++ b/pom.xml @@ -65,8 +65,8 @@ google-iam-parent 3.18.1 4.13.2 - 1.38.1 - 30.1-android + 1.41.0 + 31.0.1-android diff --git a/synth.py b/synth.py index bd68d39c..d90a71f7 100644 --- a/synth.py +++ b/synth.py @@ -106,4 +106,5 @@ def build_grpc(target): 'README.md', 'samples/*', '.github/workflows/samples.yaml', + '.kokoro/dependencies.sh', ]) From 05d0b8d156efb0174fa61a6a998847e057b356b0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:30:31 +0000 Subject: [PATCH 11/11] chore: release 2.6.0 (#239) :robot: I have created a release \*beep\* \*boop\* --- ## [2.6.0](https://www.github.com/googleapis/java-common-protos/compare/v2.5.1...v2.6.0) (2021-10-14) ### Features * add API classes for routing information ([#241](https://www.github.com/googleapis/java-common-protos/issues/241)) ([d1136e1](https://www.github.com/googleapis/java-common-protos/commit/d1136e139cd74bef717a73b3a8fc3b82055ab18e)) ### Dependencies * update dependency com.google.protobuf:protobuf-bom to v3.18.1 ([#237](https://www.github.com/googleapis/java-common-protos/issues/237)) ([e6da4bb](https://www.github.com/googleapis/java-common-protos/commit/e6da4bb3ba18fa39eae1fbe04c65b866097e5801)) * update dependency com.google.protobuf:protobuf-java to v3.18.1 ([#238](https://www.github.com/googleapis/java-common-protos/issues/238)) ([92ec21a](https://www.github.com/googleapis/java-common-protos/commit/92ec21ae83951a6b05da343c5f4bf3e8b9942b6d)) * update dependency io.grpc:grpc-bom to v1.41.0 and com.google.guava:guava to v31 ([#244](https://www.github.com/googleapis/java-common-protos/issues/244)) ([f0c638a](https://www.github.com/googleapis/java-common-protos/commit/f0c638a178e8ee02883f6570110f614f154f4814)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 14 ++++++++++++++ grpc-google-common-protos/pom.xml | 4 ++-- pom.xml | 4 ++-- proto-google-common-protos/pom.xml | 4 ++-- versions.txt | 2 +- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f33a98ef..e9167114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [2.6.0](https://www.github.com/googleapis/java-common-protos/compare/v2.5.1...v2.6.0) (2021-10-14) + + +### Features + +* add API classes for routing information ([#241](https://www.github.com/googleapis/java-common-protos/issues/241)) ([d1136e1](https://www.github.com/googleapis/java-common-protos/commit/d1136e139cd74bef717a73b3a8fc3b82055ab18e)) + + +### Dependencies + +* update dependency com.google.protobuf:protobuf-bom to v3.18.1 ([#237](https://www.github.com/googleapis/java-common-protos/issues/237)) ([e6da4bb](https://www.github.com/googleapis/java-common-protos/commit/e6da4bb3ba18fa39eae1fbe04c65b866097e5801)) +* update dependency com.google.protobuf:protobuf-java to v3.18.1 ([#238](https://www.github.com/googleapis/java-common-protos/issues/238)) ([92ec21a](https://www.github.com/googleapis/java-common-protos/commit/92ec21ae83951a6b05da343c5f4bf3e8b9942b6d)) +* update dependency io.grpc:grpc-bom to v1.41.0 and com.google.guava:guava to v31 ([#244](https://www.github.com/googleapis/java-common-protos/issues/244)) ([f0c638a](https://www.github.com/googleapis/java-common-protos/commit/f0c638a178e8ee02883f6570110f614f154f4814)) + ### [2.5.1](https://www.github.com/googleapis/java-common-protos/compare/v2.5.0...v2.5.1) (2021-09-24) diff --git a/grpc-google-common-protos/pom.xml b/grpc-google-common-protos/pom.xml index 8aba627a..3b42dafa 100644 --- a/grpc-google-common-protos/pom.xml +++ b/grpc-google-common-protos/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-common-protos - 2.5.2-SNAPSHOT + 2.6.0 grpc-google-common-protos GRPC library for grpc-google-common-protos com.google.api.grpc google-common-protos-parent - 2.5.2-SNAPSHOT + 2.6.0 diff --git a/pom.xml b/pom.xml index d9fa64ff..710bffee 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.api.grpc google-common-protos-parent pom - 2.5.2-SNAPSHOT + 2.6.0 Google Common Protos Parent https://github.com/googleapis/java-iam @@ -88,7 +88,7 @@ com.google.api.grpc proto-google-common-protos - 2.5.2-SNAPSHOT + 2.6.0 com.google.guava diff --git a/proto-google-common-protos/pom.xml b/proto-google-common-protos/pom.xml index cd85e643..9b88016f 100644 --- a/proto-google-common-protos/pom.xml +++ b/proto-google-common-protos/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-common-protos - 2.5.2-SNAPSHOT + 2.6.0 proto-google-common-protos PROTO library for proto-google-common-protos com.google.api.grpc google-common-protos-parent - 2.5.2-SNAPSHOT + 2.6.0 diff --git a/versions.txt b/versions.txt index 59eba80c..196f4b61 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -proto-google-common-protos:2.5.1:2.5.2-SNAPSHOT +proto-google-common-protos:2.6.0:2.6.0