diff --git a/.kokoro/continuous/bigtable-it.cfg b/.kokoro/continuous/bigtable-it.cfg index 1e92e040f690..b5129e51121e 100644 --- a/.kokoro/continuous/bigtable-it.cfg +++ b/.kokoro/continuous/bigtable-it.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "INTEGRATION_TEST_ARGS" - value: "google-cloud-clients/google-cloud-bigtable -Dbigtable.env=prod -Dbigtable.table=projects/gcloud-devel/instances/google-cloud-bigtable/tables/integration-tests" + value: "google-cloud-clients/google-cloud-bigtable -Dbigtable.env=prod -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable -Dbigtable.table=integration-tests" } env_vars: { diff --git a/.kokoro/continuous/bigtableadmin-it.cfg b/.kokoro/continuous/bigtableadmin-it.cfg index 697ae187e3c4..5625893dd94b 100644 --- a/.kokoro/continuous/bigtableadmin-it.cfg +++ b/.kokoro/continuous/bigtableadmin-it.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "INTEGRATION_TEST_ARGS" - value: "google-cloud-clients/google-cloud-bigtable-admin -Dbigtable.instance=projects/gcloud-devel/instances/google-cloud-bigtable" + value: "google-cloud-clients/google-cloud-bigtable-admin -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable" } env_vars: { diff --git a/.kokoro/nightly/bigtable-it.cfg b/.kokoro/nightly/bigtable-it.cfg index 1e92e040f690..b5129e51121e 100644 --- a/.kokoro/nightly/bigtable-it.cfg +++ b/.kokoro/nightly/bigtable-it.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "INTEGRATION_TEST_ARGS" - value: "google-cloud-clients/google-cloud-bigtable -Dbigtable.env=prod -Dbigtable.table=projects/gcloud-devel/instances/google-cloud-bigtable/tables/integration-tests" + value: "google-cloud-clients/google-cloud-bigtable -Dbigtable.env=prod -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable -Dbigtable.table=integration-tests" } env_vars: { diff --git a/.kokoro/nightly/bigtableadmin-it.cfg b/.kokoro/nightly/bigtableadmin-it.cfg index 697ae187e3c4..5625893dd94b 100644 --- a/.kokoro/nightly/bigtableadmin-it.cfg +++ b/.kokoro/nightly/bigtableadmin-it.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "INTEGRATION_TEST_ARGS" - value: "google-cloud-clients/google-cloud-bigtable-admin -Dbigtable.instance=projects/gcloud-devel/instances/google-cloud-bigtable" + value: "google-cloud-clients/google-cloud-bigtable-admin -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable" } env_vars: { diff --git a/.kokoro/presubmit/bigtable-it.cfg b/.kokoro/presubmit/bigtable-it.cfg index 1e92e040f690..b5129e51121e 100644 --- a/.kokoro/presubmit/bigtable-it.cfg +++ b/.kokoro/presubmit/bigtable-it.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "INTEGRATION_TEST_ARGS" - value: "google-cloud-clients/google-cloud-bigtable -Dbigtable.env=prod -Dbigtable.table=projects/gcloud-devel/instances/google-cloud-bigtable/tables/integration-tests" + value: "google-cloud-clients/google-cloud-bigtable -Dbigtable.env=prod -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable -Dbigtable.table=integration-tests" } env_vars: { diff --git a/.kokoro/presubmit/bigtableadmin-it.cfg b/.kokoro/presubmit/bigtableadmin-it.cfg index 697ae187e3c4..5625893dd94b 100644 --- a/.kokoro/presubmit/bigtableadmin-it.cfg +++ b/.kokoro/presubmit/bigtableadmin-it.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "INTEGRATION_TEST_ARGS" - value: "google-cloud-clients/google-cloud-bigtable-admin -Dbigtable.instance=projects/gcloud-devel/instances/google-cloud-bigtable" + value: "google-cloud-clients/google-cloud-bigtable-admin -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable" } env_vars: { diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh index c3d99f79d1b0..f14c37bc8567 100755 --- a/.kokoro/release/drop.sh +++ b/.kokoro/release/drop.sh @@ -15,11 +15,20 @@ set -eo pipefail +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + source $(dirname "$0")/common.sh -MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../)/settings.xml -pushd $(dirname "$0")/../ +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -mvn nexus-staging:drop -P release +mvn nexus-staging:drop -B \ + -P release \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh index 634c1f422438..125a973ba48c 100755 --- a/.kokoro/release/promote.sh +++ b/.kokoro/release/promote.sh @@ -15,11 +15,20 @@ set -eo pipefail +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + source $(dirname "$0")/common.sh -MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../)/settings.xml -pushd $(dirname "$0")/../ +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -mvn nexus-staging:release -P release +mvn nexus-staging:release -B \ + -P release \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg index 6b4bf38e5a29..7028b8f6f000 100644 --- a/.kokoro/release/stage.cfg +++ b/.kokoro/release/stage.cfg @@ -6,7 +6,11 @@ # Need to save the properties file action { define_artifacts { - regex: "github/google-cloud-java/target/nexus-staging/staging/*.properties" - strip_prefix: "github/google-cloud-java" + regex: "**/target/nexus-staging/staging/*.properties" + regex: "**/target/*.jar" + regex: "**/target/*.jar.asc" + regex: "**/target/*.pom" + regex: "**/target/*.pom.asc" + fail_if_no_artifacts: true } } diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 946976374435..ac54c6f4d298 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -22,10 +22,9 @@ pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -mvn clean install deploy \ +mvn clean deploy -B \ -DskipTests=true \ --settings ${MAVEN_SETTINGS_FILE} \ - -DstagingProfileId=3187e4f20d328b \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ -Dgpg.homedir=${GPG_HOMEDIR} \ diff --git a/README.md b/README.md index fd5e595aa2b5..d13554ee7d29 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-bom - 0.74.0-alpha + 0.76.0-alpha pom import @@ -86,11 +86,11 @@ If you are using Maven, add this to your pom.xml file [//]: # ({x-version-update-start:google-cloud-storage:released}) If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-storage:1.56.0' +compile 'com.google.cloud:google-cloud-storage:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "1.58.0" ``` [//]: # ({x-version-update-end}) @@ -111,7 +111,7 @@ If you are running into problems with version conflicts, the easiest way to solv com.google.cloud google-cloud-bom - 0.74.0-alpha + 0.76.0-alpha pom import diff --git a/RELEASING.md b/RELEASING.md index 76353c118928..6d0993d0ab8e 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,20 +1,97 @@ -One-time setup -============== +## Setup + +### Install releasetool + +See [releasetool](https://github.com/googleapis/releasetool) for installation instructions. You will +need python 3.6+ to run this tool. + +## Prepare a release + +1. Make sure the team agrees that it is time to release. + +2. Look over all of the commits since the last release and make sure there are no breaking changes + on the public surface. If there are any breaking changes, create and merge a new PR to revert the + surface back. + + **Note:** this should just be a scan of the public surface that would appear in Java doc. + Implementation changes, README changes, and snippet changes can all be skipped for this check. + +3. Verify that all unit and integration tests for the last commit have passed. + +4. Run `releasetool start`. Select "minor" or "patch" for the release type. This will bump the + artifact versions, ask you to edit release notes, and create the release pull request. + + **Note:** be sure to make these notes nice as they will be used for the release notes as well. + +## Pushing a release to Maven using Kokoro + +To manually publish the artifacts to Maven (rather than using Kokoro), you will need to follow the +"Additional setup for manual publishing" steps below and follow the instructions in the +"Manually publishing" section. + +1. Trigger the `google-cloud-java/release/stage` Kokoro job and wait for it to complete. This will + stage the built artifacts and prepare them for publishing. + +2. Look through the logs for the `google-cloud-java/release/stage` and find the staging repository + ids used. They will look like `comgoogleapi-XYZ` and `comgooglecloud-XYZ`. + +3. Promote or drop the staged repository. + + a. To publish the staged repository, trigger the `google-cloud-java/release/promote` Kokoro job for + each staging repository. To specify the staging repository, add an environment variable + configuration with `STAGING_REPOSITORY_ID=` from the UI. **Note: thi + will need to be run for each staging repository. It may take a few hours for the released + versions to be available for users to download.** + + b. To drop (abort) the staged repository, trigger the `google-cloud-java/release/drop` Kokoro job + with the same staging repository id configuration as if you were publishing. + +## Publish Javadoc + +1. Run `git clean -x -f -d` to put the repo in a clean state. + +2. Locally build the repo by running `mvn install -DskipTests`. + +3. Run `python utilities/stage_sites.py`. This script checks out `gh-pages` branch of the + repository, builds the documentation site and javadocs, copies them to the branch and commits it. + This script does not push the docs and it must be done manually on the later step. The script + assumes that there is no directory called `tmp_gh-pages` in the repository root. If it is + present, remove it before running the script. + +4. Run `cd tmp_gh-pages && git push && cd ..`. + +5. (Optional) Run `rm -rf tmp_gh-pages` to remove the generated docs directory from your local + machine. + +## Tag the release + +1. Run `releasetool tag` to publish a release on Github. It will list the last few merged PRs. + Select the newly merged release PR. Releasetool will create the GitHub release with notes + extracted from the pull request and tag the new release. + +## Prepare the next snapshot version + +1. Run `releasetool start` to bump the next snapshot version. Select "snapshot" when prompted for + the release type. This will bump the artifact versions and create a pull request. + +2. Review and submit the PR. + +## Additional setup for manual publishing + +### Set up Sonatype Account -Set up Sonatype Account ------------------------ * Sign up for a Sonatype JIRA account [here](https://issues.sonatype.org) * Click *Sign Up* in the login box, follow instructions -Get access to repository ------------------------- +### Get access to repository + * Go to [community support](https://issues.sonatype.org/browse/OSSRH) * Ask for publish rights by creating an issue similar to [this one](https://issues.sonatype.org/browse/OSSRH-32032) * You must be logged in to create a new issue * Use the *Create* button at the top tab -Set up PGP keys ---------------- +### Set up PGP keys + * Install GNU Privacy Guard (GPG) * GPG is installed by default on Ubuntu systems * For other systems, see [GnuPG download page](https://www.gnupg.org/download/) @@ -30,8 +107,8 @@ Set up PGP keys * Upload your public key to a public server: ```gpg --send-keys --keyserver hkp://pgp.mit.edu ABCDEFGH``` -Create a Maven settings file ----------------------------- +### Create a Maven settings file + * Create a file at ```$HOME/.m2/settings.xml``` with your passphrase and your sonatype username and password ``` 4.0.0 grpc-google-cloud-asset-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-asset-v1beta1 GRPC library for grpc-google-cloud-asset-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-automl-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-automl-v1beta1/pom.xml index 9bc46ae132d9..9ebf37e0d7d9 100644 --- a/google-api-grpc/grpc-google-cloud-automl-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-automl-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-automl-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-automl-v1beta1 GRPC library for grpc-google-cloud-automl-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml b/google-api-grpc/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml index 95fae2632a38..3d83e674f808 100644 --- a/google-api-grpc/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-bigquerydatatransfer-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-bigquerydatatransfer-v1 GRPC library for grpc-google-cloud-bigquerydatatransfer-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml index fc964a0933a2..33402e19a8f6 100644 --- a/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-bigquerystorage-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-bigquerystorage-v1beta1 GRPC library for grpc-google-cloud-bigquerystorage-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-bigtable-admin-v2/pom.xml b/google-api-grpc/grpc-google-cloud-bigtable-admin-v2/pom.xml index ccca7bb130a2..61ef8be5a4f4 100644 --- a/google-api-grpc/grpc-google-cloud-bigtable-admin-v2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-bigtable-admin-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-bigtable-admin-v2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-bigtable-admin-v2 GRPC library for grpc-google-cloud-bigtable-admin-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-bigtable-v2/pom.xml b/google-api-grpc/grpc-google-cloud-bigtable-v2/pom.xml index 50ce4787ed7a..b70e9b38840b 100644 --- a/google-api-grpc/grpc-google-cloud-bigtable-v2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-bigtable-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-bigtable-v2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-bigtable-v2 GRPC library for grpc-google-cloud-bigtable-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-container-v1/pom.xml b/google-api-grpc/grpc-google-cloud-container-v1/pom.xml index 8dfe2d3f4fc9..cb309d5e1815 100644 --- a/google-api-grpc/grpc-google-cloud-container-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-container-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-container-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-container-v1 GRPC library for grpc-google-cloud-container-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-containeranalysis-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-containeranalysis-v1beta1/pom.xml index c3f325c4fd5c..b4279de86e20 100644 --- a/google-api-grpc/grpc-google-cloud-containeranalysis-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-containeranalysis-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-containeranalysis-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-containeranalysis-v1beta1 GRPC library for grpc-google-cloud-containeranalysis-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-dataproc-v1/pom.xml b/google-api-grpc/grpc-google-cloud-dataproc-v1/pom.xml index 6289ac8cada4..2ad71a4c2747 100644 --- a/google-api-grpc/grpc-google-cloud-dataproc-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-dataproc-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-dataproc-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-dataproc-v1 GRPC library for grpc-google-cloud-dataproc-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-dataproc-v1beta2/pom.xml b/google-api-grpc/grpc-google-cloud-dataproc-v1beta2/pom.xml index 02c3f3eddec0..28f8fde1a19b 100644 --- a/google-api-grpc/grpc-google-cloud-dataproc-v1beta2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-dataproc-v1beta2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-dataproc-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-dataproc-v1beta2 GRPC library for grpc-google-cloud-dataproc-v1beta2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-dialogflow-v2/pom.xml b/google-api-grpc/grpc-google-cloud-dialogflow-v2/pom.xml index 0658949127b0..871d332b5bc7 100644 --- a/google-api-grpc/grpc-google-cloud-dialogflow-v2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-dialogflow-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-dialogflow-v2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-dialogflow-v2 GRPC library for grpc-google-cloud-dialogflow-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-dialogflow-v2beta1/pom.xml b/google-api-grpc/grpc-google-cloud-dialogflow-v2beta1/pom.xml index 3dc308d14f4b..515dd348bbea 100644 --- a/google-api-grpc/grpc-google-cloud-dialogflow-v2beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-dialogflow-v2beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-dialogflow-v2beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-dialogflow-v2beta1 GRPC library for grpc-google-cloud-dialogflow-v2beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-dlp-v2/pom.xml b/google-api-grpc/grpc-google-cloud-dlp-v2/pom.xml index baa5efeb643f..358c08954a7d 100644 --- a/google-api-grpc/grpc-google-cloud-dlp-v2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-dlp-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-dlp-v2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-dlp-v2 GRPC library for grpc-google-cloud-dlp-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-error-reporting-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-error-reporting-v1beta1/pom.xml index 6b1b6a14525f..685d8edeb632 100644 --- a/google-api-grpc/grpc-google-cloud-error-reporting-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-error-reporting-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-error-reporting-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-error-reporting-v1beta1 GRPC library for grpc-google-cloud-error-reporting-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-firestore-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-firestore-v1beta1/pom.xml index db4d8a12010a..e0b8d9e684c8 100644 --- a/google-api-grpc/grpc-google-cloud-firestore-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-firestore-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-firestore-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-firestore-v1beta1 GRPC library for grpc-google-cloud-firestore-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-iamcredentials-v1/pom.xml b/google-api-grpc/grpc-google-cloud-iamcredentials-v1/pom.xml index 50c2354b0853..9f566f8f589e 100644 --- a/google-api-grpc/grpc-google-cloud-iamcredentials-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-iamcredentials-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-iamcredentials-v1 - 0.1.1-alpha-SNAPSHOT + 0.3.0-alpha grpc-google-cloud-iamcredentials-v1 GRPC library for grpc-google-cloud-iamcredentials-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsGrpc.java b/google-api-grpc/grpc-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsGrpc.java index 64f247bfb9a2..86bdbda03ac8 100644 --- a/google-api-grpc/grpc-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsGrpc.java +++ b/google-api-grpc/grpc-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsGrpc.java @@ -266,6 +266,74 @@ private IAMCredentialsGrpc() {} return getSignJwtMethod; } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGenerateIdentityBindingAccessTokenMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest, + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse> + METHOD_GENERATE_IDENTITY_BINDING_ACCESS_TOKEN = + getGenerateIdentityBindingAccessTokenMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest, + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse> + getGenerateIdentityBindingAccessTokenMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest, + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse> + getGenerateIdentityBindingAccessTokenMethod() { + return getGenerateIdentityBindingAccessTokenMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest, + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse> + getGenerateIdentityBindingAccessTokenMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest, + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse> + getGenerateIdentityBindingAccessTokenMethod; + if ((getGenerateIdentityBindingAccessTokenMethod = + IAMCredentialsGrpc.getGenerateIdentityBindingAccessTokenMethod) + == null) { + synchronized (IAMCredentialsGrpc.class) { + if ((getGenerateIdentityBindingAccessTokenMethod = + IAMCredentialsGrpc.getGenerateIdentityBindingAccessTokenMethod) + == null) { + IAMCredentialsGrpc.getGenerateIdentityBindingAccessTokenMethod = + getGenerateIdentityBindingAccessTokenMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.iam.credentials.v1.IAMCredentials", + "GenerateIdentityBindingAccessToken")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.iam.credentials.v1 + .GenerateIdentityBindingAccessTokenRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.iam.credentials.v1 + .GenerateIdentityBindingAccessTokenResponse.getDefaultInstance())) + .setSchemaDescriptor( + new IAMCredentialsMethodDescriptorSupplier( + "GenerateIdentityBindingAccessToken")) + .build(); + } + } + } + return getGenerateIdentityBindingAccessTokenMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static IAMCredentialsStub newStub(io.grpc.Channel channel) { return new IAMCredentialsStub(channel); @@ -355,6 +423,23 @@ public void signJwt( asyncUnimplementedUnaryCall(getSignJwtMethodHelper(), responseObserver); } + /** + * + * + *
+     * Exchange a JWT signed by third party identity provider to an OAuth 2.0
+     * access token
+     * 
+ */ + public void generateIdentityBindingAccessToken( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse> + responseObserver) { + asyncUnimplementedUnaryCall( + getGenerateIdentityBindingAccessTokenMethodHelper(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -386,6 +471,14 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.iam.credentials.v1.SignJwtRequest, com.google.cloud.iam.credentials.v1.SignJwtResponse>( this, METHODID_SIGN_JWT))) + .addMethod( + getGenerateIdentityBindingAccessTokenMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest, + com.google.cloud.iam.credentials.v1 + .GenerateIdentityBindingAccessTokenResponse>( + this, METHODID_GENERATE_IDENTITY_BINDING_ACCESS_TOKEN))) .build(); } } @@ -486,6 +579,26 @@ public void signJwt( request, responseObserver); } + + /** + * + * + *
+     * Exchange a JWT signed by third party identity provider to an OAuth 2.0
+     * access token
+     * 
+ */ + public void generateIdentityBindingAccessToken( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse> + responseObserver) { + asyncUnaryCall( + getChannel() + .newCall(getGenerateIdentityBindingAccessTokenMethodHelper(), getCallOptions()), + request, + responseObserver); + } } /** @@ -567,6 +680,24 @@ public com.google.cloud.iam.credentials.v1.SignJwtResponse signJwt( com.google.cloud.iam.credentials.v1.SignJwtRequest request) { return blockingUnaryCall(getChannel(), getSignJwtMethodHelper(), getCallOptions(), request); } + + /** + * + * + *
+     * Exchange a JWT signed by third party identity provider to an OAuth 2.0
+     * access token
+     * 
+ */ + public com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + generateIdentityBindingAccessToken( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest request) { + return blockingUnaryCall( + getChannel(), + getGenerateIdentityBindingAccessTokenMethodHelper(), + getCallOptions(), + request); + } } /** @@ -655,12 +786,31 @@ protected IAMCredentialsFutureStub build( return futureUnaryCall( getChannel().newCall(getSignJwtMethodHelper(), getCallOptions()), request); } + + /** + * + * + *
+     * Exchange a JWT signed by third party identity provider to an OAuth 2.0
+     * access token
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessToken( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest request) { + return futureUnaryCall( + getChannel() + .newCall(getGenerateIdentityBindingAccessTokenMethodHelper(), getCallOptions()), + request); + } } private static final int METHODID_GENERATE_ACCESS_TOKEN = 0; private static final int METHODID_GENERATE_ID_TOKEN = 1; private static final int METHODID_SIGN_BLOB = 2; private static final int METHODID_SIGN_JWT = 3; + private static final int METHODID_GENERATE_IDENTITY_BINDING_ACCESS_TOKEN = 4; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -705,6 +855,15 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GENERATE_IDENTITY_BINDING_ACCESS_TOKEN: + serviceImpl.generateIdentityBindingAccessToken( + (com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.iam.credentials.v1 + .GenerateIdentityBindingAccessTokenResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -773,6 +932,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGenerateIdTokenMethodHelper()) .addMethod(getSignBlobMethodHelper()) .addMethod(getSignJwtMethodHelper()) + .addMethod(getGenerateIdentityBindingAccessTokenMethodHelper()) .build(); } } diff --git a/google-api-grpc/grpc-google-cloud-iot-v1/pom.xml b/google-api-grpc/grpc-google-cloud-iot-v1/pom.xml index d1b3bbd1515a..bd5d7a0413e0 100644 --- a/google-api-grpc/grpc-google-cloud-iot-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-iot-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-iot-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-iot-v1 GRPC library for grpc-google-cloud-iot-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-kms-v1/pom.xml b/google-api-grpc/grpc-google-cloud-kms-v1/pom.xml index 85516525c239..3e599b120fa0 100644 --- a/google-api-grpc/grpc-google-cloud-kms-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-kms-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-kms-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-kms-v1 GRPC library for grpc-google-cloud-kms-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-language-v1/pom.xml b/google-api-grpc/grpc-google-cloud-language-v1/pom.xml index 688f1524d0b9..63ae1e06c0ea 100644 --- a/google-api-grpc/grpc-google-cloud-language-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-language-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-language-v1 - 1.38.1-SNAPSHOT + 1.40.0 grpc-google-cloud-language-v1 GRPC library for grpc-google-cloud-language-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-language-v1beta2/pom.xml b/google-api-grpc/grpc-google-cloud-language-v1beta2/pom.xml index 6d9bf7554630..a6eac4a6c5b8 100644 --- a/google-api-grpc/grpc-google-cloud-language-v1beta2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-language-v1beta2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-language-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-language-v1beta2 GRPC library for grpc-google-cloud-language-v1beta2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-logging-v2/pom.xml b/google-api-grpc/grpc-google-cloud-logging-v2/pom.xml index 31d16f0607e4..e41224d9612b 100644 --- a/google-api-grpc/grpc-google-cloud-logging-v2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-logging-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-logging-v2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-logging-v2 GRPC library for grpc-google-cloud-logging-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-monitoring-v3/pom.xml b/google-api-grpc/grpc-google-cloud-monitoring-v3/pom.xml index 9f017f6d844f..8b4e14160750 100644 --- a/google-api-grpc/grpc-google-cloud-monitoring-v3/pom.xml +++ b/google-api-grpc/grpc-google-cloud-monitoring-v3/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-monitoring-v3 - 1.38.1-SNAPSHOT + 1.40.0 grpc-google-cloud-monitoring-v3 GRPC library for grpc-google-cloud-monitoring-v3 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-os-login-v1/pom.xml b/google-api-grpc/grpc-google-cloud-os-login-v1/pom.xml index dec5344dcd72..f64b96e47d5e 100644 --- a/google-api-grpc/grpc-google-cloud-os-login-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-os-login-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-os-login-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-os-login-v1 GRPC library for grpc-google-cloud-os-login-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-pubsub-v1/pom.xml b/google-api-grpc/grpc-google-cloud-pubsub-v1/pom.xml index 9e043550a949..44cf7dc331bd 100644 --- a/google-api-grpc/grpc-google-cloud-pubsub-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-pubsub-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-pubsub-v1 - 1.38.1-SNAPSHOT + 1.40.0 grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-redis-v1/pom.xml b/google-api-grpc/grpc-google-cloud-redis-v1/pom.xml index 2baa42a8902d..b76d6ba084e3 100644 --- a/google-api-grpc/grpc-google-cloud-redis-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-redis-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-redis-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-redis-v1 GRPC library for grpc-google-cloud-redis-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-redis-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-redis-v1beta1/pom.xml index 630ddb008284..45966a0cd5aa 100644 --- a/google-api-grpc/grpc-google-cloud-redis-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-redis-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-redis-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-redis-v1beta1 GRPC library for grpc-google-cloud-redis-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-scheduler-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-scheduler-v1beta1/pom.xml index 601976e73deb..da4b0bad5d15 100644 --- a/google-api-grpc/grpc-google-cloud-scheduler-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-scheduler-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-scheduler-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-scheduler-v1beta1 GRPC library for grpc-google-cloud-scheduler-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-securitycenter-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-securitycenter-v1beta1/pom.xml index b6ed225cf321..b6d8b289d5bb 100644 --- a/google-api-grpc/grpc-google-cloud-securitycenter-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-securitycenter-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-securitycenter-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-securitycenter-v1beta1 GRPC library for grpc-google-cloud-securitycenter-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-spanner-admin-database-v1/pom.xml b/google-api-grpc/grpc-google-cloud-spanner-admin-database-v1/pom.xml index 360024ee7b51..f637f8af6d7c 100644 --- a/google-api-grpc/grpc-google-cloud-spanner-admin-database-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-spanner-admin-database-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-spanner-admin-database-v1 - 1.1.1-SNAPSHOT + 1.3.0 grpc-google-cloud-spanner-admin-database-v1 GRPC library for grpc-google-cloud-spanner-admin-database-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-spanner-admin-instance-v1/pom.xml b/google-api-grpc/grpc-google-cloud-spanner-admin-instance-v1/pom.xml index 06a8699b929b..5de77c02e0c3 100644 --- a/google-api-grpc/grpc-google-cloud-spanner-admin-instance-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-spanner-admin-instance-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-spanner-admin-instance-v1 - 1.1.1-SNAPSHOT + 1.3.0 grpc-google-cloud-spanner-admin-instance-v1 GRPC library for grpc-google-cloud-spanner-admin-instance-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-spanner-v1/pom.xml b/google-api-grpc/grpc-google-cloud-spanner-v1/pom.xml index 694606e31ffe..ca3a56944777 100644 --- a/google-api-grpc/grpc-google-cloud-spanner-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-spanner-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-spanner-v1 - 1.1.1-SNAPSHOT + 1.3.0 grpc-google-cloud-spanner-v1 GRPC library for grpc-google-cloud-spanner-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-speech-v1/pom.xml b/google-api-grpc/grpc-google-cloud-speech-v1/pom.xml index 8fe5e8c83f7a..c112d73cf0a0 100644 --- a/google-api-grpc/grpc-google-cloud-speech-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-speech-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-speech-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-speech-v1 GRPC library for grpc-google-cloud-speech-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-speech-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-speech-v1beta1/pom.xml index 293bedb04e41..238d5f03c0fd 100644 --- a/google-api-grpc/grpc-google-cloud-speech-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-speech-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-speech-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-speech-v1beta1 GRPC library for grpc-google-cloud-speech-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-speech-v1p1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-speech-v1p1beta1/pom.xml index 3711781610c5..ab11f6298b21 100644 --- a/google-api-grpc/grpc-google-cloud-speech-v1p1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-speech-v1p1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-speech-v1p1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-speech-v1p1beta1 GRPC library for grpc-google-cloud-speech-v1p1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-tasks-v2beta2/pom.xml b/google-api-grpc/grpc-google-cloud-tasks-v2beta2/pom.xml index b2a958290fa9..f636740f4a77 100644 --- a/google-api-grpc/grpc-google-cloud-tasks-v2beta2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-tasks-v2beta2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-tasks-v2beta2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-tasks-v2beta2 GRPC library for grpc-google-cloud-tasks-v2beta2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-tasks-v2beta3/pom.xml b/google-api-grpc/grpc-google-cloud-tasks-v2beta3/pom.xml index 941f6b080566..06efb21bfe47 100644 --- a/google-api-grpc/grpc-google-cloud-tasks-v2beta3/pom.xml +++ b/google-api-grpc/grpc-google-cloud-tasks-v2beta3/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-tasks-v2beta3 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-tasks-v2beta3 GRPC library for grpc-google-cloud-tasks-v2beta3 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-texttospeech-v1/pom.xml b/google-api-grpc/grpc-google-cloud-texttospeech-v1/pom.xml index fdcb1d0f25c2..566d316e5b6f 100644 --- a/google-api-grpc/grpc-google-cloud-texttospeech-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-texttospeech-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-texttospeech-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-texttospeech-v1 GRPC library for grpc-google-cloud-texttospeech-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-texttospeech-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-texttospeech-v1beta1/pom.xml index f106ce3ca91c..8e03ea1338ae 100644 --- a/google-api-grpc/grpc-google-cloud-texttospeech-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-texttospeech-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-texttospeech-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-texttospeech-v1beta1 GRPC library for grpc-google-cloud-texttospeech-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-trace-v1/pom.xml b/google-api-grpc/grpc-google-cloud-trace-v1/pom.xml index 8516ba609cb7..e2e29ba3ab06 100644 --- a/google-api-grpc/grpc-google-cloud-trace-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-trace-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-trace-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-trace-v1 GRPC library for grpc-google-cloud-trace-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-trace-v2/pom.xml b/google-api-grpc/grpc-google-cloud-trace-v2/pom.xml index 413fdff34be8..4f523c55d67e 100644 --- a/google-api-grpc/grpc-google-cloud-trace-v2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-trace-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-trace-v2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-trace-v2 GRPC library for grpc-google-cloud-trace-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-video-intelligence-v1/pom.xml b/google-api-grpc/grpc-google-cloud-video-intelligence-v1/pom.xml index d5d298214b4b..c5888cc8f6c2 100644 --- a/google-api-grpc/grpc-google-cloud-video-intelligence-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-video-intelligence-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-video-intelligence-v1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-video-intelligence-v1 GRPC library for grpc-google-cloud-video-intelligence-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-video-intelligence-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-video-intelligence-v1beta1/pom.xml index 0fb8bc1404ca..303b72a9072e 100644 --- a/google-api-grpc/grpc-google-cloud-video-intelligence-v1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-video-intelligence-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-video-intelligence-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-video-intelligence-v1beta1 GRPC library for grpc-google-cloud-video-intelligence-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-video-intelligence-v1beta2/pom.xml b/google-api-grpc/grpc-google-cloud-video-intelligence-v1beta2/pom.xml index f3b7ceb281e1..b8c672de2737 100644 --- a/google-api-grpc/grpc-google-cloud-video-intelligence-v1beta2/pom.xml +++ b/google-api-grpc/grpc-google-cloud-video-intelligence-v1beta2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-video-intelligence-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-video-intelligence-v1beta2 GRPC library for grpc-google-cloud-video-intelligence-v1beta2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-video-intelligence-v1p1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p1beta1/pom.xml index 1fddfb22b211..36f97cd0aeeb 100644 --- a/google-api-grpc/grpc-google-cloud-video-intelligence-v1p1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-video-intelligence-v1p1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-video-intelligence-v1p1beta1 GRPC library for grpc-google-cloud-video-intelligence-v1p1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-video-intelligence-v1p2beta1/pom.xml b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p2beta1/pom.xml index b163e7cec92d..b0a5096477ed 100644 --- a/google-api-grpc/grpc-google-cloud-video-intelligence-v1p2beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p2beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-video-intelligence-v1p2beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-video-intelligence-v1p2beta1 GRPC library for grpc-google-cloud-video-intelligence-v1p2beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-vision-v1/pom.xml b/google-api-grpc/grpc-google-cloud-vision-v1/pom.xml index 4c0c92979cd3..65c0b71aeb6f 100644 --- a/google-api-grpc/grpc-google-cloud-vision-v1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-vision-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-vision-v1 - 1.38.1-SNAPSHOT + 1.40.0 grpc-google-cloud-vision-v1 GRPC library for grpc-google-cloud-vision-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-vision-v1p1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-vision-v1p1beta1/pom.xml index fd60f14b1e59..fba05d75820d 100644 --- a/google-api-grpc/grpc-google-cloud-vision-v1p1beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-vision-v1p1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-vision-v1p1beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-vision-v1p1beta1 GRPC library for grpc-google-cloud-vision-v1p1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-vision-v1p2beta1/pom.xml b/google-api-grpc/grpc-google-cloud-vision-v1p2beta1/pom.xml index 65ff33e033d9..cf85242e32bc 100644 --- a/google-api-grpc/grpc-google-cloud-vision-v1p2beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-vision-v1p2beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-vision-v1p2beta1 - 1.38.1-SNAPSHOT + 1.40.0 grpc-google-cloud-vision-v1p2beta1 GRPC library for grpc-google-cloud-vision-v1p2beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-vision-v1p3beta1/pom.xml b/google-api-grpc/grpc-google-cloud-vision-v1p3beta1/pom.xml index d2863dbeba67..270462d7e719 100644 --- a/google-api-grpc/grpc-google-cloud-vision-v1p3beta1/pom.xml +++ b/google-api-grpc/grpc-google-cloud-vision-v1p3beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-vision-v1p3beta1 - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-vision-v1p3beta1 GRPC library for grpc-google-cloud-vision-v1p3beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/grpc-google-cloud-websecurityscanner-v1alpha/pom.xml b/google-api-grpc/grpc-google-cloud-websecurityscanner-v1alpha/pom.xml index 9b8473c5c2df..7fe538a221d4 100644 --- a/google-api-grpc/grpc-google-cloud-websecurityscanner-v1alpha/pom.xml +++ b/google-api-grpc/grpc-google-cloud-websecurityscanner-v1alpha/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 grpc-google-cloud-websecurityscanner-v1alpha - 0.39.1-SNAPSHOT + 0.41.0 grpc-google-cloud-websecurityscanner-v1alpha GRPC library for grpc-google-cloud-websecurityscanner-v1alpha com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/pom.xml b/google-api-grpc/pom.xml index f71071411b97..a7af2cf3e195 100644 --- a/google-api-grpc/pom.xml +++ b/google-api-grpc/pom.xml @@ -4,7 +4,7 @@ com.google.api.grpc google-api-grpc pom - 0.39.1-SNAPSHOT + 0.41.0 Google Cloud API gRPC https://github.com/googleapis/google-cloud-java/tree/master/google-api-grpc @@ -142,507 +142,507 @@ com.google.api.grpc proto-google-cloud-asset-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-asset-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-automl-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-automl-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-bigtable-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-bigtable-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-bigquerystorage-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-bigquerystorage-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-container-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-container-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-containeranalysis-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-containeranalysis-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-dataproc-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-dataproc-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-dataproc-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-dataproc-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-datastore-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-dlp-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-dlp-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-dialogflow-v2beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-dialogflow-v2beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-dialogflow-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-dialogflow-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-error-reporting-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-error-reporting-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-firestore-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-firestore-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-kms-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-kms-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-language-v1 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc grpc-google-cloud-language-v1 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc proto-google-cloud-language-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-language-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-logging-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-logging-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-monitoring-v3 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc grpc-google-cloud-monitoring-v3 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc proto-google-cloud-os-login-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-os-login-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc proto-google-cloud-redis-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-redis-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-redis-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-redis-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-scheduler-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-scheduler-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-spanner-v1 - 1.1.1-SNAPSHOT + 1.3.0 com.google.api.grpc grpc-google-cloud-spanner-v1 - 1.1.1-SNAPSHOT + 1.3.0 com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 1.1.1-SNAPSHOT + 1.3.0 com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 1.1.1-SNAPSHOT + 1.3.0 com.google.api.grpc proto-google-cloud-spanner-admin-instance-v1 - 1.1.1-SNAPSHOT + 1.3.0 com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 1.1.1-SNAPSHOT + 1.3.0 com.google.api.grpc proto-google-cloud-speech-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-speech-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-speech-v1p1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-speech-v1p1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-speech-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-speech-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-tasks-v2beta2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-tasks-v2beta2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-tasks-v2beta3 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-tasks-v2beta3 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-texttospeech-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-texttospeech-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-texttospeech-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-texttospeech-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-trace-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-trace-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-trace-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-trace-v2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-vision-v1 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc grpc-google-cloud-vision-v1 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc proto-google-cloud-vision-v1p1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-vision-v1p1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-vision-v1p2beta1 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc grpc-google-cloud-vision-v1p2beta1 - 1.38.1-SNAPSHOT + 1.40.0 com.google.api.grpc proto-google-cloud-vision-v1p3beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-vision-v1p3beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p2beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p2beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-iot-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-iot-v1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-websecurityscanner-v1alpha - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1alpha - 0.39.1-SNAPSHOT + 0.41.0 com.google.api.grpc proto-google-cloud-iamcredentials-v1 - 0.1.1-alpha-SNAPSHOT + 0.3.0-alpha com.google.api.grpc grpc-google-cloud-iamcredentials-v1 - 0.1.1-alpha-SNAPSHOT + 0.3.0-alpha @@ -791,57 +791,6 @@ 3.4 true - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.8.1 - - - - index - dependency-info - project-team - cim - issue-tracking - license - scm - dependency-management - distribution-management - summary - modules - - - - - true - true - true - true - ${project.artifactId} - jar - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.1 - - - html - - javadoc - - - - - true - protected - true - ${project.build.directory}/javadoc - - - @@ -865,12 +814,13 @@ + org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 2.8.1 @@ -889,8 +839,6 @@ - true - true true true ${project.artifactId} @@ -905,6 +853,7 @@ html + aggregate javadoc @@ -960,6 +909,12 @@ sign + + + --pinentry-mode + loopback + + diff --git a/google-api-grpc/proto-google-cloud-asset-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-asset-v1beta1/pom.xml index 53c2c596bf80..b993fac1c654 100644 --- a/google-api-grpc/proto-google-cloud-asset-v1beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-asset-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-asset-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-asset-v1beta1 PROTO library for proto-google-cloud-asset-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-automl-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-automl-v1beta1/pom.xml index 02135b9fea46..6dbe02f3f376 100644 --- a/google-api-grpc/proto-google-cloud-automl-v1beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-automl-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-automl-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-automl-v1beta1 PROTO library for proto-google-cloud-automl-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-bigquerydatatransfer-v1/pom.xml b/google-api-grpc/proto-google-cloud-bigquerydatatransfer-v1/pom.xml index 6dc1ca7425f5..d6b27a2d3fb5 100644 --- a/google-api-grpc/proto-google-cloud-bigquerydatatransfer-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-bigquerydatatransfer-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-bigquerydatatransfer-v1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-bigquerydatatransfer-v1 PROTO library for proto-google-cloud-bigquerydatatransfer-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/pom.xml index 4b213ffa9f99..60e5f92ffd19 100644 --- a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-bigquerystorage-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-bigquerystorage-v1beta1 PROTO library for proto-google-cloud-bigquerystorage-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-bigtable-admin-v2/pom.xml b/google-api-grpc/proto-google-cloud-bigtable-admin-v2/pom.xml index beeef70361a7..c916b62a1e14 100644 --- a/google-api-grpc/proto-google-cloud-bigtable-admin-v2/pom.xml +++ b/google-api-grpc/proto-google-cloud-bigtable-admin-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-bigtable-admin-v2 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-bigtable-admin-v2 PROTO library for proto-google-cloud-bigtable-admin-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-bigtable-v2/pom.xml b/google-api-grpc/proto-google-cloud-bigtable-v2/pom.xml index 1f23d9ec6cde..6ce84d14331e 100644 --- a/google-api-grpc/proto-google-cloud-bigtable-v2/pom.xml +++ b/google-api-grpc/proto-google-cloud-bigtable-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-bigtable-v2 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-bigtable-v2 PROTO library for proto-google-cloud-bigtable-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-container-v1/pom.xml b/google-api-grpc/proto-google-cloud-container-v1/pom.xml index ddbc82ce4c53..181cac1a0562 100644 --- a/google-api-grpc/proto-google-cloud-container-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-container-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-container-v1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-container-v1 PROTO library for proto-google-cloud-container-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/pom.xml index bfb9d5175a1a..60bf30a2a785 100644 --- a/google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-containeranalysis-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-containeranalysis-v1beta1 PROTO library for proto-google-cloud-containeranalysis-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-dataproc-v1/pom.xml b/google-api-grpc/proto-google-cloud-dataproc-v1/pom.xml index 5cf1a4c0e003..39527ea3311d 100644 --- a/google-api-grpc/proto-google-cloud-dataproc-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-dataproc-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-dataproc-v1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-dataproc-v1 PROTO library for proto-google-cloud-dataproc-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-dataproc-v1beta2/pom.xml b/google-api-grpc/proto-google-cloud-dataproc-v1beta2/pom.xml index 5286293c27eb..c2b8a7ac0600 100644 --- a/google-api-grpc/proto-google-cloud-dataproc-v1beta2/pom.xml +++ b/google-api-grpc/proto-google-cloud-dataproc-v1beta2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-dataproc-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-dataproc-v1beta2 PROTO library for proto-google-cloud-dataproc-v1beta2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-datastore-v1/pom.xml b/google-api-grpc/proto-google-cloud-datastore-v1/pom.xml index 9e1ad468556f..2f33d58eeee6 100644 --- a/google-api-grpc/proto-google-cloud-datastore-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-datastore-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-datastore-v1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-datastore-v1 PROTO library for proto-google-cloud-datastore-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-dialogflow-v2/pom.xml b/google-api-grpc/proto-google-cloud-dialogflow-v2/pom.xml index 385e1054acf3..d04caa054a2d 100644 --- a/google-api-grpc/proto-google-cloud-dialogflow-v2/pom.xml +++ b/google-api-grpc/proto-google-cloud-dialogflow-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-dialogflow-v2 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-dialogflow-v2 PROTO library for proto-google-cloud-dialogflow-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-dialogflow-v2beta1/pom.xml b/google-api-grpc/proto-google-cloud-dialogflow-v2beta1/pom.xml index 1d3d7ad59c4f..867f09a8e81c 100644 --- a/google-api-grpc/proto-google-cloud-dialogflow-v2beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-dialogflow-v2beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-dialogflow-v2beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-dialogflow-v2beta1 PROTO library for proto-google-cloud-dialogflow-v2beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/pom.xml b/google-api-grpc/proto-google-cloud-dlp-v2/pom.xml index 3fe3455ceca8..ec369043d0c8 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/pom.xml +++ b/google-api-grpc/proto-google-cloud-dlp-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-dlp-v2 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-dlp-v2 PROTO library for proto-google-cloud-dlp-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-error-reporting-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-error-reporting-v1beta1/pom.xml index bfc13a5208a0..5cd14166060a 100644 --- a/google-api-grpc/proto-google-cloud-error-reporting-v1beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-error-reporting-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-error-reporting-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-error-reporting-v1beta1 PROTO library for proto-google-cloud-error-reporting-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-firestore-v1beta1/pom.xml index e109d87fdf99..4169093fe241 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-firestore-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-firestore-v1beta1 PROTO library for proto-google-cloud-firestore-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-iamcredentials-v1/pom.xml b/google-api-grpc/proto-google-cloud-iamcredentials-v1/pom.xml index e0ae015fef9b..5febe0dc18f8 100644 --- a/google-api-grpc/proto-google-cloud-iamcredentials-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-iamcredentials-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-iamcredentials-v1 - 0.1.1-alpha-SNAPSHOT + 0.3.0-alpha proto-google-cloud-iamcredentials-v1 PROTO library for proto-google-cloud-iamcredentials-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenRequest.java b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenRequest.java new file mode 100644 index 000000000000..9886d1c699fd --- /dev/null +++ b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenRequest.java @@ -0,0 +1,1367 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/iam/credentials/v1/common.proto + +package com.google.cloud.iam.credentials.v1; + +/** Protobuf type {@code google.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest} */ +public final class GenerateIdentityBindingAccessTokenRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) + GenerateIdentityBindingAccessTokenRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateIdentityBindingAccessTokenRequest.newBuilder() to construct. + private GenerateIdentityBindingAccessTokenRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateIdentityBindingAccessTokenRequest() { + name_ = ""; + scope_ = com.google.protobuf.LazyStringArrayList.EMPTY; + jwt_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenerateIdentityBindingAccessTokenRequest( + 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 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + scope_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + scope_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + jwt_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(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_ & 0x00000002) == 0x00000002)) { + scope_ = scope_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest.class, + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest.Builder + .class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the service account for which the credentials
+   * are requested, in the following format:
+   * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the service account for which the credentials
+   * are requested, in the following format:
+   * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPE_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList scope_; + /** + * + * + *
+   * Code to identify the scopes to be included in the OAuth 2.0 access token.
+   * See https://developers.google.com/identity/protocols/googlescopes for more
+   * information.
+   * At least one value required.
+   * 
+ * + * repeated string scope = 2; + */ + public com.google.protobuf.ProtocolStringList getScopeList() { + return scope_; + } + /** + * + * + *
+   * Code to identify the scopes to be included in the OAuth 2.0 access token.
+   * See https://developers.google.com/identity/protocols/googlescopes for more
+   * information.
+   * At least one value required.
+   * 
+ * + * repeated string scope = 2; + */ + public int getScopeCount() { + return scope_.size(); + } + /** + * + * + *
+   * Code to identify the scopes to be included in the OAuth 2.0 access token.
+   * See https://developers.google.com/identity/protocols/googlescopes for more
+   * information.
+   * At least one value required.
+   * 
+ * + * repeated string scope = 2; + */ + public java.lang.String getScope(int index) { + return scope_.get(index); + } + /** + * + * + *
+   * Code to identify the scopes to be included in the OAuth 2.0 access token.
+   * See https://developers.google.com/identity/protocols/googlescopes for more
+   * information.
+   * At least one value required.
+   * 
+ * + * repeated string scope = 2; + */ + public com.google.protobuf.ByteString getScopeBytes(int index) { + return scope_.getByteString(index); + } + + public static final int JWT_FIELD_NUMBER = 3; + private volatile java.lang.Object jwt_; + /** + * + * + *
+   * Required. Input token.
+   * Must be in JWT format according to
+   * RFC7523 (https://tools.ietf.org/html/rfc7523)
+   * and must have 'kid' field in the header.
+   * Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+   * Mandatory payload fields (along the lines of RFC 7523, section 3):
+   * - iss: issuer of the token. Must provide a discovery document at
+   *        $iss/.well-known/openid-configuration . The document needs to be
+   *        formatted according to section 4.2 of the OpenID Connect Discovery
+   *        1.0 specification.
+   * - iat: Issue time in seconds since epoch. Must be in the past.
+   * - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+   *        after iat. We recommend to create tokens that last shorter than 6
+   *        hours to improve security unless business reasons mandate longer
+   *        expiration times. Shorter token lifetimes are generally more secure
+   *        since tokens that have been exfiltrated by attackers can be used for
+   *        a shorter time. you can configure the maximum lifetime of the
+   *        incoming token in the configuration of the mapper.
+   *        The resulting Google token will expire within an hour or at "exp",
+   *        whichever is earlier.
+   * - sub: JWT subject, identity asserted in the JWT.
+   * - aud: Configured in the mapper policy. By default the service account
+   *        email.
+   * Claims from the incoming token can be transferred into the output token
+   * accoding to the mapper configuration. The outgoing claim size is limited.
+   * Outgoing claims size must be less than 4kB serialized as JSON without
+   * whitespace.
+   * Example header:
+   * {
+   *   "alg": "RS256",
+   *   "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+   * }
+   * Example payload:
+   * {
+   *   "iss": "https://accounts.google.com",
+   *   "iat": 1517963104,
+   *   "exp": 1517966704,
+   *   "aud": "https://iamcredentials.googleapis.com/",
+   *   "sub": "113475438248934895348",
+   *   "my_claims": {
+   *     "additional_claim": "value"
+   *   }
+   * }
+   * 
+ * + * string jwt = 3; + */ + public java.lang.String getJwt() { + java.lang.Object ref = jwt_; + 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(); + jwt_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Input token.
+   * Must be in JWT format according to
+   * RFC7523 (https://tools.ietf.org/html/rfc7523)
+   * and must have 'kid' field in the header.
+   * Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+   * Mandatory payload fields (along the lines of RFC 7523, section 3):
+   * - iss: issuer of the token. Must provide a discovery document at
+   *        $iss/.well-known/openid-configuration . The document needs to be
+   *        formatted according to section 4.2 of the OpenID Connect Discovery
+   *        1.0 specification.
+   * - iat: Issue time in seconds since epoch. Must be in the past.
+   * - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+   *        after iat. We recommend to create tokens that last shorter than 6
+   *        hours to improve security unless business reasons mandate longer
+   *        expiration times. Shorter token lifetimes are generally more secure
+   *        since tokens that have been exfiltrated by attackers can be used for
+   *        a shorter time. you can configure the maximum lifetime of the
+   *        incoming token in the configuration of the mapper.
+   *        The resulting Google token will expire within an hour or at "exp",
+   *        whichever is earlier.
+   * - sub: JWT subject, identity asserted in the JWT.
+   * - aud: Configured in the mapper policy. By default the service account
+   *        email.
+   * Claims from the incoming token can be transferred into the output token
+   * accoding to the mapper configuration. The outgoing claim size is limited.
+   * Outgoing claims size must be less than 4kB serialized as JSON without
+   * whitespace.
+   * Example header:
+   * {
+   *   "alg": "RS256",
+   *   "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+   * }
+   * Example payload:
+   * {
+   *   "iss": "https://accounts.google.com",
+   *   "iat": 1517963104,
+   *   "exp": 1517966704,
+   *   "aud": "https://iamcredentials.googleapis.com/",
+   *   "sub": "113475438248934895348",
+   *   "my_claims": {
+   *     "additional_claim": "value"
+   *   }
+   * }
+   * 
+ * + * string jwt = 3; + */ + public com.google.protobuf.ByteString getJwtBytes() { + java.lang.Object ref = jwt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jwt_ = 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < scope_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scope_.getRaw(i)); + } + if (!getJwtBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jwt_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < scope_.size(); i++) { + dataSize += computeStringSizeNoTag(scope_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopeList().size(); + } + if (!getJwtBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jwt_); + } + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest)) { + return super.equals(obj); + } + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest other = + (com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) obj; + + boolean result = true; + result = result && getName().equals(other.getName()); + result = result && getScopeList().equals(other.getScopeList()); + result = result && getJwt().equals(other.getJwt()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getScopeCount() > 0) { + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScopeList().hashCode(); + } + hash = (37 * hash) + JWT_FIELD_NUMBER; + hash = (53 * hash) + getJwt().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest 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; + } + /** Protobuf type {@code google.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest.class, + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest.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(); + name_ = ""; + + scope_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + jwt_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + getDefaultInstanceForType() { + return com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest build() { + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + buildPartial() { + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest result = + new com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + scope_ = scope_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.scope_ = scope_; + result.jwt_ = jwt_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) { + return mergeFrom( + (com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest other) { + if (other + == com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.scope_.isEmpty()) { + if (scope_.isEmpty()) { + scope_ = other.scope_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureScopeIsMutable(); + scope_.addAll(other.scope_); + } + onChanged(); + } + if (!other.getJwt().isEmpty()) { + jwt_ = other.jwt_; + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the service account for which the credentials
+     * are requested, in the following format:
+     * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the service account for which the credentials
+     * are requested, in the following format:
+     * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the service account for which the credentials
+     * are requested, in the following format:
+     * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the service account for which the credentials
+     * are requested, in the following format:
+     * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the service account for which the credentials
+     * are requested, in the following format:
+     * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList scope_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureScopeIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + scope_ = new com.google.protobuf.LazyStringArrayList(scope_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Code to identify the scopes to be included in the OAuth 2.0 access token.
+     * See https://developers.google.com/identity/protocols/googlescopes for more
+     * information.
+     * At least one value required.
+     * 
+ * + * repeated string scope = 2; + */ + public com.google.protobuf.ProtocolStringList getScopeList() { + return scope_.getUnmodifiableView(); + } + /** + * + * + *
+     * Code to identify the scopes to be included in the OAuth 2.0 access token.
+     * See https://developers.google.com/identity/protocols/googlescopes for more
+     * information.
+     * At least one value required.
+     * 
+ * + * repeated string scope = 2; + */ + public int getScopeCount() { + return scope_.size(); + } + /** + * + * + *
+     * Code to identify the scopes to be included in the OAuth 2.0 access token.
+     * See https://developers.google.com/identity/protocols/googlescopes for more
+     * information.
+     * At least one value required.
+     * 
+ * + * repeated string scope = 2; + */ + public java.lang.String getScope(int index) { + return scope_.get(index); + } + /** + * + * + *
+     * Code to identify the scopes to be included in the OAuth 2.0 access token.
+     * See https://developers.google.com/identity/protocols/googlescopes for more
+     * information.
+     * At least one value required.
+     * 
+ * + * repeated string scope = 2; + */ + public com.google.protobuf.ByteString getScopeBytes(int index) { + return scope_.getByteString(index); + } + /** + * + * + *
+     * Code to identify the scopes to be included in the OAuth 2.0 access token.
+     * See https://developers.google.com/identity/protocols/googlescopes for more
+     * information.
+     * At least one value required.
+     * 
+ * + * repeated string scope = 2; + */ + public Builder setScope(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopeIsMutable(); + scope_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Code to identify the scopes to be included in the OAuth 2.0 access token.
+     * See https://developers.google.com/identity/protocols/googlescopes for more
+     * information.
+     * At least one value required.
+     * 
+ * + * repeated string scope = 2; + */ + public Builder addScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopeIsMutable(); + scope_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Code to identify the scopes to be included in the OAuth 2.0 access token.
+     * See https://developers.google.com/identity/protocols/googlescopes for more
+     * information.
+     * At least one value required.
+     * 
+ * + * repeated string scope = 2; + */ + public Builder addAllScope(java.lang.Iterable values) { + ensureScopeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scope_); + onChanged(); + return this; + } + /** + * + * + *
+     * Code to identify the scopes to be included in the OAuth 2.0 access token.
+     * See https://developers.google.com/identity/protocols/googlescopes for more
+     * information.
+     * At least one value required.
+     * 
+ * + * repeated string scope = 2; + */ + public Builder clearScope() { + scope_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Code to identify the scopes to be included in the OAuth 2.0 access token.
+     * See https://developers.google.com/identity/protocols/googlescopes for more
+     * information.
+     * At least one value required.
+     * 
+ * + * repeated string scope = 2; + */ + public Builder addScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopeIsMutable(); + scope_.add(value); + onChanged(); + return this; + } + + private java.lang.Object jwt_ = ""; + /** + * + * + *
+     * Required. Input token.
+     * Must be in JWT format according to
+     * RFC7523 (https://tools.ietf.org/html/rfc7523)
+     * and must have 'kid' field in the header.
+     * Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+     * Mandatory payload fields (along the lines of RFC 7523, section 3):
+     * - iss: issuer of the token. Must provide a discovery document at
+     *        $iss/.well-known/openid-configuration . The document needs to be
+     *        formatted according to section 4.2 of the OpenID Connect Discovery
+     *        1.0 specification.
+     * - iat: Issue time in seconds since epoch. Must be in the past.
+     * - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+     *        after iat. We recommend to create tokens that last shorter than 6
+     *        hours to improve security unless business reasons mandate longer
+     *        expiration times. Shorter token lifetimes are generally more secure
+     *        since tokens that have been exfiltrated by attackers can be used for
+     *        a shorter time. you can configure the maximum lifetime of the
+     *        incoming token in the configuration of the mapper.
+     *        The resulting Google token will expire within an hour or at "exp",
+     *        whichever is earlier.
+     * - sub: JWT subject, identity asserted in the JWT.
+     * - aud: Configured in the mapper policy. By default the service account
+     *        email.
+     * Claims from the incoming token can be transferred into the output token
+     * accoding to the mapper configuration. The outgoing claim size is limited.
+     * Outgoing claims size must be less than 4kB serialized as JSON without
+     * whitespace.
+     * Example header:
+     * {
+     *   "alg": "RS256",
+     *   "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+     * }
+     * Example payload:
+     * {
+     *   "iss": "https://accounts.google.com",
+     *   "iat": 1517963104,
+     *   "exp": 1517966704,
+     *   "aud": "https://iamcredentials.googleapis.com/",
+     *   "sub": "113475438248934895348",
+     *   "my_claims": {
+     *     "additional_claim": "value"
+     *   }
+     * }
+     * 
+ * + * string jwt = 3; + */ + public java.lang.String getJwt() { + java.lang.Object ref = jwt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jwt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Input token.
+     * Must be in JWT format according to
+     * RFC7523 (https://tools.ietf.org/html/rfc7523)
+     * and must have 'kid' field in the header.
+     * Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+     * Mandatory payload fields (along the lines of RFC 7523, section 3):
+     * - iss: issuer of the token. Must provide a discovery document at
+     *        $iss/.well-known/openid-configuration . The document needs to be
+     *        formatted according to section 4.2 of the OpenID Connect Discovery
+     *        1.0 specification.
+     * - iat: Issue time in seconds since epoch. Must be in the past.
+     * - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+     *        after iat. We recommend to create tokens that last shorter than 6
+     *        hours to improve security unless business reasons mandate longer
+     *        expiration times. Shorter token lifetimes are generally more secure
+     *        since tokens that have been exfiltrated by attackers can be used for
+     *        a shorter time. you can configure the maximum lifetime of the
+     *        incoming token in the configuration of the mapper.
+     *        The resulting Google token will expire within an hour or at "exp",
+     *        whichever is earlier.
+     * - sub: JWT subject, identity asserted in the JWT.
+     * - aud: Configured in the mapper policy. By default the service account
+     *        email.
+     * Claims from the incoming token can be transferred into the output token
+     * accoding to the mapper configuration. The outgoing claim size is limited.
+     * Outgoing claims size must be less than 4kB serialized as JSON without
+     * whitespace.
+     * Example header:
+     * {
+     *   "alg": "RS256",
+     *   "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+     * }
+     * Example payload:
+     * {
+     *   "iss": "https://accounts.google.com",
+     *   "iat": 1517963104,
+     *   "exp": 1517966704,
+     *   "aud": "https://iamcredentials.googleapis.com/",
+     *   "sub": "113475438248934895348",
+     *   "my_claims": {
+     *     "additional_claim": "value"
+     *   }
+     * }
+     * 
+ * + * string jwt = 3; + */ + public com.google.protobuf.ByteString getJwtBytes() { + java.lang.Object ref = jwt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jwt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Input token.
+     * Must be in JWT format according to
+     * RFC7523 (https://tools.ietf.org/html/rfc7523)
+     * and must have 'kid' field in the header.
+     * Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+     * Mandatory payload fields (along the lines of RFC 7523, section 3):
+     * - iss: issuer of the token. Must provide a discovery document at
+     *        $iss/.well-known/openid-configuration . The document needs to be
+     *        formatted according to section 4.2 of the OpenID Connect Discovery
+     *        1.0 specification.
+     * - iat: Issue time in seconds since epoch. Must be in the past.
+     * - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+     *        after iat. We recommend to create tokens that last shorter than 6
+     *        hours to improve security unless business reasons mandate longer
+     *        expiration times. Shorter token lifetimes are generally more secure
+     *        since tokens that have been exfiltrated by attackers can be used for
+     *        a shorter time. you can configure the maximum lifetime of the
+     *        incoming token in the configuration of the mapper.
+     *        The resulting Google token will expire within an hour or at "exp",
+     *        whichever is earlier.
+     * - sub: JWT subject, identity asserted in the JWT.
+     * - aud: Configured in the mapper policy. By default the service account
+     *        email.
+     * Claims from the incoming token can be transferred into the output token
+     * accoding to the mapper configuration. The outgoing claim size is limited.
+     * Outgoing claims size must be less than 4kB serialized as JSON without
+     * whitespace.
+     * Example header:
+     * {
+     *   "alg": "RS256",
+     *   "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+     * }
+     * Example payload:
+     * {
+     *   "iss": "https://accounts.google.com",
+     *   "iat": 1517963104,
+     *   "exp": 1517966704,
+     *   "aud": "https://iamcredentials.googleapis.com/",
+     *   "sub": "113475438248934895348",
+     *   "my_claims": {
+     *     "additional_claim": "value"
+     *   }
+     * }
+     * 
+ * + * string jwt = 3; + */ + public Builder setJwt(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jwt_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Input token.
+     * Must be in JWT format according to
+     * RFC7523 (https://tools.ietf.org/html/rfc7523)
+     * and must have 'kid' field in the header.
+     * Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+     * Mandatory payload fields (along the lines of RFC 7523, section 3):
+     * - iss: issuer of the token. Must provide a discovery document at
+     *        $iss/.well-known/openid-configuration . The document needs to be
+     *        formatted according to section 4.2 of the OpenID Connect Discovery
+     *        1.0 specification.
+     * - iat: Issue time in seconds since epoch. Must be in the past.
+     * - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+     *        after iat. We recommend to create tokens that last shorter than 6
+     *        hours to improve security unless business reasons mandate longer
+     *        expiration times. Shorter token lifetimes are generally more secure
+     *        since tokens that have been exfiltrated by attackers can be used for
+     *        a shorter time. you can configure the maximum lifetime of the
+     *        incoming token in the configuration of the mapper.
+     *        The resulting Google token will expire within an hour or at "exp",
+     *        whichever is earlier.
+     * - sub: JWT subject, identity asserted in the JWT.
+     * - aud: Configured in the mapper policy. By default the service account
+     *        email.
+     * Claims from the incoming token can be transferred into the output token
+     * accoding to the mapper configuration. The outgoing claim size is limited.
+     * Outgoing claims size must be less than 4kB serialized as JSON without
+     * whitespace.
+     * Example header:
+     * {
+     *   "alg": "RS256",
+     *   "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+     * }
+     * Example payload:
+     * {
+     *   "iss": "https://accounts.google.com",
+     *   "iat": 1517963104,
+     *   "exp": 1517966704,
+     *   "aud": "https://iamcredentials.googleapis.com/",
+     *   "sub": "113475438248934895348",
+     *   "my_claims": {
+     *     "additional_claim": "value"
+     *   }
+     * }
+     * 
+ * + * string jwt = 3; + */ + public Builder clearJwt() { + + jwt_ = getDefaultInstance().getJwt(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Input token.
+     * Must be in JWT format according to
+     * RFC7523 (https://tools.ietf.org/html/rfc7523)
+     * and must have 'kid' field in the header.
+     * Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+     * Mandatory payload fields (along the lines of RFC 7523, section 3):
+     * - iss: issuer of the token. Must provide a discovery document at
+     *        $iss/.well-known/openid-configuration . The document needs to be
+     *        formatted according to section 4.2 of the OpenID Connect Discovery
+     *        1.0 specification.
+     * - iat: Issue time in seconds since epoch. Must be in the past.
+     * - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+     *        after iat. We recommend to create tokens that last shorter than 6
+     *        hours to improve security unless business reasons mandate longer
+     *        expiration times. Shorter token lifetimes are generally more secure
+     *        since tokens that have been exfiltrated by attackers can be used for
+     *        a shorter time. you can configure the maximum lifetime of the
+     *        incoming token in the configuration of the mapper.
+     *        The resulting Google token will expire within an hour or at "exp",
+     *        whichever is earlier.
+     * - sub: JWT subject, identity asserted in the JWT.
+     * - aud: Configured in the mapper policy. By default the service account
+     *        email.
+     * Claims from the incoming token can be transferred into the output token
+     * accoding to the mapper configuration. The outgoing claim size is limited.
+     * Outgoing claims size must be less than 4kB serialized as JSON without
+     * whitespace.
+     * Example header:
+     * {
+     *   "alg": "RS256",
+     *   "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+     * }
+     * Example payload:
+     * {
+     *   "iss": "https://accounts.google.com",
+     *   "iat": 1517963104,
+     *   "exp": 1517966704,
+     *   "aud": "https://iamcredentials.googleapis.com/",
+     *   "sub": "113475438248934895348",
+     *   "my_claims": {
+     *     "additional_claim": "value"
+     *   }
+     * }
+     * 
+ * + * string jwt = 3; + */ + public Builder setJwtBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jwt_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) + private static final com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest(); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateIdentityBindingAccessTokenRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateIdentityBindingAccessTokenRequest(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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenRequestOrBuilder.java new file mode 100644 index 000000000000..53834cd8da29 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenRequestOrBuilder.java @@ -0,0 +1,193 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/iam/credentials/v1/common.proto + +package com.google.cloud.iam.credentials.v1; + +public interface GenerateIdentityBindingAccessTokenRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the service account for which the credentials
+   * are requested, in the following format:
+   * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the service account for which the credentials
+   * are requested, in the following format:
+   * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Code to identify the scopes to be included in the OAuth 2.0 access token.
+   * See https://developers.google.com/identity/protocols/googlescopes for more
+   * information.
+   * At least one value required.
+   * 
+ * + * repeated string scope = 2; + */ + java.util.List getScopeList(); + /** + * + * + *
+   * Code to identify the scopes to be included in the OAuth 2.0 access token.
+   * See https://developers.google.com/identity/protocols/googlescopes for more
+   * information.
+   * At least one value required.
+   * 
+ * + * repeated string scope = 2; + */ + int getScopeCount(); + /** + * + * + *
+   * Code to identify the scopes to be included in the OAuth 2.0 access token.
+   * See https://developers.google.com/identity/protocols/googlescopes for more
+   * information.
+   * At least one value required.
+   * 
+ * + * repeated string scope = 2; + */ + java.lang.String getScope(int index); + /** + * + * + *
+   * Code to identify the scopes to be included in the OAuth 2.0 access token.
+   * See https://developers.google.com/identity/protocols/googlescopes for more
+   * information.
+   * At least one value required.
+   * 
+ * + * repeated string scope = 2; + */ + com.google.protobuf.ByteString getScopeBytes(int index); + + /** + * + * + *
+   * Required. Input token.
+   * Must be in JWT format according to
+   * RFC7523 (https://tools.ietf.org/html/rfc7523)
+   * and must have 'kid' field in the header.
+   * Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+   * Mandatory payload fields (along the lines of RFC 7523, section 3):
+   * - iss: issuer of the token. Must provide a discovery document at
+   *        $iss/.well-known/openid-configuration . The document needs to be
+   *        formatted according to section 4.2 of the OpenID Connect Discovery
+   *        1.0 specification.
+   * - iat: Issue time in seconds since epoch. Must be in the past.
+   * - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+   *        after iat. We recommend to create tokens that last shorter than 6
+   *        hours to improve security unless business reasons mandate longer
+   *        expiration times. Shorter token lifetimes are generally more secure
+   *        since tokens that have been exfiltrated by attackers can be used for
+   *        a shorter time. you can configure the maximum lifetime of the
+   *        incoming token in the configuration of the mapper.
+   *        The resulting Google token will expire within an hour or at "exp",
+   *        whichever is earlier.
+   * - sub: JWT subject, identity asserted in the JWT.
+   * - aud: Configured in the mapper policy. By default the service account
+   *        email.
+   * Claims from the incoming token can be transferred into the output token
+   * accoding to the mapper configuration. The outgoing claim size is limited.
+   * Outgoing claims size must be less than 4kB serialized as JSON without
+   * whitespace.
+   * Example header:
+   * {
+   *   "alg": "RS256",
+   *   "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+   * }
+   * Example payload:
+   * {
+   *   "iss": "https://accounts.google.com",
+   *   "iat": 1517963104,
+   *   "exp": 1517966704,
+   *   "aud": "https://iamcredentials.googleapis.com/",
+   *   "sub": "113475438248934895348",
+   *   "my_claims": {
+   *     "additional_claim": "value"
+   *   }
+   * }
+   * 
+ * + * string jwt = 3; + */ + java.lang.String getJwt(); + /** + * + * + *
+   * Required. Input token.
+   * Must be in JWT format according to
+   * RFC7523 (https://tools.ietf.org/html/rfc7523)
+   * and must have 'kid' field in the header.
+   * Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).
+   * Mandatory payload fields (along the lines of RFC 7523, section 3):
+   * - iss: issuer of the token. Must provide a discovery document at
+   *        $iss/.well-known/openid-configuration . The document needs to be
+   *        formatted according to section 4.2 of the OpenID Connect Discovery
+   *        1.0 specification.
+   * - iat: Issue time in seconds since epoch. Must be in the past.
+   * - exp: Expiration time in seconds since epoch. Must be less than 48 hours
+   *        after iat. We recommend to create tokens that last shorter than 6
+   *        hours to improve security unless business reasons mandate longer
+   *        expiration times. Shorter token lifetimes are generally more secure
+   *        since tokens that have been exfiltrated by attackers can be used for
+   *        a shorter time. you can configure the maximum lifetime of the
+   *        incoming token in the configuration of the mapper.
+   *        The resulting Google token will expire within an hour or at "exp",
+   *        whichever is earlier.
+   * - sub: JWT subject, identity asserted in the JWT.
+   * - aud: Configured in the mapper policy. By default the service account
+   *        email.
+   * Claims from the incoming token can be transferred into the output token
+   * accoding to the mapper configuration. The outgoing claim size is limited.
+   * Outgoing claims size must be less than 4kB serialized as JSON without
+   * whitespace.
+   * Example header:
+   * {
+   *   "alg": "RS256",
+   *   "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8"
+   * }
+   * Example payload:
+   * {
+   *   "iss": "https://accounts.google.com",
+   *   "iat": 1517963104,
+   *   "exp": 1517966704,
+   *   "aud": "https://iamcredentials.googleapis.com/",
+   *   "sub": "113475438248934895348",
+   *   "my_claims": {
+   *     "additional_claim": "value"
+   *   }
+   * }
+   * 
+ * + * string jwt = 3; + */ + com.google.protobuf.ByteString getJwtBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenResponse.java b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenResponse.java new file mode 100644 index 000000000000..bad691fb19aa --- /dev/null +++ b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenResponse.java @@ -0,0 +1,887 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/iam/credentials/v1/common.proto + +package com.google.cloud.iam.credentials.v1; + +/** Protobuf type {@code google.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse} */ +public final class GenerateIdentityBindingAccessTokenResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse) + GenerateIdentityBindingAccessTokenResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateIdentityBindingAccessTokenResponse.newBuilder() to construct. + private GenerateIdentityBindingAccessTokenResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateIdentityBindingAccessTokenResponse() { + accessToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenerateIdentityBindingAccessTokenResponse( + 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 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + accessToken_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expireTime_ != null) { + subBuilder = expireTime_.toBuilder(); + } + expireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expireTime_); + expireTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(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.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse.class, + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse.Builder + .class); + } + + public static final int ACCESS_TOKEN_FIELD_NUMBER = 1; + private volatile java.lang.Object accessToken_; + /** + * + * + *
+   * The OAuth 2.0 access token.
+   * 
+ * + * string access_token = 1; + */ + public java.lang.String getAccessToken() { + java.lang.Object ref = accessToken_; + 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(); + accessToken_ = s; + return s; + } + } + /** + * + * + *
+   * The OAuth 2.0 access token.
+   * 
+ * + * string access_token = 1; + */ + public com.google.protobuf.ByteString getAccessTokenBytes() { + java.lang.Object ref = accessToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Token expiration time.
+   * The expiration time is always set.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Token expiration time.
+   * The expiration time is always set.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Token expiration time.
+   * The expiration time is always set.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return getExpireTime(); + } + + 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 (!getAccessTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accessToken_); + } + if (expireTime_ != null) { + output.writeMessage(2, getExpireTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAccessTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accessToken_); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExpireTime()); + } + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse)) { + return super.equals(obj); + } + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse other = + (com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse) obj; + + boolean result = true; + result = result && getAccessToken().equals(other.getAccessToken()); + result = result && (hasExpireTime() == other.hasExpireTime()); + if (hasExpireTime()) { + result = result && getExpireTime().equals(other.getExpireTime()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACCESS_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAccessToken().hashCode(); + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse 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; + } + /** Protobuf type {@code google.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse) + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse.class, + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse.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(); + accessToken_ = ""; + + if (expireTimeBuilder_ == null) { + expireTime_ = null; + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.iam.credentials.v1.IAMCredentialsCommonProto + .internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + getDefaultInstanceForType() { + return com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse build() { + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + buildPartial() { + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse result = + new com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse(this); + result.accessToken_ = accessToken_; + if (expireTimeBuilder_ == null) { + result.expireTime_ = expireTime_; + } else { + result.expireTime_ = expireTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse) { + return mergeFrom( + (com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse other) { + if (other + == com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + .getDefaultInstance()) return this; + if (!other.getAccessToken().isEmpty()) { + accessToken_ = other.accessToken_; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + 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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object accessToken_ = ""; + /** + * + * + *
+     * The OAuth 2.0 access token.
+     * 
+ * + * string access_token = 1; + */ + public java.lang.String getAccessToken() { + java.lang.Object ref = accessToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The OAuth 2.0 access token.
+     * 
+ * + * string access_token = 1; + */ + public com.google.protobuf.ByteString getAccessTokenBytes() { + java.lang.Object ref = accessToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The OAuth 2.0 access token.
+     * 
+ * + * string access_token = 1; + */ + public Builder setAccessToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accessToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The OAuth 2.0 access token.
+     * 
+ * + * string access_token = 1; + */ + public Builder clearAccessToken() { + + accessToken_ = getDefaultInstance().getAccessToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The OAuth 2.0 access token.
+     * 
+ * + * string access_token = 1; + */ + public Builder setAccessTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accessToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Token expiration time.
+     * The expiration time is always set.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public boolean hasExpireTime() { + return expireTimeBuilder_ != null || expireTime_ != null; + } + /** + * + * + *
+     * Token expiration time.
+     * The expiration time is always set.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Token expiration time.
+     * The expiration time is always set.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + onChanged(); + } else { + expireTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Token expiration time.
+     * The expiration time is always set.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + onChanged(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Token expiration time.
+     * The expiration time is always set.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (expireTime_ != null) { + expireTime_ = + com.google.protobuf.Timestamp.newBuilder(expireTime_).mergeFrom(value).buildPartial(); + } else { + expireTime_ = value; + } + onChanged(); + } else { + expireTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Token expiration time.
+     * The expiration time is always set.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public Builder clearExpireTime() { + if (expireTimeBuilder_ == null) { + expireTime_ = null; + onChanged(); + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Token expiration time.
+     * The expiration time is always set.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Token expiration time.
+     * The expiration time is always set.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Token expiration time.
+     * The expiration time is always set.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse) + private static final com.google.cloud.iam.credentials.v1 + .GenerateIdentityBindingAccessTokenResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse(); + } + + public static com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateIdentityBindingAccessTokenResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateIdentityBindingAccessTokenResponse(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.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenResponseOrBuilder.java new file mode 100644 index 000000000000..b13564dc00de --- /dev/null +++ b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/GenerateIdentityBindingAccessTokenResponseOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/iam/credentials/v1/common.proto + +package com.google.cloud.iam.credentials.v1; + +public interface GenerateIdentityBindingAccessTokenResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The OAuth 2.0 access token.
+   * 
+ * + * string access_token = 1; + */ + java.lang.String getAccessToken(); + /** + * + * + *
+   * The OAuth 2.0 access token.
+   * 
+ * + * string access_token = 1; + */ + com.google.protobuf.ByteString getAccessTokenBytes(); + + /** + * + * + *
+   * Token expiration time.
+   * The expiration time is always set.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Token expiration time.
+   * The expiration time is always set.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Token expiration time.
+   * The expiration time is always set.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsCommonProto.java b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsCommonProto.java index 1913fb615541..a6aa1762c332 100644 --- a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsCommonProto.java +++ b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsCommonProto.java @@ -44,6 +44,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_iam_credentials_v1_GenerateIdTokenResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_iam_credentials_v1_GenerateIdTokenResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -71,11 +79,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030\002 \001(\t\"b\n\026GenerateIdTokenRequest\022\014\n\004name" + "\030\001 \001(\t\022\021\n\tdelegates\030\002 \003(\t\022\020\n\010audience\030\003 " + "\001(\t\022\025\n\rinclude_email\030\004 \001(\010\"(\n\027GenerateId" - + "TokenResponse\022\r\n\005token\030\001 \001(\tB\213\001\n#com.goo" - + "gle.cloud.iam.credentials.v1B\031IAMCredent" - + "ialsCommonProtoP\001ZDgoogle.golang.org/gen" - + "proto/googleapis/iam/credentials/v1;cred" - + "entials\370\001\001b\006proto3" + + "TokenResponse\022\r\n\005token\030\001 \001(\t\"U\n)Generate" + + "IdentityBindingAccessTokenRequest\022\014\n\004nam" + + "e\030\001 \001(\t\022\r\n\005scope\030\002 \003(\t\022\013\n\003jwt\030\003 \001(\t\"s\n*G" + + "enerateIdentityBindingAccessTokenRespons" + + "e\022\024\n\014access_token\030\001 \001(\t\022/\n\013expire_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\213\001\n#com" + + ".google.cloud.iam.credentials.v1B\031IAMCre" + + "dentialsCommonProtoP\001ZDgoogle.golang.org" + + "/genproto/googleapis/iam/credentials/v1;" + + "credentials\370\001\001b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -156,6 +169,22 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Token", }); + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenRequest_descriptor, + new java.lang.String[] { + "Name", "Scope", "Jwt", + }); + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_credentials_v1_GenerateIdentityBindingAccessTokenResponse_descriptor, + new java.lang.String[] { + "AccessToken", "ExpireTime", + }); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsProto.java b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsProto.java index 6bd5863e9bb7..7ce6a8abdc5f 100644 --- a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsProto.java +++ b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsProto.java @@ -23,7 +23,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n.google/iam/credentials/v1/iamcredentia" + "ls.proto\022\031google.iam.credentials.v1\032\034goo" + "gle/api/annotations.proto\032&google/iam/cr" - + "edentials/v1/common.proto2\340\005\n\016IAMCredent" + + "edentials/v1/common.proto2\353\007\n\016IAMCredent" + "ials\022\314\001\n\023GenerateAccessToken\0225.google.ia" + "m.credentials.v1.GenerateAccessTokenRequ" + "est\0326.google.iam.credentials.v1.Generate" @@ -42,10 +42,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ls.v1.SignJwtRequest\032*.google.iam.creden" + "tials.v1.SignJwtResponse\":\202\323\344\223\0024\"//v1/{n" + "ame=projects/*/serviceAccounts/*}:signJw" - + "t:\001*B\205\001\n#com.google.cloud.iam.credential" - + "s.v1B\023IAMCredentialsProtoP\001ZDgoogle.gola" - + "ng.org/genproto/googleapis/iam/credentia" - + "ls/v1;credentials\370\001\001b\006proto3" + + "t:\001*\022\210\002\n\"GenerateIdentityBindingAccessTo" + + "ken\022D.google.iam.credentials.v1.Generate" + + "IdentityBindingAccessTokenRequest\032E.goog" + + "le.iam.credentials.v1.GenerateIdentityBi" + + "ndingAccessTokenResponse\"U\202\323\344\223\002O\"J/v1/{n" + + "ame=projects/*/serviceAccounts/*}:genera" + + "teIdentityBindingAccessToken:\001*B\205\001\n#com." + + "google.cloud.iam.credentials.v1B\023IAMCred" + + "entialsProtoP\001ZDgoogle.golang.org/genpro" + + "to/googleapis/iam/credentials/v1;credent" + + "ials\370\001\001b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { diff --git a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/proto/google/iam/credentials/v1/common.proto b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/proto/google/iam/credentials/v1/common.proto index 4fb12530ce00..fa382a99ec4a 100644 --- a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/proto/google/iam/credentials/v1/common.proto +++ b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/proto/google/iam/credentials/v1/common.proto @@ -154,3 +154,71 @@ message GenerateIdTokenResponse { string token = 1; } +message GenerateIdentityBindingAccessTokenRequest { + // The resource name of the service account for which the credentials + // are requested, in the following format: + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + string name = 1; + + // Code to identify the scopes to be included in the OAuth 2.0 access token. + // See https://developers.google.com/identity/protocols/googlescopes for more + // information. + // At least one value required. + repeated string scope = 2; + + // Required. Input token. + // Must be in JWT format according to + // RFC7523 (https://tools.ietf.org/html/rfc7523) + // and must have 'kid' field in the header. + // Supported signing algorithms: RS256 (RS512, ES256, ES512 coming soon). + // Mandatory payload fields (along the lines of RFC 7523, section 3): + // - iss: issuer of the token. Must provide a discovery document at + // $iss/.well-known/openid-configuration . The document needs to be + // formatted according to section 4.2 of the OpenID Connect Discovery + // 1.0 specification. + // - iat: Issue time in seconds since epoch. Must be in the past. + // - exp: Expiration time in seconds since epoch. Must be less than 48 hours + // after iat. We recommend to create tokens that last shorter than 6 + // hours to improve security unless business reasons mandate longer + // expiration times. Shorter token lifetimes are generally more secure + // since tokens that have been exfiltrated by attackers can be used for + // a shorter time. you can configure the maximum lifetime of the + // incoming token in the configuration of the mapper. + // The resulting Google token will expire within an hour or at "exp", + // whichever is earlier. + // - sub: JWT subject, identity asserted in the JWT. + // - aud: Configured in the mapper policy. By default the service account + // email. + // + // Claims from the incoming token can be transferred into the output token + // accoding to the mapper configuration. The outgoing claim size is limited. + // Outgoing claims size must be less than 4kB serialized as JSON without + // whitespace. + // + // Example header: + // { + // "alg": "RS256", + // "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8" + // } + // Example payload: + // { + // "iss": "https://accounts.google.com", + // "iat": 1517963104, + // "exp": 1517966704, + // "aud": "https://iamcredentials.googleapis.com/", + // "sub": "113475438248934895348", + // "my_claims": { + // "additional_claim": "value" + // } + // } + string jwt = 3; +} + +message GenerateIdentityBindingAccessTokenResponse { + // The OAuth 2.0 access token. + string access_token = 1; + + // Token expiration time. + // The expiration time is always set. + google.protobuf.Timestamp expire_time = 2; +} diff --git a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/proto/google/iam/credentials/v1/iamcredentials.proto b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/proto/google/iam/credentials/v1/iamcredentials.proto index 9ab1c3240c19..91902dfd2b06 100644 --- a/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/proto/google/iam/credentials/v1/iamcredentials.proto +++ b/google-api-grpc/proto-google-cloud-iamcredentials-v1/src/main/proto/google/iam/credentials/v1/iamcredentials.proto @@ -67,4 +67,15 @@ service IAMCredentials { body: "*" }; } + + // Exchange a JWT signed by third party identity provider to an OAuth 2.0 + // access token + rpc GenerateIdentityBindingAccessToken( + GenerateIdentityBindingAccessTokenRequest) + returns (GenerateIdentityBindingAccessTokenResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/serviceAccounts/*}:generateIdentityBindingAccessToken" + body: "*" + }; + } } diff --git a/google-api-grpc/proto-google-cloud-iot-v1/pom.xml b/google-api-grpc/proto-google-cloud-iot-v1/pom.xml index c89f566cf521..5b993ea3c0c8 100644 --- a/google-api-grpc/proto-google-cloud-iot-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-iot-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-iot-v1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-iot-v1 PROTO library for proto-google-cloud-iot-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-kms-v1/pom.xml b/google-api-grpc/proto-google-cloud-kms-v1/pom.xml index 78462c87a5b4..6bceb7fec513 100644 --- a/google-api-grpc/proto-google-cloud-kms-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-kms-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-kms-v1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-kms-v1 PROTO library for proto-google-cloud-kms-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-language-v1/pom.xml b/google-api-grpc/proto-google-cloud-language-v1/pom.xml index 740f421f9b33..15cd8e848b3b 100644 --- a/google-api-grpc/proto-google-cloud-language-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-language-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-language-v1 - 1.38.1-SNAPSHOT + 1.40.0 proto-google-cloud-language-v1 PROTO library for proto-google-cloud-language-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-language-v1beta2/pom.xml b/google-api-grpc/proto-google-cloud-language-v1beta2/pom.xml index 97e603c16d33..4dee4e0d5d82 100644 --- a/google-api-grpc/proto-google-cloud-language-v1beta2/pom.xml +++ b/google-api-grpc/proto-google-cloud-language-v1beta2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-language-v1beta2 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-language-v1beta2 PROTO library for proto-google-cloud-language-v1beta2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-logging-v2/pom.xml b/google-api-grpc/proto-google-cloud-logging-v2/pom.xml index 7ae0b8e4d269..c17100555d1f 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/pom.xml +++ b/google-api-grpc/proto-google-cloud-logging-v2/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-logging-v2 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-logging-v2 PROTO library for proto-google-cloud-logging-v2 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-monitoring-v3/pom.xml b/google-api-grpc/proto-google-cloud-monitoring-v3/pom.xml index ba14ebbab787..e2223867734e 100644 --- a/google-api-grpc/proto-google-cloud-monitoring-v3/pom.xml +++ b/google-api-grpc/proto-google-cloud-monitoring-v3/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-monitoring-v3 - 1.38.1-SNAPSHOT + 1.40.0 proto-google-cloud-monitoring-v3 PROTO library for proto-google-cloud-monitoring-v3 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-os-login-v1/pom.xml b/google-api-grpc/proto-google-cloud-os-login-v1/pom.xml index d9626321a33d..00e23590a27d 100644 --- a/google-api-grpc/proto-google-cloud-os-login-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-os-login-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-os-login-v1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-os-login-v1 PROTO library for proto-google-cloud-os-login-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/pom.xml b/google-api-grpc/proto-google-cloud-pubsub-v1/pom.xml index 242a13d85317..42a4e9a4a419 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-pubsub-v1 - 1.38.1-SNAPSHOT + 1.40.0 proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-redis-v1/pom.xml b/google-api-grpc/proto-google-cloud-redis-v1/pom.xml index 147d840dbaae..95c6375c7cef 100644 --- a/google-api-grpc/proto-google-cloud-redis-v1/pom.xml +++ b/google-api-grpc/proto-google-cloud-redis-v1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-redis-v1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-redis-v1 PROTO library for proto-google-cloud-redis-v1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-redis-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-redis-v1beta1/pom.xml index dde82a3c89f4..d448290f80a0 100644 --- a/google-api-grpc/proto-google-cloud-redis-v1beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-redis-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-redis-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-redis-v1beta1 PROTO library for proto-google-cloud-redis-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-scheduler-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-scheduler-v1beta1/pom.xml index 389d04e8b5fb..472bbd74648c 100644 --- a/google-api-grpc/proto-google-cloud-scheduler-v1beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-scheduler-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-scheduler-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-scheduler-v1beta1 PROTO library for proto-google-cloud-redis-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/pom.xml index 44c75f94b820..819b9447d388 100644 --- a/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/pom.xml +++ b/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/pom.xml @@ -3,13 +3,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 proto-google-cloud-securitycenter-v1beta1 - 0.39.1-SNAPSHOT + 0.41.0 proto-google-cloud-securitycenter-v1beta1 PROTO library for proto-google-cloud-securitycenter-v1beta1 com.google.api.grpc google-api-grpc - 0.39.1-SNAPSHOT + 0.41.0 diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/Source.java b/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/Source.java index 831769ab24d1..cfd9a23bfed4 100644 --- a/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/Source.java +++ b/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/Source.java @@ -164,8 +164,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * The source’s display name.
-   * A source’s display name must be unique amongst its siblings, for example,
+   * The source's display name.
+   * A source's display name must be unique amongst its siblings, for example,
    * two sources with the same parent can't share the same display name.
    * The display name must start and end with a letter or digit, may contain
    * letters, digits, spaces, hyphens, and underscores, and can be no longer
@@ -190,8 +190,8 @@ public java.lang.String getDisplayName() {
    *
    *
    * 
-   * The source’s display name.
-   * A source’s display name must be unique amongst its siblings, for example,
+   * The source's display name.
+   * A source's display name must be unique amongst its siblings, for example,
    * two sources with the same parent can't share the same display name.
    * The display name must start and end with a letter or digit, may contain
    * letters, digits, spaces, hyphens, and underscores, and can be no longer
@@ -733,8 +733,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * The source’s display name.
-     * A source’s display name must be unique amongst its siblings, for example,
+     * The source's display name.
+     * A source's display name must be unique amongst its siblings, for example,
      * two sources with the same parent can't share the same display name.
      * The display name must start and end with a letter or digit, may contain
      * letters, digits, spaces, hyphens, and underscores, and can be no longer
@@ -759,8 +759,8 @@ public java.lang.String getDisplayName() {
      *
      *
      * 
-     * The source’s display name.
-     * A source’s display name must be unique amongst its siblings, for example,
+     * The source's display name.
+     * A source's display name must be unique amongst its siblings, for example,
      * two sources with the same parent can't share the same display name.
      * The display name must start and end with a letter or digit, may contain
      * letters, digits, spaces, hyphens, and underscores, and can be no longer
@@ -785,8 +785,8 @@ public com.google.protobuf.ByteString getDisplayNameBytes() {
      *
      *
      * 
-     * The source’s display name.
-     * A source’s display name must be unique amongst its siblings, for example,
+     * The source's display name.
+     * A source's display name must be unique amongst its siblings, for example,
      * two sources with the same parent can't share the same display name.
      * The display name must start and end with a letter or digit, may contain
      * letters, digits, spaces, hyphens, and underscores, and can be no longer
@@ -809,8 +809,8 @@ public Builder setDisplayName(java.lang.String value) {
      *
      *
      * 
-     * The source’s display name.
-     * A source’s display name must be unique amongst its siblings, for example,
+     * The source's display name.
+     * A source's display name must be unique amongst its siblings, for example,
      * two sources with the same parent can't share the same display name.
      * The display name must start and end with a letter or digit, may contain
      * letters, digits, spaces, hyphens, and underscores, and can be no longer
@@ -830,8 +830,8 @@ public Builder clearDisplayName() {
      *
      *
      * 
-     * The source’s display name.
-     * A source’s display name must be unique amongst its siblings, for example,
+     * The source's display name.
+     * A source's display name must be unique amongst its siblings, for example,
      * two sources with the same parent can't share the same display name.
      * The display name must start and end with a letter or digit, may contain
      * letters, digits, spaces, hyphens, and underscores, and can be no longer
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/SourceOrBuilder.java b/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/SourceOrBuilder.java
index 66cae81cc763..dc8fd860dd9e 100644
--- a/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/SourceOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/SourceOrBuilder.java
@@ -39,8 +39,8 @@ public interface SourceOrBuilder
    *
    *
    * 
-   * The source’s display name.
-   * A source’s display name must be unique amongst its siblings, for example,
+   * The source's display name.
+   * A source's display name must be unique amongst its siblings, for example,
    * two sources with the same parent can't share the same display name.
    * The display name must start and end with a letter or digit, may contain
    * letters, digits, spaces, hyphens, and underscores, and can be no longer
@@ -55,8 +55,8 @@ public interface SourceOrBuilder
    *
    *
    * 
-   * The source’s display name.
-   * A source’s display name must be unique amongst its siblings, for example,
+   * The source's display name.
+   * A source's display name must be unique amongst its siblings, for example,
    * two sources with the same parent can't share the same display name.
    * The display name must start and end with a letter or digit, may contain
    * letters, digits, spaces, hyphens, and underscores, and can be no longer
diff --git a/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/proto/google/cloud/securitycenter/v1beta1/source.proto b/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/proto/google/cloud/securitycenter/v1beta1/source.proto
index 9dfc9490e9ab..5eabe2b1a349 100644
--- a/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/proto/google/cloud/securitycenter/v1beta1/source.proto
+++ b/google-api-grpc/proto-google-cloud-securitycenter-v1beta1/src/main/proto/google/cloud/securitycenter/v1beta1/source.proto
@@ -34,8 +34,8 @@ message Source {
   // "organizations/123/sources/456"
   string name = 1;
 
-  // The source’s display name.
-  // A source’s display name must be unique amongst its siblings, for example,
+  // The source's display name.
+  // A source's display name must be unique amongst its siblings, for example,
   // two sources with the same parent can't share the same display name.
   // The display name must start and end with a letter or digit, may contain
   // letters, digits, spaces, hyphens, and underscores, and can be no longer
diff --git a/google-api-grpc/proto-google-cloud-spanner-admin-database-v1/pom.xml b/google-api-grpc/proto-google-cloud-spanner-admin-database-v1/pom.xml
index 8180b5bada75..68024ddd15c2 100644
--- a/google-api-grpc/proto-google-cloud-spanner-admin-database-v1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-spanner-admin-database-v1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-spanner-admin-database-v1
-  1.1.1-SNAPSHOT
+  1.3.0
   proto-google-cloud-spanner-admin-database-v1
   PROTO library for proto-google-cloud-spanner-admin-database-v1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-spanner-admin-instance-v1/pom.xml b/google-api-grpc/proto-google-cloud-spanner-admin-instance-v1/pom.xml
index 7683d458eab2..073990653745 100644
--- a/google-api-grpc/proto-google-cloud-spanner-admin-instance-v1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-spanner-admin-instance-v1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-spanner-admin-instance-v1
-  1.1.1-SNAPSHOT
+  1.3.0
   proto-google-cloud-spanner-admin-instance-v1
   PROTO library for proto-google-cloud-spanner-admin-instance-v1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/pom.xml b/google-api-grpc/proto-google-cloud-spanner-v1/pom.xml
index a330eb296b88..7f26c51b8624 100644
--- a/google-api-grpc/proto-google-cloud-spanner-v1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-spanner-v1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-spanner-v1
-  1.1.1-SNAPSHOT
+  1.3.0
   proto-google-cloud-spanner-v1
   PROTO library for proto-google-cloud-spanner-v1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-speech-v1/pom.xml b/google-api-grpc/proto-google-cloud-speech-v1/pom.xml
index 9dad448d8b5e..39ffc4de3f92 100644
--- a/google-api-grpc/proto-google-cloud-speech-v1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-speech-v1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-speech-v1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-speech-v1
   PROTO library for proto-google-cloud-speech-v1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-speech-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-speech-v1beta1/pom.xml
index 298b14fe7c05..3f9019a1a8c3 100644
--- a/google-api-grpc/proto-google-cloud-speech-v1beta1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-speech-v1beta1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-speech-v1beta1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-speech-v1beta1
   PROTO library for proto-google-cloud-speech-v1beta1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-speech-v1p1beta1/pom.xml b/google-api-grpc/proto-google-cloud-speech-v1p1beta1/pom.xml
index d83c2488e57c..ac74bb0b7f0d 100644
--- a/google-api-grpc/proto-google-cloud-speech-v1p1beta1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-speech-v1p1beta1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-speech-v1p1beta1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-speech-v1p1beta1
   PROTO library for proto-google-cloud-speech-v1p1beta1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/pom.xml b/google-api-grpc/proto-google-cloud-tasks-v2beta2/pom.xml
index 17c4d83a0c9f..b160e4563793 100644
--- a/google-api-grpc/proto-google-cloud-tasks-v2beta2/pom.xml
+++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-tasks-v2beta2
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-tasks-v2beta2
   PROTO library for proto-google-cloud-tasks-v2beta2
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/pom.xml b/google-api-grpc/proto-google-cloud-tasks-v2beta3/pom.xml
index fe7ecb564859..c1a5adc5952c 100644
--- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/pom.xml
+++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-tasks-v2beta3
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-tasks-v2beta3
   PROTO library for proto-google-cloud-tasks-v2beta3
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-texttospeech-v1/pom.xml b/google-api-grpc/proto-google-cloud-texttospeech-v1/pom.xml
index 16c71bf32d26..b07371b5b30e 100644
--- a/google-api-grpc/proto-google-cloud-texttospeech-v1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-texttospeech-v1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-texttospeech-v1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-texttospeech-v1
   PROTO library for proto-google-cloud-texttospeech-v1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-texttospeech-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-texttospeech-v1beta1/pom.xml
index 34fa65caca03..e210392b9d3f 100644
--- a/google-api-grpc/proto-google-cloud-texttospeech-v1beta1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-texttospeech-v1beta1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-texttospeech-v1beta1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-texttospeech-v1beta1
   PROTO library for proto-google-cloud-texttospeech-v1beta1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-trace-v1/pom.xml b/google-api-grpc/proto-google-cloud-trace-v1/pom.xml
index a8f108775091..6b9f009f7c9a 100644
--- a/google-api-grpc/proto-google-cloud-trace-v1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-trace-v1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-trace-v1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-trace-v1
   PROTO library for proto-google-cloud-trace-v1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-trace-v2/pom.xml b/google-api-grpc/proto-google-cloud-trace-v2/pom.xml
index 90c47d20ec63..4dc92882884f 100644
--- a/google-api-grpc/proto-google-cloud-trace-v2/pom.xml
+++ b/google-api-grpc/proto-google-cloud-trace-v2/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-trace-v2
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-trace-v2
   PROTO library for proto-google-cloud-trace-v2
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1/pom.xml b/google-api-grpc/proto-google-cloud-video-intelligence-v1/pom.xml
index d6043658f381..ac6060c29a4b 100644
--- a/google-api-grpc/proto-google-cloud-video-intelligence-v1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-video-intelligence-v1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-video-intelligence-v1
   PROTO library for proto-google-cloud-video-intelligence-v1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-video-intelligence-v1beta1/pom.xml
index 88b24e924ac7..84b21d49651f 100644
--- a/google-api-grpc/proto-google-cloud-video-intelligence-v1beta1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1beta1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-video-intelligence-v1beta1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-video-intelligence-v1beta1
   PROTO library for proto-google-cloud-video-intelligence-v1beta1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1beta2/pom.xml b/google-api-grpc/proto-google-cloud-video-intelligence-v1beta2/pom.xml
index 62ff0320ff88..357b9dd4e3a6 100644
--- a/google-api-grpc/proto-google-cloud-video-intelligence-v1beta2/pom.xml
+++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1beta2/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-video-intelligence-v1beta2
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-video-intelligence-v1beta2
   PROTO library for proto-google-cloud-video-intelligence-v1beta2
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/pom.xml b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/pom.xml
index 70f0b97608eb..ce1dd319665b 100644
--- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-video-intelligence-v1p1beta1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-video-intelligence-v1p1beta1
   PROTO library for proto-google-cloud-video-intelligence-v1p1beta1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p2beta1/pom.xml b/google-api-grpc/proto-google-cloud-video-intelligence-v1p2beta1/pom.xml
index 88a4497df959..fa1256b26712 100644
--- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p2beta1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p2beta1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-video-intelligence-v1p2beta1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-video-intelligence-v1p2beta1
   PROTO library for proto-google-cloud-video-intelligence-v1p2beta1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-vision-v1/pom.xml b/google-api-grpc/proto-google-cloud-vision-v1/pom.xml
index c48de0804009..855b5e5efbfd 100644
--- a/google-api-grpc/proto-google-cloud-vision-v1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-vision-v1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-vision-v1
-  1.38.1-SNAPSHOT
+  1.40.0
   proto-google-cloud-vision-v1
   PROTO library for proto-google-cloud-vision-v1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/pom.xml b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/pom.xml
index 4fb0eb9465b4..dbc56aea5e67 100644
--- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-vision-v1p1beta1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-vision-v1p1beta1
   PROTO library for proto-google-cloud-vision-v1p1beta1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/pom.xml b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/pom.xml
index af5170304768..600eea335a46 100644
--- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-vision-v1p2beta1
-  1.38.1-SNAPSHOT
+  1.40.0
   proto-google-cloud-vision-v1p2beta1
   PROTO library for proto-google-cloud-vision-v1p2beta1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/pom.xml b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/pom.xml
index 74a2f2916a40..bd712d5ee6a4 100644
--- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/pom.xml
+++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-vision-v1p3beta1
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-vision-v1p3beta1
   PROTO library for proto-google-cloud-vision-v1p3beta1
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-api-grpc/proto-google-cloud-websecurityscanner-v1alpha/pom.xml b/google-api-grpc/proto-google-cloud-websecurityscanner-v1alpha/pom.xml
index ea4afc5f2892..6f464de16d29 100644
--- a/google-api-grpc/proto-google-cloud-websecurityscanner-v1alpha/pom.xml
+++ b/google-api-grpc/proto-google-cloud-websecurityscanner-v1alpha/pom.xml
@@ -3,13 +3,13 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   4.0.0
   proto-google-cloud-websecurityscanner-v1alpha
-  0.39.1-SNAPSHOT
+  0.41.0
   proto-google-cloud-websecurityscanner-v1alpha
   PROTO library for proto-google-cloud-websecurityscanner-v1alpha
   
     com.google.api.grpc
     google-api-grpc
-    0.39.1-SNAPSHOT
+    0.41.0
   
   
     
diff --git a/google-cloud-bom/README.md b/google-cloud-bom/README.md
index 51e78f10ee7b..f9f0d01435d8 100644
--- a/google-cloud-bom/README.md
+++ b/google-cloud-bom/README.md
@@ -13,7 +13,7 @@ To use it in Maven, add the following to your POM:
       
         com.google.cloud
         google-cloud-bom
-        0.74.0-alpha
+        0.76.0-alpha
         pom
         import
       
diff --git a/google-cloud-bom/pom.xml b/google-cloud-bom/pom.xml
index b5bd9a4b61e9..4d55163266aa 100644
--- a/google-cloud-bom/pom.xml
+++ b/google-cloud-bom/pom.xml
@@ -4,7 +4,7 @@
   com.google.cloud
   google-cloud-bom
   pom
-  0.74.1-alpha-SNAPSHOT
+  0.76.0-alpha
   Google Cloud Java BOM
   https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-bom
   
@@ -197,713 +197,713 @@
       
         com.google.cloud
         google-cloud-asset
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-asset-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-asset-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-automl
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-automl-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-automl-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-bigtable
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.api.grpc
         proto-google-cloud-bigtable-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-bigtable-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-bigtable-admin
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.api.grpc
         proto-google-cloud-bigtable-admin-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-bigtable-admin-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-bigtable-emulator
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.cloud
         google-cloud-bigquery
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.cloud
         google-cloud-bigquerydatatransfer
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-bigquerydatatransfer-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-bigquerydatatransfer-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-bigquerystorage-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-bigquerystorage-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-compute
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.cloud
         google-cloud-container
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-container-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-container-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-containeranalysis
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-containeranalysis-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-containeranalysis-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-contrib
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.cloud
         google-cloud-nio
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.cloud
         google-cloud-core
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.cloud
         google-cloud-core-grpc
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.cloud
         google-cloud-core-http
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.cloud
         google-cloud-dataproc
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.api.grpc
         proto-google-cloud-dataproc-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-dataproc-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-dataproc-v1beta2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-dataproc-v1beta2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-datastore
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.api.grpc
         proto-google-cloud-datastore-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-dlp
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-dlp-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-dlp-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-dialogflow
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.api.grpc
         proto-google-cloud-dialogflow-v2beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-dialogflow-v2beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-dialogflow-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-dialogflow-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-dns
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.cloud
         google-cloud-errorreporting
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-error-reporting-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-error-reporting-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-firestore
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-firestore-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-firestore-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-kms
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-kms-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-kms-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-language
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.api.grpc
         proto-google-cloud-language-v1
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.api.grpc
         grpc-google-cloud-language-v1
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.api.grpc
         proto-google-cloud-language-v1beta2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-language-v1beta2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-logging
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.api.grpc
         proto-google-cloud-logging-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-logging-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-logging-logback
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
 
       
         com.google.cloud
         google-cloud-monitoring
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.api.grpc
         proto-google-cloud-monitoring-v3
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.api.grpc
         grpc-google-cloud-monitoring-v3
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.cloud
         google-cloud-os-login
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.api.grpc
         proto-google-cloud-os-login-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-os-login-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-pubsub
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.api.grpc
         proto-google-cloud-pubsub-v1
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.api.grpc
         grpc-google-cloud-pubsub-v1
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.cloud
         google-cloud-redis
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.api.grpc
         proto-google-cloud-redis-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-redis-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-redis-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-redis-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-resourcemanager
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
       
       
         com.google.api.grpc
         proto-google-cloud-scheduler-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-scheduler-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-securitycenter-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-securitycenter-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-spanner
-        1.1.1-SNAPSHOT
+        1.3.0
       
       
         com.google.api.grpc
         proto-google-cloud-spanner-v1
-        1.1.1-SNAPSHOT
+        1.3.0
       
       
         com.google.api.grpc
         grpc-google-cloud-spanner-v1
-        1.1.1-SNAPSHOT
+        1.3.0
       
       
         com.google.api.grpc
         proto-google-cloud-spanner-admin-database-v1
-        1.1.1-SNAPSHOT
+        1.3.0
       
       
         com.google.api.grpc
         grpc-google-cloud-spanner-admin-database-v1
-        1.1.1-SNAPSHOT
+        1.3.0
       
       
         com.google.api.grpc
         proto-google-cloud-spanner-admin-instance-v1
-        1.1.1-SNAPSHOT
+        1.3.0
       
       
         com.google.api.grpc
         grpc-google-cloud-spanner-admin-instance-v1
-        1.1.1-SNAPSHOT
+        1.3.0
       
       
         com.google.cloud
         google-cloud-speech
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-speech-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-speech-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-speech-v1p1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-speech-v1p1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-speech-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-speech-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-storage
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.cloud
         google-cloud-tasks
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-tasks-v2beta2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-tasks-v2beta2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-tasks-v2beta3
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-tasks-v2beta3
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-texttospeech
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-texttospeech-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-texttospeech-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-texttospeech-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-texttospeech-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-trace
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-trace-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-trace-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-trace-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-trace-v2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-translate
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.cloud
         google-cloud-vision
-        1.56.1-SNAPSHOT
+        1.58.0
       
       
         com.google.api.grpc
         proto-google-cloud-vision-v1
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.api.grpc
         grpc-google-cloud-vision-v1
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.api.grpc
         proto-google-cloud-vision-v1p1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-vision-v1p1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-vision-v1p2beta1
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.api.grpc
         grpc-google-cloud-vision-v1p2beta1
-        1.38.1-SNAPSHOT
+        1.40.0
       
       
         com.google.api.grpc
         proto-google-cloud-vision-v1p3beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-vision-v1p3beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.cloud
         google-cloud-video-intelligence
-        0.74.1-beta-SNAPSHOT
+        0.76.0-beta
       
       
         com.google.api.grpc
         proto-google-cloud-video-intelligence-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-video-intelligence-v1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-video-intelligence-v1beta2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-video-intelligence-v1beta2
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-video-intelligence-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-video-intelligence-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-video-intelligence-v1p1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-video-intelligence-v1p1beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-video-intelligence-v1p2beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-video-intelligence-v1p2beta1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-iot-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-iot-v1
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-websecurityscanner-v1alpha
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         grpc-google-cloud-websecurityscanner-v1alpha
-        0.39.1-SNAPSHOT
+        0.41.0
       
       
         com.google.api.grpc
         proto-google-cloud-iamcredentials-v1
-        0.1.1-alpha-SNAPSHOT
+        0.3.0-alpha
       
       
         com.google.api.grpc
         grpc-google-cloud-iamcredentials-v1
-        0.1.1-alpha-SNAPSHOT
+        0.3.0-alpha
       
       
         com.google.cloud
         google-cloud-iamcredentials
-        0.1.1-alpha-SNAPSHOT
+        0.3.0-alpha
       
     
   
@@ -1034,6 +1034,12 @@
                 
                   sign
                 
+                
+                  
+                    --pinentry-mode
+                    loopback
+                  
+                
               
             
           
diff --git a/google-cloud-clients/google-cloud-asset/README.md b/google-cloud-clients/google-cloud-asset/README.md
index 0cbeac75cdf8..90aa48e1392c 100644
--- a/google-cloud-clients/google-cloud-asset/README.md
+++ b/google-cloud-clients/google-cloud-asset/README.md
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
 
   com.google.cloud
   google-cloud-asset
-  0.74.0-beta
+  0.76.0-beta
 
 ```
 If you are using Gradle, add this to your dependencies
 ```Groovy
-compile 'com.google.cloud:google-cloud-asset:0.74.0-beta'
+compile 'com.google.cloud:google-cloud-asset:0.76.0-beta'
 ```
 If you are using SBT, add this to your dependencies
 ```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "0.74.0-beta"
+libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "0.76.0-beta"
 ```
 [//]: # ({x-version-update-end})
 
diff --git a/google-cloud-clients/google-cloud-asset/pom.xml b/google-cloud-clients/google-cloud-asset/pom.xml
index 5c1ed428e6ae..b3e8c2bd25fe 100644
--- a/google-cloud-clients/google-cloud-asset/pom.xml
+++ b/google-cloud-clients/google-cloud-asset/pom.xml
@@ -2,7 +2,7 @@
 
   4.0.0
   google-cloud-asset
-  0.74.1-beta-SNAPSHOT
+  0.76.0-beta
   jar
   Google Cloud Asset
   https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-clients/google-cloud-asset
@@ -12,7 +12,7 @@
   
     com.google.cloud
     google-cloud-clients
-    0.74.1-alpha-SNAPSHOT
+    0.76.0-alpha
   
   
     google-cloud-asset
diff --git a/google-cloud-clients/google-cloud-automl/README.md b/google-cloud-clients/google-cloud-automl/README.md
index 74ab3ba61c3a..4e89150fae85 100644
--- a/google-cloud-clients/google-cloud-automl/README.md
+++ b/google-cloud-clients/google-cloud-automl/README.md
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
 
   com.google.cloud
   google-cloud-automl
-  0.74.0-beta
+  0.76.0-beta
 
 ```
 If you are using Gradle, add this to your dependencies
 ```Groovy
-compile 'com.google.cloud:google-cloud-automl:0.74.0-beta'
+compile 'com.google.cloud:google-cloud-automl:0.76.0-beta'
 ```
 If you are using SBT, add this to your dependencies
 ```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-automl" % "0.74.0-beta"
+libraryDependencies += "com.google.cloud" % "google-cloud-automl" % "0.76.0-beta"
 ```
 [//]: # ({x-version-update-end})
 
diff --git a/google-cloud-clients/google-cloud-automl/pom.xml b/google-cloud-clients/google-cloud-automl/pom.xml
index af5a105b0569..84afa26fc7aa 100644
--- a/google-cloud-clients/google-cloud-automl/pom.xml
+++ b/google-cloud-clients/google-cloud-automl/pom.xml
@@ -2,7 +2,7 @@
 
   4.0.0
   google-cloud-automl
-  0.74.1-beta-SNAPSHOT
+  0.76.0-beta
   jar
   Google Cloud Auto ML
   https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-clients/google-cloud-automl
@@ -12,7 +12,7 @@
   
     com.google.cloud
     google-cloud-clients
-    0.74.1-alpha-SNAPSHOT
+    0.76.0-alpha
   
   
     google-cloud-automl
diff --git a/google-cloud-clients/google-cloud-bigquery/README.md b/google-cloud-clients/google-cloud-bigquery/README.md
index 1bff07db0c84..8532db06d8e8 100644
--- a/google-cloud-clients/google-cloud-bigquery/README.md
+++ b/google-cloud-clients/google-cloud-bigquery/README.md
@@ -18,16 +18,16 @@ If you are using Maven, add this to your pom.xml file
 
   com.google.cloud
   google-cloud-bigquery
-  1.56.0
+  1.58.0
 
 ```
 If you are using Gradle, add this to your dependencies
 ```Groovy
-compile 'com.google.cloud:google-cloud-bigquery:1.56.0'
+compile 'com.google.cloud:google-cloud-bigquery:1.58.0'
 ```
 If you are using SBT, add this to your dependencies
 ```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.56.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.58.0"
 ```
 [//]: # ({x-version-update-end})
 
diff --git a/google-cloud-clients/google-cloud-bigquery/pom.xml b/google-cloud-clients/google-cloud-bigquery/pom.xml
index 7ba225c6ab06..3d497bd76e12 100644
--- a/google-cloud-clients/google-cloud-bigquery/pom.xml
+++ b/google-cloud-clients/google-cloud-bigquery/pom.xml
@@ -2,7 +2,7 @@
 
   4.0.0
   google-cloud-bigquery
-  1.56.1-SNAPSHOT
+  1.58.0
   jar
   Google Cloud BigQuery
   https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-bigquery
@@ -12,7 +12,7 @@
   
     com.google.cloud
     google-cloud-clients
-    0.74.1-alpha-SNAPSHOT
+    0.76.0-alpha
   
   
     google-cloud-bigquery
diff --git a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Field.java b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Field.java
index 41f357e661b5..72b84a93ae31 100644
--- a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Field.java
+++ b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Field.java
@@ -105,7 +105,7 @@ public Builder setName(String name) {
      * @throws IllegalArgumentException if {@code type == LegacySQLTypeName.RECORD &&
      *     subFields.length == 0} or if {@code type != LegacySQLTypeName.RECORD && subFields.length
      *     != 0}
-     * @see Data
+     * @see Data
      *     Types
      */
     public Builder setType(LegacySQLTypeName type, Field... subFields) {
@@ -121,7 +121,7 @@ public Builder setType(LegacySQLTypeName type, Field... subFields) {
      * @throws IllegalArgumentException if {@code type == LegacySQLTypeName.RECORD && (subFields ==
      *     null || subFields.isEmpty())} or if {@code type != LegacySQLTypeName.RECORD && subFields
      *     != null}
-     * @see Data
+     * @see Data
      *     Types
      */
     public Builder setType(LegacySQLTypeName type, FieldList subFields) {
@@ -175,7 +175,7 @@ public String getName() {
   /**
    * Returns the field type.
    *
-   * @see Data
+   * @see Data
    *     Types
    */
   public LegacySQLTypeName getType() {
diff --git a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryJobConfiguration.java b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryJobConfiguration.java
index a5e741d7f8f3..9bc906a1fa17 100644
--- a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryJobConfiguration.java
+++ b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryJobConfiguration.java
@@ -60,6 +60,7 @@ public final class QueryJobConfiguration extends JobConfiguration {
   private final Boolean dryRun;
   private final Boolean useLegacySql;
   private final Integer maximumBillingTier;
+  private final Long maximumBytesBilled;
   private final List schemaUpdateOptions;
   private final EncryptionConfiguration destinationEncryptionConfiguration;
   private final TimePartitioning timePartitioning;
@@ -104,6 +105,7 @@ public static final class Builder
     private Boolean dryRun;
     private Boolean useLegacySql = false;
     private Integer maximumBillingTier;
+    private Long maximumBytesBilled;
     private List schemaUpdateOptions;
     private EncryptionConfiguration destinationEncryptionConfiguration;
     private TimePartitioning timePartitioning;
@@ -131,6 +133,7 @@ private Builder(QueryJobConfiguration jobConfiguration) {
       this.dryRun = jobConfiguration.dryRun;
       this.useLegacySql = jobConfiguration.useLegacySql;
       this.maximumBillingTier = jobConfiguration.maximumBillingTier;
+      this.maximumBytesBilled = jobConfiguration.maximumBytesBilled;
       this.schemaUpdateOptions = jobConfiguration.schemaUpdateOptions;
       this.destinationEncryptionConfiguration = jobConfiguration.destinationEncryptionConfiguration;
       this.timePartitioning = jobConfiguration.timePartitioning;
@@ -167,6 +170,9 @@ private Builder(com.google.api.services.bigquery.model.JobConfiguration configur
       if (queryConfigurationPb.getMaximumBillingTier() != null) {
         maximumBillingTier = queryConfigurationPb.getMaximumBillingTier();
       }
+      if (queryConfigurationPb.getMaximumBytesBilled() != null) {
+        maximumBytesBilled = queryConfigurationPb.getMaximumBytesBilled();
+      }
       dryRun = configurationPb.getDryRun();
       if (queryConfigurationPb.getDestinationTable() != null) {
         destinationTable = TableId.fromPb(queryConfigurationPb.getDestinationTable());
@@ -482,6 +488,18 @@ public Builder setMaximumBillingTier(Integer maximumBillingTier) {
       return this;
     }
 
+    /**
+     * Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit
+     * will fail (without incurring a charge). If unspecified, this will be set to your project
+     * default.
+     *
+     * @param maximumBytesBilled maximum bytes billed for this job
+     */
+    public Builder setMaximumBytesBilled(Long maximumBytesBilled) {
+      this.maximumBytesBilled = maximumBytesBilled;
+      return this;
+    }
+
     /**
      * [Experimental] Sets options allowing the schema of the destination table to be updated as a
      * side effect of the query job. Schema update options are supported in two cases: when
@@ -538,6 +556,7 @@ private QueryJobConfiguration(Builder builder) {
     this.dryRun = builder.dryRun;
     this.useLegacySql = builder.useLegacySql;
     this.maximumBillingTier = builder.maximumBillingTier;
+    this.maximumBytesBilled = builder.maximumBytesBilled;
     this.schemaUpdateOptions = builder.schemaUpdateOptions;
     this.destinationEncryptionConfiguration = builder.destinationEncryptionConfiguration;
     this.timePartitioning = builder.timePartitioning;
@@ -685,6 +704,11 @@ public Integer getMaximumBillingTier() {
     return maximumBillingTier;
   }
 
+  /** Returns the optional bytes billed limit for this job. */
+  public Long getMaximumBytesBilled() {
+    return maximumBytesBilled;
+  }
+
   /**
    * [Experimental] Returns options allowing the schema of the destination table to be updated as a
    * side effect of the query job. Schema update options are supported in two cases: when
@@ -731,6 +755,7 @@ ToStringHelper toStringHelper() {
         .add("dryRun", dryRun)
         .add("useLegacySql", useLegacySql)
         .add("maximumBillingTier", maximumBillingTier)
+        .add("maximumBytesBilled", maximumBytesBilled)
         .add("schemaUpdateOptions", schemaUpdateOptions)
         .add("timePartitioning", timePartitioning)
         .add("clustering", clustering);
@@ -762,6 +787,7 @@ public int hashCode() {
         dryRun,
         useLegacySql,
         maximumBillingTier,
+        maximumBytesBilled,
         schemaUpdateOptions,
         timePartitioning,
         clustering);
@@ -835,6 +861,9 @@ com.google.api.services.bigquery.model.JobConfiguration toPb() {
     if (maximumBillingTier != null) {
       queryConfigurationPb.setMaximumBillingTier(maximumBillingTier);
     }
+    if (maximumBytesBilled != null) {
+      queryConfigurationPb.setMaximumBytesBilled(maximumBytesBilled);
+    }
     if (schemaUpdateOptions != null) {
       ImmutableList.Builder schemaUpdateOptionsBuilder = new ImmutableList.Builder<>();
       for (JobInfo.SchemaUpdateOption schemaUpdateOption : schemaUpdateOptions) {
diff --git a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java
index 880372b2b733..f12e6b608a91 100644
--- a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java
+++ b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java
@@ -57,12 +57,12 @@ public static class StreamingBuffer implements Serializable {
     }
 
     /** Returns a lower-bound estimate of the number of rows currently in the streaming buffer. */
-    public long getEstimatedRows() {
+    public Long getEstimatedRows() {
       return estimatedRows;
     }
 
     /** Returns a lower-bound estimate of the number of bytes currently in the streaming buffer. */
-    public long getEstimatedBytes() {
+    public Long getEstimatedBytes() {
       return estimatedBytes;
     }
 
@@ -95,10 +95,17 @@ public boolean equals(Object obj) {
     }
 
     Streamingbuffer toPb() {
-      return new Streamingbuffer()
-          .setEstimatedBytes(BigInteger.valueOf(estimatedBytes))
-          .setEstimatedRows(BigInteger.valueOf(estimatedRows))
-          .setOldestEntryTime(BigInteger.valueOf(oldestEntryTime));
+      Streamingbuffer buffer = new Streamingbuffer();
+      if (estimatedBytes != null) {
+        buffer.setEstimatedBytes(BigInteger.valueOf(estimatedBytes));
+      }
+      if (estimatedRows != null) {
+        buffer.setEstimatedRows(BigInteger.valueOf(estimatedRows));
+      }
+      if (oldestEntryTime != null) {
+        buffer.setOldestEntryTime(BigInteger.valueOf(oldestEntryTime));
+      }
+      return buffer;
     }
 
     static StreamingBuffer fromPb(Streamingbuffer streamingBufferPb) {
diff --git a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Table.java b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Table.java
index 7fee00952bae..d38957bd6186 100644
--- a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Table.java
+++ b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Table.java
@@ -21,10 +21,10 @@
 import com.google.cloud.bigquery.BigQuery.JobOption;
 import com.google.cloud.bigquery.BigQuery.TableDataListOption;
 import com.google.cloud.bigquery.BigQuery.TableOption;
-import com.google.cloud.bigquery.TableInfo.Builder;
 import com.google.common.collect.ImmutableList;
 import java.io.IOException;
 import java.io.ObjectInputStream;
+import java.math.BigInteger;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -102,6 +102,18 @@ Builder setLastModifiedTime(Long lastModifiedTime) {
       return this;
     }
 
+    @Override
+    Builder setNumBytes(Long numBytes) {
+      infoBuilder.setNumBytes(numBytes);
+      return this;
+    }
+
+    @Override
+    Builder setNumRows(BigInteger numRows) {
+      infoBuilder.setNumRows(numRows);
+      return this;
+    }
+
     @Override
     Builder setSelfLink(String selfLink) {
       infoBuilder.setSelfLink(selfLink);
diff --git a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java
index 37831cf943e4..8fad66d20a7e 100644
--- a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java
+++ b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java
@@ -65,6 +65,8 @@ public Table apply(TableInfo tableInfo) {
   private final Long creationTime;
   private final Long expirationTime;
   private final Long lastModifiedTime;
+  private final Long numBytes;
+  private final BigInteger numRows;
   private final TableDefinition definition;
   private final EncryptionConfiguration encryptionConfiguration;
   private final Labels labels;
@@ -92,6 +94,10 @@ public abstract static class Builder {
 
     abstract Builder setLastModifiedTime(Long lastModifiedTime);
 
+    abstract Builder setNumBytes(Long numBytes);
+
+    abstract Builder setNumRows(BigInteger numRows);
+
     abstract Builder setSelfLink(String selfLink);
 
     /** Sets the table identity. */
@@ -134,6 +140,8 @@ static class BuilderImpl extends Builder {
     private Long creationTime;
     private Long expirationTime;
     private Long lastModifiedTime;
+    private Long numBytes;
+    private BigInteger numRows;
     private TableDefinition definition;
     private EncryptionConfiguration encryptionConfiguration;
     private Labels labels = Labels.ZERO;
@@ -150,6 +158,8 @@ static class BuilderImpl extends Builder {
       this.creationTime = tableInfo.creationTime;
       this.expirationTime = tableInfo.expirationTime;
       this.lastModifiedTime = tableInfo.lastModifiedTime;
+      this.numBytes = tableInfo.numBytes;
+      this.numRows = tableInfo.numRows;
       this.definition = tableInfo.definition;
       this.encryptionConfiguration = tableInfo.encryptionConfiguration;
       this.labels = tableInfo.labels;
@@ -167,6 +177,8 @@ static class BuilderImpl extends Builder {
       this.etag = tablePb.getEtag();
       this.generatedId = tablePb.getId();
       this.selfLink = tablePb.getSelfLink();
+      this.numBytes = tablePb.getNumBytes();
+      this.numRows = tablePb.getNumRows();
       this.definition = TableDefinition.fromPb(tablePb);
       if (tablePb.getEncryptionConfiguration() != null) {
         this.encryptionConfiguration =
@@ -217,6 +229,18 @@ Builder setLastModifiedTime(Long lastModifiedTime) {
       return this;
     }
 
+    @Override
+    Builder setNumBytes(Long numBytes) {
+      this.numBytes = numBytes;
+      return this;
+    }
+
+    @Override
+    Builder setNumRows(BigInteger numRows) {
+      this.numRows = numRows;
+      return this;
+    }
+
     @Override
     Builder setSelfLink(String selfLink) {
       this.selfLink = selfLink;
@@ -263,6 +287,8 @@ public TableInfo build() {
     this.creationTime = builder.creationTime;
     this.expirationTime = builder.expirationTime;
     this.lastModifiedTime = builder.lastModifiedTime;
+    this.numBytes = builder.numBytes;
+    this.numRows = builder.numRows;
     this.definition = builder.definition;
     this.encryptionConfiguration = builder.encryptionConfiguration;
     labels = builder.labels;
@@ -329,6 +355,16 @@ public  T getDefinition() {
     return (T) definition;
   }
 
+  /** Returns the size of this table in bytes */
+  public Long getNumBytes() {
+    return numBytes;
+  }
+
+  /** Returns the number of rows of data in this table */
+  public BigInteger getNumRows() {
+    return numRows;
+  }
+
   /**
    * Return a map for labels applied to the table.
    *
@@ -357,6 +393,8 @@ public String toString() {
         .add("expirationTime", expirationTime)
         .add("creationTime", creationTime)
         .add("lastModifiedTime", lastModifiedTime)
+        .add("numBytes", numBytes)
+        .add("numRows", numRows)
         .add("definition", definition)
         .add("encryptionConfiguration", encryptionConfiguration)
         .add("labels", labels)
diff --git a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/StandardTableDefinitionTest.java b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/StandardTableDefinitionTest.java
index 79414fa5e6c2..d70d33fb119b 100644
--- a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/StandardTableDefinitionTest.java
+++ b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/StandardTableDefinitionTest.java
@@ -120,6 +120,11 @@ public void testFromPbWithNullEstimatedRowsAndBytes() {
         TABLE_DEFINITION.toPb().setStreamingBuffer(new Streamingbuffer()));
   }
 
+  @Test
+  public void testStreamingBufferWithNullFieldsToPb() {
+    new StreamingBuffer(null, null, null).toPb();
+  }
+
   private void compareStandardTableDefinition(
       StandardTableDefinition expected, StandardTableDefinition value) {
     assertEquals(expected, value);
diff --git a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/TableInfoTest.java b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/TableInfoTest.java
index 98434713478d..6e35ce6cb620 100644
--- a/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/TableInfoTest.java
+++ b/google-cloud-clients/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/TableInfoTest.java
@@ -20,6 +20,7 @@
 import static org.junit.Assert.assertNull;
 
 import com.google.common.collect.ImmutableList;
+import java.math.BigInteger;
 import java.util.Collections;
 import java.util.List;
 import org.junit.Test;
@@ -93,6 +94,8 @@ public class TableInfoTest {
           .setFriendlyName(FRIENDLY_NAME)
           .setGeneratedId(GENERATED_ID)
           .setLastModifiedTime(LAST_MODIFIED_TIME)
+          .setNumBytes(NUM_BYTES)
+          .setNumRows(BigInteger.valueOf(NUM_ROWS))
           .setSelfLink(SELF_LINK)
           .setLabels(Collections.singletonMap("a", "b"))
           .build();
@@ -244,6 +247,8 @@ private void compareTableInfo(TableInfo expected, TableInfo value) {
     assertEquals(expected.getFriendlyName(), value.getFriendlyName());
     assertEquals(expected.getGeneratedId(), value.getGeneratedId());
     assertEquals(expected.getLastModifiedTime(), value.getLastModifiedTime());
+    assertEquals(expected.getNumBytes(), value.getNumBytes());
+    assertEquals(expected.getNumRows(), value.getNumRows());
     assertEquals(expected.getSelfLink(), value.getSelfLink());
     assertEquals(expected.getLabels(), value.getLabels());
     assertEquals(expected.hashCode(), value.hashCode());
diff --git a/google-cloud-clients/google-cloud-bigquerydatatransfer/README.md b/google-cloud-clients/google-cloud-bigquerydatatransfer/README.md
index 0cbebf38c8eb..8cf5f2afd489 100644
--- a/google-cloud-clients/google-cloud-bigquerydatatransfer/README.md
+++ b/google-cloud-clients/google-cloud-bigquerydatatransfer/README.md
@@ -23,16 +23,16 @@ Add this to your pom.xml file
 
   com.google.cloud
   google-cloud-bigquerydatatransfer
-  0.74.0-beta
+  0.76.0-beta
 
 ```
 If you are using Gradle, add this to your dependencies
 ```Groovy
-compile 'com.google.cloud:google-cloud-bigquerydatatransfer:0.74.0-beta'
+compile 'com.google.cloud:google-cloud-bigquerydatatransfer:0.76.0-beta'
 ```
 If you are using SBT, add this to your dependencies
 ```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "0.74.0-beta"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "0.76.0-beta"
 ```
 [//]: # ({x-version-update-end})
 
diff --git a/google-cloud-clients/google-cloud-bigquerydatatransfer/pom.xml b/google-cloud-clients/google-cloud-bigquerydatatransfer/pom.xml
index 461993beb4b7..8c9a41d62668 100644
--- a/google-cloud-clients/google-cloud-bigquerydatatransfer/pom.xml
+++ b/google-cloud-clients/google-cloud-bigquerydatatransfer/pom.xml
@@ -2,7 +2,7 @@
 
   4.0.0
   google-cloud-bigquerydatatransfer
-  0.74.1-beta-SNAPSHOT
+  0.76.0-beta
   jar
   Google Cloud Bigquery Data Transfer
   https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-bigquerydatatransfer
@@ -12,7 +12,7 @@
   
     com.google.cloud
     google-cloud-clients
-    0.74.1-alpha-SNAPSHOT
+    0.76.0-alpha
   
   
     google-cloud-bigquerydatatransfer
diff --git a/google-cloud-clients/google-cloud-bigquerystorage/README.md b/google-cloud-clients/google-cloud-bigquerystorage/README.md
index b24262f0d79d..211ead343951 100644
--- a/google-cloud-clients/google-cloud-bigquerystorage/README.md
+++ b/google-cloud-clients/google-cloud-bigquerystorage/README.md
@@ -20,16 +20,16 @@ Add this to your pom.xml file
 
   com.google.cloud
   google-cloud-bigquerystorage
-  0.74.0-beta
+  0.76.0-beta
 
 ```
 If you are using Gradle, add this to your dependencies
 ```Groovy
-compile 'com.google.cloud:google-cloud-bigquerystorage:0.74.0-beta'
+compile 'com.google.cloud:google-cloud-bigquerystorage:0.76.0-beta'
 ```
 If you are using SBT, add this to your dependencies
 ```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigquerystorage" % "0.74.0-beta"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigquerystorage" % "0.76.0-beta"
 ```
 [//]: # ({x-version-update-end})
 
diff --git a/google-cloud-clients/google-cloud-bigquerystorage/pom.xml b/google-cloud-clients/google-cloud-bigquerystorage/pom.xml
index 8f925d6be750..f56e4177654e 100644
--- a/google-cloud-clients/google-cloud-bigquerystorage/pom.xml
+++ b/google-cloud-clients/google-cloud-bigquerystorage/pom.xml
@@ -2,7 +2,7 @@
 
     4.0.0
     google-cloud-bigquerystorage
-    0.74.1-alpha-SNAPSHOT
+    0.76.0-alpha
     jar
     Google Cloud Bigquery Storage
     https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-bigquerystorage
@@ -12,7 +12,7 @@
     
         com.google.cloud
         google-cloud-clients
-        0.74.1-alpha-SNAPSHOT
+        0.76.0-alpha
     
     
         google-cloud-bigquerystorage
diff --git a/google-cloud-clients/google-cloud-bigtable-admin/README.md b/google-cloud-clients/google-cloud-bigtable-admin/README.md
index 6cff7f98d32f..c3ab04696faf 100644
--- a/google-cloud-clients/google-cloud-bigtable-admin/README.md
+++ b/google-cloud-clients/google-cloud-bigtable-admin/README.md
@@ -21,16 +21,16 @@ If you are using Maven, add this to your pom.xml file
 
   com.google.cloud
   google-cloud-bigtable-admin
-  0.74.0-alpha
+  0.76.0-alpha
 
 ```
 If you are using Gradle, add this to your dependencies
 ```Groovy
-compile 'com.google.cloud:google-cloud-bigtable-admin:0.74.0-alpha'
+compile 'com.google.cloud:google-cloud-bigtable-admin:0.76.0-alpha'
 ```
 If you are using SBT, add this to your dependencies
 ```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigtable-admin" % "0.74.0-alpha"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigtable-admin" % "0.76.0-alpha"
 ```
 [//]: # ({x-version-update-end})
 
diff --git a/google-cloud-clients/google-cloud-bigtable-admin/pom.xml b/google-cloud-clients/google-cloud-bigtable-admin/pom.xml
index b0523b226e26..bf100e0a2d68 100644
--- a/google-cloud-clients/google-cloud-bigtable-admin/pom.xml
+++ b/google-cloud-clients/google-cloud-bigtable-admin/pom.xml
@@ -2,7 +2,7 @@
 
   4.0.0
   google-cloud-bigtable-admin
-  0.74.1-alpha-SNAPSHOT
+  0.76.0-alpha
   jar
   Google Cloud Bigtable Admin
   https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-bigtable
@@ -12,7 +12,7 @@
   
     com.google.cloud
     google-cloud-clients
-    0.74.1-alpha-SNAPSHOT
+    0.76.0-alpha
   
   
     google-cloud-bigtable-admin
diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java
index ccec11154fdc..7c673bae7b1d 100644
--- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java
+++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java
@@ -22,18 +22,14 @@
 import com.google.api.gax.rpc.ApiExceptions;
 import com.google.api.gax.rpc.NotFoundException;
 import com.google.api.resourcenames.ResourceName;
-import com.google.bigtable.admin.v2.AppProfileName;
-import com.google.bigtable.admin.v2.ClusterName;
 import com.google.bigtable.admin.v2.DeleteAppProfileRequest;
 import com.google.bigtable.admin.v2.GetAppProfileRequest;
-import com.google.bigtable.admin.v2.InstanceName;
 import com.google.bigtable.admin.v2.ListAppProfilesRequest;
-import com.google.bigtable.admin.v2.LocationName;
-import com.google.bigtable.admin.v2.ProjectName;
 import com.google.cloud.Policy;
 import com.google.cloud.Policy.DefaultMarshaller;
 import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPage;
 import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse;
+import com.google.cloud.bigtable.admin.v2.internal.NameUtil;
 import com.google.cloud.bigtable.admin.v2.models.AppProfile;
 import com.google.cloud.bigtable.admin.v2.models.Cluster;
 import com.google.cloud.bigtable.admin.v2.models.CreateAppProfileRequest;
@@ -57,7 +53,6 @@
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
-import java.util.Objects;
 import javax.annotation.Nonnull;
 
 /**
@@ -67,7 +62,7 @@
  * 

See the individual methods for example code. * *

{@code
- * try(BigtableInstanceAdminClient client =  BigtableInstanceAdminClient.create(ProjectName.of("my-project"))) {
+ * try(BigtableInstanceAdminClient client =  BigtableInstanceAdminClient.create("my-project")) {
  *   CreateInstanceRequest request = CreateInstanceRequest.of("my-instance")
  *     .addCluster("my-cluster", "us-east1-c", 3, StorageType.SSD);
  *
@@ -85,7 +80,7 @@
  *
  * 
{@code
  * BigtableInstanceAdminSettings settings = BigtableInstanceAdminSettings.newBuilder()
- *   .setProjectName(ProjectName.of("my-project"))
+ *   .setProjectId("my-project")
  *   .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *   .build();
  *
@@ -96,7 +91,7 @@
  *
  * 
{@code
  * BigtableInstanceAdminSettings settings = BigtableInstanceAdminSettings.newBuilder()
- *   .setProjectName(ProjectName.of("my-project"))
+ *   .setProjectId("my-project")
  *   .setEndpoint(myEndpoint)
  *   .build();
  *
@@ -104,40 +99,73 @@
  * }
*/ public final class BigtableInstanceAdminClient implements AutoCloseable { - private final ProjectName projectName; + + private final String projectId; private final BigtableInstanceAdminStub stub; - /** Constructs an instance of BigtableInstanceAdminClient with the given ProjectName. */ - public static BigtableInstanceAdminClient create(@Nonnull ProjectName projectName) - throws IOException { - return create(BigtableInstanceAdminSettings.newBuilder().setProjectName(projectName).build()); + /** Constructs an instance of BigtableInstanceAdminClient with the given project id. */ + public static BigtableInstanceAdminClient create(@Nonnull String projectId) throws IOException { + return create(BigtableInstanceAdminSettings.newBuilder().setProjectId(projectId).build()); + } + + /** + * Constructs an instance of BigtableInstanceAdminClient with the given project id. + * + * @deprecated Please use {@link #create(String)}. + */ + @Deprecated + public static BigtableInstanceAdminClient create( + @Nonnull com.google.bigtable.admin.v2.ProjectName projectName) throws IOException { + return create(projectName.getProject()); } /** Constructs an instance of BigtableInstanceAdminClient with the given settings. */ public static BigtableInstanceAdminClient create(@Nonnull BigtableInstanceAdminSettings settings) throws IOException { - return create(settings.getProjectName(), settings.getStubSettings().createStub()); + return create(settings.getProjectId(), settings.getStubSettings().createStub()); + } + + /** Constructs an instance of BigtableInstanceAdminClient with the given project id and stub. */ + public static BigtableInstanceAdminClient create( + @Nonnull String projectId, @Nonnull BigtableInstanceAdminStub stub) { + return new BigtableInstanceAdminClient(projectId, stub); } - /** Constructs an instance of BigtableInstanceAdminClient with the given ProjectName and stub. */ + /** + * Constructs an instance of BigtableInstanceAdminClient with the given ProjectName and stub. + * + * @deprecated Please use {@link #create(String, BigtableInstanceAdminStub)}. + */ + @Deprecated public static BigtableInstanceAdminClient create( - @Nonnull ProjectName projectName, @Nonnull BigtableInstanceAdminStub stub) { - return new BigtableInstanceAdminClient(projectName, stub); + @Nonnull com.google.bigtable.admin.v2.ProjectName projectName, + @Nonnull BigtableInstanceAdminStub stub) { + return create(projectName.getProject(), stub); } private BigtableInstanceAdminClient( - @Nonnull ProjectName projectName, @Nonnull BigtableInstanceAdminStub stub) { - this.projectName = projectName; + @Nonnull String projectId, @Nonnull BigtableInstanceAdminStub stub) { + this.projectId = projectId; this.stub = stub; } - /** Gets the ProjectName this client is associated with. */ + /** Gets the project id this client is associated with. */ + public String getProjectId() { + return projectId; + } + + /** + * Gets the ProjectName this client is associated with. + * + * @deprecated Please use {@link #getProjectId()}. + */ + @Deprecated @SuppressWarnings("WeakerAccess") - public ProjectName getProjectName() { - return projectName; + public com.google.bigtable.admin.v2.ProjectName getProjectName() { + return com.google.bigtable.admin.v2.ProjectName.of(projectId); } - /** Closes the client and frees all resources associated with it (like thread pools) */ + /** Closes the client and frees all resources associated with it (like thread pools). */ @Override public void close() { stub.close(); @@ -181,7 +209,7 @@ public Instance createInstance(CreateInstanceRequest request) { @SuppressWarnings("WeakerAccess") public ApiFuture createInstanceAsync(CreateInstanceRequest request) { return ApiFutures.transform( - stub.createInstanceOperationCallable().futureCall(request.toProto(projectName)), + stub.createInstanceOperationCallable().futureCall(request.toProto(projectId)), new ApiFunction() { @Override public Instance apply(com.google.bigtable.admin.v2.Instance proto) { @@ -229,7 +257,7 @@ public Instance updateInstance(UpdateInstanceRequest request) { @SuppressWarnings("WeakerAccess") public ApiFuture updateInstanceAsync(UpdateInstanceRequest request) { return ApiFutures.transform( - stub.partialUpdateInstanceOperationCallable().futureCall(request.toProto(projectName)), + stub.partialUpdateInstanceOperationCallable().futureCall(request.toProto(projectId)), new ApiFunction() { @Override public Instance apply(com.google.bigtable.admin.v2.Instance proto) { @@ -265,12 +293,10 @@ public Instance getInstance(String id) { */ @SuppressWarnings("WeakerAccess") public ApiFuture getInstanceAsync(String instanceId) { - InstanceName name = InstanceName.of(projectName.getProject(), instanceId); + String name = NameUtil.formatInstanceName(projectId, instanceId); com.google.bigtable.admin.v2.GetInstanceRequest request = - com.google.bigtable.admin.v2.GetInstanceRequest.newBuilder() - .setName(name.toString()) - .build(); + com.google.bigtable.admin.v2.GetInstanceRequest.newBuilder().setName(name).build(); return ApiFutures.transform( stub.getInstanceCallable().futureCall(request), @@ -337,7 +363,7 @@ public List listInstances() { public ApiFuture> listInstancesAsync() { com.google.bigtable.admin.v2.ListInstancesRequest request = com.google.bigtable.admin.v2.ListInstancesRequest.newBuilder() - .setParent(projectName.toString()) + .setParent(NameUtil.formatProjectName(projectId)) .build(); ApiFuture responseFuture = @@ -362,8 +388,7 @@ public List apply(com.google.bigtable.admin.v2.ListInstancesResponse p ImmutableList.Builder failedZones = ImmutableList.builder(); for (String locationStr : proto.getFailedLocationsList()) { - LocationName fullLocation = Objects.requireNonNull(LocationName.parse(locationStr)); - failedZones.add(fullLocation.getLocation()); + failedZones.add(NameUtil.extractZoneIdFromLocationName(locationStr)); } if (!failedZones.build().isEmpty()) { @@ -402,11 +427,11 @@ public void deleteInstance(String instanceId) { */ @SuppressWarnings("WeakerAccess") public ApiFuture deleteInstanceAsync(String instanceId) { - InstanceName instanceName = InstanceName.of(projectName.getProject(), instanceId); + String instanceName = NameUtil.formatInstanceName(projectId, instanceId); com.google.bigtable.admin.v2.DeleteInstanceRequest request = com.google.bigtable.admin.v2.DeleteInstanceRequest.newBuilder() - .setName(instanceName.toString()) + .setName(instanceName) .build(); return ApiFutures.transform( @@ -526,7 +551,7 @@ public Cluster createCluster(CreateClusterRequest request) { @SuppressWarnings("WeakerAccess") public ApiFuture createClusterAsync(CreateClusterRequest request) { return ApiFutures.transform( - stub.createClusterOperationCallable().futureCall(request.toProto(projectName)), + stub.createClusterOperationCallable().futureCall(request.toProto(projectId)), new ApiFunction() { @Override public Cluster apply(com.google.bigtable.admin.v2.Cluster proto) { @@ -562,12 +587,10 @@ public Cluster getCluster(String instanceId, String clusterId) { */ @SuppressWarnings("WeakerAccess") public ApiFuture getClusterAsync(String instanceId, String clusterId) { - ClusterName name = ClusterName.of(projectName.getProject(), instanceId, clusterId); + String name = NameUtil.formatClusterName(projectId, instanceId, clusterId); com.google.bigtable.admin.v2.GetClusterRequest request = - com.google.bigtable.admin.v2.GetClusterRequest.newBuilder() - .setName(name.toString()) - .build(); + com.google.bigtable.admin.v2.GetClusterRequest.newBuilder().setName(name).build(); return ApiFutures.transform( stub.getClusterCallable().futureCall(request), @@ -632,11 +655,9 @@ public List listClusters(String instanceId) { */ @SuppressWarnings("WeakerAccess") public ApiFuture> listClustersAsync(String instanceId) { - InstanceName name = InstanceName.of(projectName.getProject(), instanceId); + String name = NameUtil.formatInstanceName(projectId, instanceId); com.google.bigtable.admin.v2.ListClustersRequest request = - com.google.bigtable.admin.v2.ListClustersRequest.newBuilder() - .setParent(name.toString()) - .build(); + com.google.bigtable.admin.v2.ListClustersRequest.newBuilder().setParent(name).build(); return ApiFutures.transform( stub.listClustersCallable().futureCall(request), @@ -657,8 +678,7 @@ public List apply(com.google.bigtable.admin.v2.ListClustersResponse pro ImmutableList.Builder failedZones = ImmutableList.builder(); for (String locationStr : proto.getFailedLocationsList()) { - LocationName fullLocation = Objects.requireNonNull(LocationName.parse(locationStr)); - failedZones.add(fullLocation.getLocation()); + failedZones.add(NameUtil.extractZoneIdFromLocationName(locationStr)); } if (!failedZones.build().isEmpty()) { @@ -700,11 +720,11 @@ public Cluster resizeCluster(String instanceId, String clusterId, int numServeNo public ApiFuture resizeClusterAsync( String instanceId, String clusterId, int numServeNodes) { - ClusterName name = ClusterName.of(projectName.getProject(), instanceId, clusterId); + String name = NameUtil.formatClusterName(projectId, instanceId, clusterId); com.google.bigtable.admin.v2.Cluster request = com.google.bigtable.admin.v2.Cluster.newBuilder() - .setName(name.toString()) + .setName(name) .setServeNodes(numServeNodes) .build(); @@ -748,7 +768,7 @@ public void deleteCluster(String instanceId, String clusterId) { */ @SuppressWarnings("WeakerAccess") public ApiFuture deleteClusterAsync(String instanceId, String clusterId) { - ClusterName name = ClusterName.of(projectName.getProject(), instanceId, clusterId); + String name = NameUtil.formatClusterName(projectId, instanceId, clusterId); com.google.bigtable.admin.v2.DeleteClusterRequest request = com.google.bigtable.admin.v2.DeleteClusterRequest.newBuilder() @@ -804,7 +824,7 @@ public AppProfile createAppProfile(CreateAppProfileRequest request) { @SuppressWarnings("WeakerAccess") public ApiFuture createAppProfileAsync(CreateAppProfileRequest request) { return ApiFutures.transform( - stub.createAppProfileCallable().futureCall(request.toProto(projectName)), + stub.createAppProfileCallable().futureCall(request.toProto(projectId)), new ApiFunction() { @Override public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { @@ -845,7 +865,7 @@ public AppProfile getAppProfile(String instanceId, String appProfileId) { */ @SuppressWarnings("WeakerAccess") public ApiFuture getAppProfileAsync(String instanceId, String appProfileId) { - AppProfileName name = AppProfileName.of(projectName.getProject(), instanceId, appProfileId); + String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); GetAppProfileRequest request = GetAppProfileRequest.newBuilder().setName(name.toString()).build(); @@ -892,10 +912,10 @@ public List listAppProfiles(String instanceId) { */ @SuppressWarnings("WeakerAccess") public ApiFuture> listAppProfilesAsync(String instanceId) { - InstanceName instanceName = InstanceName.of(projectName.getProject(), instanceId); + String instanceName = NameUtil.formatInstanceName(projectId, instanceId); ListAppProfilesRequest request = - ListAppProfilesRequest.newBuilder().setParent(instanceName.toString()).build(); + ListAppProfilesRequest.newBuilder().setParent(instanceName).build(); // TODO(igorbernstein2): try to upstream pagination spooling or figure out a way to expose the // paginated responses while maintaining the wrapper facade. @@ -1005,7 +1025,7 @@ public AppProfile updateAppProfile(UpdateAppProfileRequest request) { @SuppressWarnings("WeakerAccess") public ApiFuture updateAppProfileAsync(UpdateAppProfileRequest request) { return ApiFutures.transform( - stub.updateAppProfileOperationCallable().futureCall(request.toProto(projectName)), + stub.updateAppProfileOperationCallable().futureCall(request.toProto(projectId)), new ApiFunction() { @Override public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { @@ -1042,9 +1062,8 @@ public void deleteAppProfile(String instanceId, String appProfileId) { */ @SuppressWarnings("WeakerAccess") public ApiFuture deleteAppProfileAsync(String instanceId, String appProfileId) { - AppProfileName name = AppProfileName.of(projectName.getProject(), instanceId, appProfileId); - DeleteAppProfileRequest request = - DeleteAppProfileRequest.newBuilder().setName(name.toString()).build(); + String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); + DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder().setName(name).build(); return ApiFutures.transform( stub.deleteAppProfileCallable().futureCall(request), @@ -1107,10 +1126,9 @@ public Policy getIamPolicy(String instanceId) { */ @SuppressWarnings("WeakerAccess") public ApiFuture getIamPolicyAsync(String instanceId) { - InstanceName name = InstanceName.of(projectName.getProject(), instanceId); + String name = NameUtil.formatInstanceName(projectId, instanceId); - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder().setResource(name.toString()).build(); + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(name).build(); final IamPolicyMarshaller marshaller = new IamPolicyMarshaller(); @@ -1180,12 +1198,12 @@ public Policy setIamPolicy(String instanceId, Policy policy) { */ @SuppressWarnings("WeakerAccess") public ApiFuture setIamPolicyAsync(String instanceId, Policy policy) { - InstanceName name = InstanceName.of(projectName.getProject(), instanceId); + String name = NameUtil.formatInstanceName(projectId, instanceId); final IamPolicyMarshaller marshaller = new IamPolicyMarshaller(); SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() - .setResource(name.toString()) + .setResource(name) .setPolicy(marshaller.toPb(policy)) .build(); @@ -1218,9 +1236,13 @@ public Policy apply(com.google.iam.v1.Policy proto) { * @see Cloud Bigtable * permissions */ - @SuppressWarnings("WeakerAccess") + @SuppressWarnings({"WeakerAccess", "deprecation"}) public List testIamPermission(String instanceId, String... permissions) { - return testIamPermission(InstanceName.of(projectName.getProject(), instanceId), permissions); + // TODO(igorbernstein2): Stop using typesafe names + com.google.bigtable.admin.v2.InstanceName instanceName = + com.google.bigtable.admin.v2.InstanceName.of(projectId, instanceId); + + return testIamPermission(instanceName, permissions); } /** @@ -1250,10 +1272,11 @@ public List testIamPermission(String instanceId, String... permissions) * @see Cloud Bigtable * permissions */ - @SuppressWarnings("WeakerAccess") + @SuppressWarnings({"WeakerAccess", "deprecation"}) public ApiFuture> testIamPermissionAsync(String instanceId, String... permissions) { + // TODO(igorbernstein2): Stop using typesafe names return testIamPermissionAsync( - InstanceName.of(projectName.getProject(), instanceId), permissions); + com.google.bigtable.admin.v2.InstanceName.of(projectId, instanceId), permissions); } /** @@ -1275,7 +1298,9 @@ public ApiFuture> testIamPermissionAsync(String instanceId, String. * * @see Cloud Bigtable * permissions + * @deprecated Please use {@link #testIamPermission(String, String...)}. */ + @Deprecated @SuppressWarnings("WeakerAccess") public List testIamPermission(ResourceName resourceName, String... permissions) { return ApiExceptions.callAndTranslateApiException( @@ -1310,6 +1335,7 @@ public List testIamPermission(ResourceName resourceName, String... permi * * @see Cloud Bigtable * permissions + * @deprecated Please use {@link #testIamPermissionAsync(String, String...)} */ @SuppressWarnings("WeakerAccess") public ApiFuture> testIamPermissionAsync( diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettings.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettings.java index 77cbe102f1ab..e92ff7333289 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettings.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettings.java @@ -26,14 +26,13 @@ /** * Settings class to configure an instance of {@link BigtableInstanceAdminClient}. * - *

It must be configured with a {@link ProjectName} and can be used to change default RPC - * settings. + *

It must be configured with a project id and can be used to change default RPC settings. * *

Example usage: * *

{@code
  * BigtableInstanceAdminSettings.Builder settingsBuilder = BigtableInstanceAdminSettings.newBuilder()
- *  .setProjectName(ProjectName.of("my-project"));
+ *  .setProjectId("my-project");
  *
  * settingsBuilder.stubSettings().createInstanceSettings()
  *   .setRetrySettings(
@@ -45,21 +44,32 @@
  * }
*/ public final class BigtableInstanceAdminSettings { - private final ProjectName projectName; + private final String projectId; private final BigtableInstanceAdminStubSettings stubSettings; private BigtableInstanceAdminSettings(Builder builder) throws IOException { - Preconditions.checkNotNull(builder.projectName, "ProjectName must be set"); + Preconditions.checkNotNull(builder.projectId, "Project ud must be set"); Verify.verifyNotNull(builder.stubSettings, "stubSettings should never be null"); - this.projectName = builder.projectName; + this.projectId = builder.projectId; this.stubSettings = builder.stubSettings.build(); } - /** Gets the anme of the project whose instances the client will manager. */ + /** Gets the id of the project whose instances the client will manage. */ @Nonnull - public ProjectName getProjectName() { - return projectName; + public String getProjectId() { + return projectId; + } + + /** + * Gets the name of the project whose instances the client will manager. + * + * @deprecated Please use {@link #getProjectId()}. + */ + @Deprecated + @Nonnull + public com.google.bigtable.admin.v2.ProjectName getProjectName() { + return ProjectName.of(projectId); } /** Gets the underlying RPC settings. */ @@ -80,7 +90,7 @@ public static Builder newBuilder() { /** Builder for BigtableInstanceAdminSettings. */ public static final class Builder { - @Nullable private ProjectName projectName; + @Nullable private String projectId; private final BigtableInstanceAdminStubSettings.Builder stubSettings; private Builder() { @@ -88,21 +98,45 @@ private Builder() { } private Builder(BigtableInstanceAdminSettings settings) { - this.projectName = settings.projectName; + this.projectId = settings.projectId; this.stubSettings = settings.stubSettings.toBuilder(); } - /** Sets the name of instance whose tables the client will manage. */ - public Builder setProjectName(@Nonnull ProjectName projectName) { - Preconditions.checkNotNull(projectName); - this.projectName = projectName; + /** Sets the id of the project whose instances the client will manage. */ + public Builder setProjectId(@Nonnull String projectId) { + Preconditions.checkNotNull(projectId); + this.projectId = projectId; return this; } - /** Gets the name of the project whose instances the client will manage. */ + /** Gets the id of the project whose instances the client will manage. */ + @Nullable + public String getProjectId() { + return projectId; + } + + /** + * Sets the name of instance whose tables the client will manage. + * + * @deprecated Please use {@link #setProjectId(String)}. + */ + @Deprecated + public Builder setProjectName(@Nonnull com.google.bigtable.admin.v2.ProjectName projectName) { + return setProjectId(projectName.getProject()); + } + + /** + * Gets the name of the project whose instances the client will manage. + * + * @deprecated Please use {@link #getProjectId()}. + */ + @Deprecated @Nullable public ProjectName getProjectName() { - return projectName; + if (projectId != null) { + return ProjectName.of(projectId); + } + return null; } /** diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java index f2b4ddec753b..c4d3b88314f9 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java @@ -24,11 +24,10 @@ import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; import com.google.bigtable.admin.v2.GetTableRequest; -import com.google.bigtable.admin.v2.InstanceName; import com.google.bigtable.admin.v2.ListTablesRequest; -import com.google.bigtable.admin.v2.TableName; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPage; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; import com.google.cloud.bigtable.admin.v2.models.ModifyColumnFamiliesRequest; import com.google.cloud.bigtable.admin.v2.models.Table; @@ -52,7 +51,7 @@ *

Sample code to get started: * *

{@code
- * try(BigtableTableAdminClient client =  BigtableTableAdminClient.create(InstanceName.of("[PROJECT]", "[INSTANCE]"))) {
+ * try(BigtableTableAdminClient client =  BigtableTableAdminClient.create("[PROJECT]", "[INSTANCE]")) {
  *   CreateTable request =
  *     CreateTableRequest.of("my-table")
  *       .addFamily("cf1")
@@ -73,7 +72,8 @@
  *
  * 
{@code
  * BigtableTableAdminSettings tableAdminSettings = BigtableTableAdminSettings.newBuilder()
- *   .setInstanceName(InstanceName.of("[PROJECT]", "[INSTANCE]"))
+ *   .setProjectId("[PROJECT]")
+ *   .setInstanceId("[INSTANCE]")
  *   .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *   .build();
  *
@@ -85,20 +85,38 @@
  *
  * 
{@code
  * BigtableTableAdminSettings tableAdminSettings = BigtableTableAdminSettings.newBuilder()
- *   .setInstanceName(InstanceName.of("[PROJECT]", "[INSTANCE]"))
+ *   .setProjectId("[PROJECT]")
+ *   .setInstanceId("[INSTANCE]")
  *   .setEndpoint(myEndpoint).build();
  *
  * BigtableTableAdminClient client = BigtableTableAdminClient.create(tableAdminSettings);
  * }
*/ public final class BigtableTableAdminClient implements AutoCloseable { + private final EnhancedBigtableTableAdminStub stub; - private final InstanceName instanceName; + private final String projectId; + private final String instanceId; - /** Constructs an instance of BigtableTableAdminClient with the given instanceName. */ - public static BigtableTableAdminClient create(@Nonnull InstanceName instanceName) - throws IOException { - return create(BigtableTableAdminSettings.newBuilder().setInstanceName(instanceName).build()); + /** Constructs an instance of BigtableTableAdminClient with the given project and instance ids. */ + public static BigtableTableAdminClient create( + @Nonnull String projectId, @Nonnull String instanceId) throws IOException { + return create( + BigtableTableAdminSettings.newBuilder() + .setProjectId(projectId) + .setInstanceId(instanceId) + .build()); + } + + /** + * Constructs an instance of BigtableTableAdminClient with the given instanceName. + * + * @deprecated Please {@link #create(String, String)}. + */ + @Deprecated + public static BigtableTableAdminClient create( + @Nonnull com.google.bigtable.admin.v2.InstanceName instanceName) throws IOException { + return create(instanceName.getProject(), instanceName.getInstance()); } /** Constructs an instance of BigtableTableAdminClient with the given settings. */ @@ -106,26 +124,47 @@ public static BigtableTableAdminClient create(@Nonnull BigtableTableAdminSetting throws IOException { EnhancedBigtableTableAdminStub stub = EnhancedBigtableTableAdminStub.createEnhanced(settings.getStubSettings()); - return create(settings.getInstanceName(), stub); + return create(settings.getProjectId(), settings.getInstanceId(), stub); } /** Constructs an instance of BigtableTableAdminClient with the given instanceName and stub. */ public static BigtableTableAdminClient create( - @Nonnull InstanceName instanceName, @Nonnull EnhancedBigtableTableAdminStub stub) { - return new BigtableTableAdminClient(instanceName, stub); + @Nonnull String projectId, + @Nonnull String instanceId, + @Nonnull EnhancedBigtableTableAdminStub stub) { + return new BigtableTableAdminClient(projectId, instanceId, stub); } private BigtableTableAdminClient( - @Nonnull InstanceName instanceName, @Nonnull EnhancedBigtableTableAdminStub stub) { - Preconditions.checkNotNull(instanceName); + @Nonnull String projectId, + @Nonnull String instanceId, + @Nonnull EnhancedBigtableTableAdminStub stub) { + Preconditions.checkNotNull(projectId); + Preconditions.checkNotNull(instanceId); Preconditions.checkNotNull(stub); - this.instanceName = instanceName; + this.projectId = projectId; + this.instanceId = instanceId; this.stub = stub; } - /** Gets the instanceName this client is associated with. */ - public InstanceName getInstanceName() { - return instanceName; + /** Gets the project id of the instance whose tables this client manages. */ + public String getProjectId() { + return projectId; + } + + /** Gets the id of the instance whose tables this client manages. */ + public String getInstanceId() { + return instanceId; + } + + /** + * Gets the instanceName this client is associated with. + * + * @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}. + */ + @Deprecated + public com.google.bigtable.admin.v2.InstanceName getInstanceName() { + return com.google.bigtable.admin.v2.InstanceName.of(projectId, instanceId); } @Override @@ -183,7 +222,7 @@ public Table createTable(CreateTableRequest request) { @SuppressWarnings("WeakerAccess") public ApiFuture createTableAsync(CreateTableRequest request) { return transformToTableResponse( - this.stub.createTableCallable().futureCall(request.toProto(instanceName))); + this.stub.createTableCallable().futureCall(request.toProto(projectId, instanceId))); } /** @@ -275,7 +314,9 @@ public Table modifyFamilies(ModifyColumnFamiliesRequest request) { @SuppressWarnings("WeakerAccess") public ApiFuture
modifyFamiliesAsync(ModifyColumnFamiliesRequest request) { return transformToTableResponse( - this.stub.modifyColumnFamiliesCallable().futureCall(request.toProto(instanceName))); + this.stub + .modifyColumnFamiliesCallable() + .futureCall(request.toProto(projectId, instanceId))); } /** @@ -500,7 +541,9 @@ public List listTables() { @SuppressWarnings("WeakerAccess") public ApiFuture> listTablesAsync() { ListTablesRequest request = - ListTablesRequest.newBuilder().setParent(instanceName.toString()).build(); + ListTablesRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(projectId, instanceId)) + .build(); // TODO(igorbernstein2): try to upstream pagination spooling or figure out a way to expose the // paginated responses while maintaining the wrapper facade. @@ -550,7 +593,7 @@ public ApiFuture> apply( public List apply(List protos) { List results = Lists.newArrayListWithCapacity(protos.size()); for (com.google.bigtable.admin.v2.Table proto : protos) { - results.add(TableName.parse(proto.getName()).getTable()); + results.add(NameUtil.extractTableIdFromTableName(proto.getName())); } return results; } @@ -718,8 +761,10 @@ public ApiFuture dropAllRowsAsync(String tableId) { */ @SuppressWarnings("WeakerAccess") public void awaitReplication(String tableId) { - TableName tableName = - TableName.of(instanceName.getProject(), instanceName.getInstance(), tableId); + // TODO(igorbernstein2): remove usage of typesafe names + com.google.bigtable.admin.v2.TableName tableName = + com.google.bigtable.admin.v2.TableName.of(projectId, instanceId, tableId); + ApiExceptions.callAndTranslateApiException( stub.awaitReplicationCallable().futureCall(tableName)); } @@ -752,8 +797,9 @@ public void awaitReplication(String tableId) { */ @SuppressWarnings("WeakerAccess") public ApiFuture awaitReplicationAsync(final String tableId) { - TableName tableName = - TableName.of(instanceName.getProject(), instanceName.getInstance(), tableId); + // TODO(igorbernstein2): remove usage of trypesafe names + com.google.bigtable.admin.v2.TableName tableName = + com.google.bigtable.admin.v2.TableName.of(projectId, instanceId, tableId); return stub.awaitReplicationCallable().futureCall(tableName); } @@ -762,7 +808,7 @@ public ApiFuture awaitReplicationAsync(final String tableId) { * projects/{project}/instances/{instance}/tables/{tableId} */ private String getTableName(String tableId) { - return TableName.of(instanceName.getProject(), instanceName.getInstance(), tableId).toString(); + return NameUtil.formatTableName(projectId, instanceId, tableId); } // TODO(igorbernstein): rename methods to make clear that they deal with futures. diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java index bc17c1df2e1e..f613bf3f7369 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java @@ -15,7 +15,6 @@ */ package com.google.cloud.bigtable.admin.v2; -import com.google.bigtable.admin.v2.InstanceName; import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStubSettings; import com.google.common.base.Preconditions; import com.google.common.base.Verify; @@ -26,14 +25,14 @@ /** * Settings class to configure an instance of {@link BigtableTableAdminClient}. * - *

It must be configured with an {@link InstanceName} and can be used to change default RPC - * settings. + *

It must be configured with a project id and instance id. * *

Example usage: * *

{@code
  * BigtableTableAdminSettings.Builder tableAdminSettingsBuilder = BigtableTableAdminSettings.newBuilder()
- *   .setInstanceName(InstanceName.of("my-project", "my-instance");
+ *   .setProjectId("my-project")
+ *   .setInstanceId("my-instance");
  *
  * tableAdminSettingsBuilder.stubSettings().createTableSettings()
  *   .setRetrySettings(
@@ -45,20 +44,36 @@
  * }
*/ public final class BigtableTableAdminSettings { - private final InstanceName instanceName; + private final String projectId; + private final String instanceId; private final BigtableTableAdminStubSettings stubSettings; private BigtableTableAdminSettings(Builder builder) throws IOException { - this.instanceName = - Preconditions.checkNotNull(builder.instanceName, "InstanceName must be set"); + this.projectId = Preconditions.checkNotNull(builder.projectId, "Project id must be set"); + this.instanceId = Preconditions.checkNotNull(builder.instanceId, "Instance id must be set"); this.stubSettings = Verify.verifyNotNull(builder.stubSettings, "stubSettings should never be null").build(); } - /** Gets the name of instance whose tables the client will manage. */ + /** Gets the project id of instance whose tables the client will manage. */ + public String getProjectId() { + return projectId; + } + + /** Gets the instance id whose tables the client will manage. */ + public String getInstanceId() { + return instanceId; + } + + /** + * Gets the name of instance whose tables the client will manage. + * + * @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}. + */ + @Deprecated @Nonnull - public InstanceName getInstanceName() { - return instanceName; + public com.google.bigtable.admin.v2.InstanceName getInstanceName() { + return com.google.bigtable.admin.v2.InstanceName.of(projectId, instanceId); } /** Gets the underlying RPC settings. */ @@ -78,7 +93,8 @@ public static Builder newBuilder() { /** Builder for BigtableTableAdminSettings. */ public static final class Builder { - @Nullable private InstanceName instanceName; + @Nullable private String projectId; + @Nullable private String instanceId; private final BigtableTableAdminStubSettings.Builder stubSettings; private Builder() { @@ -86,21 +102,63 @@ private Builder() { } private Builder(BigtableTableAdminSettings settings) { - this.instanceName = settings.instanceName; + this.projectId = settings.projectId; + this.instanceId = settings.instanceId; this.stubSettings = settings.stubSettings.toBuilder(); } - /** Sets the name of instance whose tables the client will manage. */ - public Builder setInstanceName(@Nonnull InstanceName instanceName) { + /** Sets the project id of the instance whose tables the client will manage. */ + public Builder setProjectId(@Nullable String projectId) { + Preconditions.checkNotNull(projectId); + this.projectId = projectId; + return this; + } + + /** Gets the project id of the instance whose tables the client will manage. */ + @Nullable + public String getProjectId() { + return projectId; + } + + /** Sets the instance id of the instance whose tables the client will manage. */ + public Builder setInstanceId(@Nullable String instanceId) { + Preconditions.checkNotNull(instanceId); + this.instanceId = instanceId; + return this; + } + + /** Gets the instance id of the instance whose tables the client will manage. */ + @Nullable + public String getInstanceId() { + return instanceId; + } + + /** + * Sets the name of instance whose tables the client will manage. + * + * @deprecated Please use {@link #setProjectId(String)} and {@link #setInstanceId(String)}. + */ + @Deprecated + public Builder setInstanceName( + @Nonnull com.google.bigtable.admin.v2.InstanceName instanceName) { Preconditions.checkNotNull(instanceName); - this.instanceName = instanceName; + this.projectId = instanceName.getProject(); + this.instanceId = instanceName.getInstance(); return this; } - /** Gets the name of instance whose tables the client will manage. */ + /** + * Gets the name of instance whose tables the client will manage. + * + * @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}. + */ + @Deprecated @Nullable - public InstanceName getInstanceName() { - return instanceName; + public com.google.bigtable.admin.v2.InstanceName getInstanceName() { + if (projectId != null && instanceId != null) { + return com.google.bigtable.admin.v2.InstanceName.of(projectId, instanceId); + } + return null; } /** diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/internal/NameUtil.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/internal/NameUtil.java new file mode 100644 index 000000000000..54fc1f88fa8a --- /dev/null +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/internal/NameUtil.java @@ -0,0 +1,75 @@ +/* + * Copyright 2019 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. + */ +package com.google.cloud.bigtable.admin.v2.internal; + +import com.google.api.core.InternalApi; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Internal helper to compose full resource names. + * + *

This class is considered an internal implementation detail and not meant to be used by + * applications. + */ +@InternalApi +public class NameUtil { + private static final Pattern TABLE_PATTERN = + Pattern.compile("projects/([^/]+)/instances/([^/]+)/tables/([^/]+)"); + private static final Pattern LOCATION_PATTERN = + Pattern.compile("projects/([^/]+)/locations/([^/]+)"); + + public static String formatProjectName(String projectId) { + return "projects/" + projectId; + } + + public static String formatInstanceName(String projectId, String instanceId) { + return formatProjectName(projectId) + "/instances/" + instanceId; + } + + public static String formatTableName(String projectId, String instanceId, String tableId) { + return formatInstanceName(projectId, instanceId) + "/tables/" + tableId; + } + + public static String formatLocationName(String projectId, String zone) { + return formatProjectName(projectId) + "/locations/" + zone; + } + + public static String extractTableIdFromTableName(String fullTableName) { + Matcher matcher = TABLE_PATTERN.matcher(fullTableName); + if (!matcher.matches()) { + throw new IllegalArgumentException("Invalid table name: " + fullTableName); + } + return matcher.group(3); + } + + public static String extractZoneIdFromLocationName(String fullLocationName) { + Matcher matcher = LOCATION_PATTERN.matcher(fullLocationName); + if (!matcher.matches()) { + throw new IllegalArgumentException("Invalid location name: " + fullLocationName); + } + return matcher.group(2); + } + + public static String formatClusterName(String projectId, String instanceId, String clusterId) { + return formatInstanceName(projectId, instanceId) + "/clusters/" + clusterId; + } + + public static String formatAppProfileName( + String projectId, String instanceId, String appProfileId) { + return formatInstanceName(projectId, instanceId) + "/appProfiles/" + appProfileId; + } +} diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequest.java index 2fbdb373bf04..35c41208bebb 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequest.java @@ -16,8 +16,7 @@ package com.google.cloud.bigtable.admin.v2.models; import com.google.api.core.InternalApi; -import com.google.bigtable.admin.v2.InstanceName; -import com.google.bigtable.admin.v2.ProjectName; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.AppProfile.MultiClusterRoutingPolicy; import com.google.cloud.bigtable.admin.v2.models.AppProfile.RoutingPolicy; import com.google.cloud.bigtable.admin.v2.models.AppProfile.SingleClusterRoutingPolicy; @@ -98,9 +97,9 @@ public CreateAppProfileRequest setRoutingPolicy(RoutingPolicy routingPolicy) { * not meant to be used by applications. */ @InternalApi - public com.google.bigtable.admin.v2.CreateAppProfileRequest toProto(ProjectName projectName) { - InstanceName name = InstanceName.of(projectName.getProject(), instanceId); + public com.google.bigtable.admin.v2.CreateAppProfileRequest toProto(String projectId) { + String name = NameUtil.formatInstanceName(projectId, instanceId); - return proto.setParent(name.toString()).build(); + return proto.setParent(name).build(); } } diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequest.java index 3acd52c43737..4711097d5321 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequest.java @@ -18,9 +18,7 @@ import static com.google.cloud.bigtable.admin.v2.models.StorageType.SSD; import com.google.api.core.InternalApi; -import com.google.bigtable.admin.v2.InstanceName; -import com.google.bigtable.admin.v2.LocationName; -import com.google.bigtable.admin.v2.ProjectName; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.common.base.Preconditions; import javax.annotation.Nonnull; @@ -111,11 +109,9 @@ public CreateClusterRequest setStorageType(@Nonnull StorageType storageType) { * not meant to be used by applications. */ @InternalApi - public com.google.bigtable.admin.v2.CreateClusterRequest toProto(ProjectName projectName) { - proto.setParent(InstanceName.of(projectName.getProject(), instanceId).toString()); - proto - .getClusterBuilder() - .setLocation(LocationName.of(projectName.getProject(), zone).toString()); + public com.google.bigtable.admin.v2.CreateClusterRequest toProto(String projectId) { + proto.setParent(NameUtil.formatInstanceName(projectId, instanceId)); + proto.getClusterBuilder().setLocation(NameUtil.formatLocationName(projectId, zone)); return proto.build(); } @@ -140,10 +136,8 @@ String getClusterId() { * applications. */ @InternalApi - com.google.bigtable.admin.v2.Cluster toEmbeddedProto(ProjectName projectName) { - proto - .getClusterBuilder() - .setLocation(LocationName.of(projectName.getProject(), zone).toString()); + com.google.bigtable.admin.v2.Cluster toEmbeddedProto(String projectId) { + proto.getClusterBuilder().setLocation(NameUtil.formatLocationName(projectId, zone)); return proto.getClusterBuilder().build(); } diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateInstanceRequest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateInstanceRequest.java index dd711ffa6d3c..af8b91c8bd28 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateInstanceRequest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateInstanceRequest.java @@ -17,7 +17,7 @@ import com.google.api.core.InternalApi; import com.google.bigtable.admin.v2.Instance.Type; -import com.google.bigtable.admin.v2.ProjectName; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import java.util.List; @@ -151,12 +151,11 @@ public CreateInstanceRequest addCluster( * not meant to be used by applications. */ @InternalApi - public com.google.bigtable.admin.v2.CreateInstanceRequest toProto(ProjectName projectName) { - builder.setParent(projectName.toString()).clearClusters(); + public com.google.bigtable.admin.v2.CreateInstanceRequest toProto(String projectId) { + builder.setParent(NameUtil.formatProjectName(projectId)).clearClusters(); for (CreateClusterRequest clusterRequest : clusterRequests) { - builder.putClusters( - clusterRequest.getClusterId(), clusterRequest.toEmbeddedProto(projectName)); + builder.putClusters(clusterRequest.getClusterId(), clusterRequest.toEmbeddedProto(projectId)); } return builder.build(); diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequest.java index a5ee8364d3d4..fbee5785db8c 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequest.java @@ -17,12 +17,13 @@ import com.google.api.core.InternalApi; import com.google.bigtable.admin.v2.ColumnFamily; -import com.google.bigtable.admin.v2.InstanceName; import com.google.bigtable.admin.v2.Table; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.GCRules.GCRule; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; +import javax.annotation.Nonnull; /** * Fluent wrapper for {@link com.google.bigtable.admin.v2.CreateTableRequest} @@ -110,10 +111,13 @@ public int hashCode() { } @InternalApi - public com.google.bigtable.admin.v2.CreateTableRequest toProto(InstanceName instanceName) { - Preconditions.checkNotNull(instanceName); + public com.google.bigtable.admin.v2.CreateTableRequest toProto( + @Nonnull String projectId, @Nonnull String instanceId) { + Preconditions.checkNotNull(projectId); + Preconditions.checkNotNull(instanceId); + return createTableRequest - .setParent(instanceName.toString()) + .setParent(NameUtil.formatInstanceName(projectId, instanceId)) .setTable(tableRequest.build()) .build(); } diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/ModifyColumnFamiliesRequest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/ModifyColumnFamiliesRequest.java index fd699d41792a..35f02671e590 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/ModifyColumnFamiliesRequest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/ModifyColumnFamiliesRequest.java @@ -16,11 +16,11 @@ package com.google.cloud.bigtable.admin.v2.models; import com.google.api.core.InternalApi; -import com.google.bigtable.admin.v2.InstanceName; import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification; -import com.google.bigtable.admin.v2.TableName; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.GCRules.GCRule; import com.google.common.base.Preconditions; +import javax.annotation.Nonnull; /** * Fluent wrapper for {@link com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest} @@ -106,10 +106,11 @@ public ModifyColumnFamiliesRequest dropFamily(String familyId) { @InternalApi public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest toProto( - InstanceName instanceName) { - Preconditions.checkNotNull(instanceName); - String tableName = - TableName.of(instanceName.getProject(), instanceName.getInstance(), tableId).toString(); + @Nonnull String projectId, @Nonnull String instanceId) { + Preconditions.checkNotNull(projectId, "Project id can't be null"); + Preconditions.checkNotNull(instanceId, "Instance id can't be null"); + + String tableName = NameUtil.formatTableName(projectId, instanceId, tableId); return modFamilyRequest.setName(tableName).build(); } } diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequest.java index c6f56d35b0cb..1697b47f761a 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequest.java @@ -16,8 +16,7 @@ package com.google.cloud.bigtable.admin.v2.models; import com.google.api.core.InternalApi; -import com.google.bigtable.admin.v2.AppProfileName; -import com.google.bigtable.admin.v2.ProjectName; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.AppProfile.MultiClusterRoutingPolicy; import com.google.cloud.bigtable.admin.v2.models.AppProfile.RoutingPolicy; import com.google.cloud.bigtable.admin.v2.models.AppProfile.SingleClusterRoutingPolicy; @@ -133,10 +132,10 @@ private void updateFieldMask(int fieldNumber) { * not meant to be used by applications. */ @InternalApi - public com.google.bigtable.admin.v2.UpdateAppProfileRequest toProto(ProjectName projectName) { - AppProfileName name = AppProfileName.of(projectName.getProject(), instanceId, appProfileId); + public com.google.bigtable.admin.v2.UpdateAppProfileRequest toProto(String projectId) { + String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); - proto.getAppProfileBuilder().setName(name.toString()); + proto.getAppProfileBuilder().setName(name); return proto.build(); } diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java index bbb93703806b..ac64fa1f910c 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java @@ -18,9 +18,8 @@ import com.google.api.core.InternalApi; import com.google.bigtable.admin.v2.Instance; import com.google.bigtable.admin.v2.Instance.Type; -import com.google.bigtable.admin.v2.InstanceName; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; -import com.google.bigtable.admin.v2.ProjectName; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.common.base.Preconditions; import com.google.protobuf.FieldMask; import com.google.protobuf.util.FieldMaskUtil; @@ -97,14 +96,13 @@ private void updateFieldMask(int fieldNumber) { * not meant to be used by applications. */ @InternalApi - public PartialUpdateInstanceRequest toProto(ProjectName projectName) { + public PartialUpdateInstanceRequest toProto(String projectId) { // Empty field mask implies full resource replacement, which would clear all fields in an empty // update request. Preconditions.checkState( !builder.getUpdateMask().getPathsList().isEmpty(), "Update request is empty"); - InstanceName instanceName = InstanceName.of(projectName.getProject(), instanceId); - builder.getInstanceBuilder().setName(instanceName.toString()); + builder.getInstanceBuilder().setName(NameUtil.formatInstanceName(projectId, instanceId)); return builder.build(); } diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTest.java index 41846e6cf665..91437fc965ee 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTest.java @@ -27,13 +27,8 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.api.gax.rpc.testing.FakeOperationSnapshot; -import com.google.bigtable.admin.v2.AppProfileName; -import com.google.bigtable.admin.v2.ClusterName; import com.google.bigtable.admin.v2.CreateInstanceMetadata; import com.google.bigtable.admin.v2.GetInstanceRequest; -import com.google.bigtable.admin.v2.InstanceName; -import com.google.bigtable.admin.v2.LocationName; -import com.google.bigtable.admin.v2.ProjectName; import com.google.bigtable.admin.v2.UpdateClusterMetadata; import com.google.bigtable.admin.v2.UpdateInstanceMetadata; import com.google.cloud.Identity; @@ -41,6 +36,7 @@ import com.google.cloud.Role; import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPage; import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.AppProfile; import com.google.cloud.bigtable.admin.v2.models.AppProfile.MultiClusterRoutingPolicy; import com.google.cloud.bigtable.admin.v2.models.Cluster; @@ -76,13 +72,17 @@ @RunWith(MockitoJUnitRunner.class) public class BigtableInstanceAdminClientTest { - private static final ProjectName PROJECT_NAME = ProjectName.of("my-project"); - private static final InstanceName INSTANCE_NAME = - InstanceName.of(PROJECT_NAME.getProject(), "my-instance"); - private static final ClusterName CLUSTER_NAME = - ClusterName.of(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), "my-cluster"); - private static final AppProfileName APP_PROFILE_NAME = - AppProfileName.of(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), "my-cluster"); + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String CLUSTER_ID = "my-cluster"; + private static final String APP_PROFILE_ID = "my-app-profile"; + + private static final String PROJECT_NAME = NameUtil.formatProjectName(PROJECT_ID); + private static final String INSTANCE_NAME = NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID); + private static final String CLUSTER_NAME = + NameUtil.formatClusterName(PROJECT_ID, INSTANCE_ID, CLUSTER_ID); + private static final String APP_PROFILE_NAME = + NameUtil.formatAppProfileName(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); private BigtableInstanceAdminClient adminClient; @@ -189,7 +189,7 @@ public class BigtableInstanceAdminClientTest { @Before public void setUp() { - adminClient = BigtableInstanceAdminClient.create(PROJECT_NAME, mockStub); + adminClient = BigtableInstanceAdminClient.create(PROJECT_ID, mockStub); Mockito.when(mockStub.createInstanceOperationCallable()).thenReturn(mockCreateInstanceCallable); Mockito.when(mockStub.partialUpdateInstanceOperationCallable()) @@ -218,7 +218,7 @@ public void setUp() { @Test public void testProjectName() { - assertThat(adminClient.getProjectName()).isEqualTo(PROJECT_NAME); + assertThat(adminClient.getProjectId()).isEqualTo(PROJECT_ID); } @Test @@ -232,12 +232,12 @@ public void testCreateInstance() { // Setup com.google.bigtable.admin.v2.CreateInstanceRequest expectedRequest = com.google.bigtable.admin.v2.CreateInstanceRequest.newBuilder() - .setParent(PROJECT_NAME.toString()) - .setInstanceId(INSTANCE_NAME.getInstance()) + .setParent(PROJECT_NAME) + .setInstanceId(INSTANCE_ID) .setInstance( com.google.bigtable.admin.v2.Instance.newBuilder() .setType(com.google.bigtable.admin.v2.Instance.Type.DEVELOPMENT) - .setDisplayName(INSTANCE_NAME.getInstance())) + .setDisplayName(INSTANCE_ID)) .putClusters( "cluster1", com.google.bigtable.admin.v2.Cluster.newBuilder() @@ -248,16 +248,14 @@ public void testCreateInstance() { .build(); com.google.bigtable.admin.v2.Instance expectedResponse = - com.google.bigtable.admin.v2.Instance.newBuilder() - .setName(INSTANCE_NAME.toString()) - .build(); + com.google.bigtable.admin.v2.Instance.newBuilder().setName(INSTANCE_NAME).build(); mockOperationResult(mockCreateInstanceCallable, expectedRequest, expectedResponse); // Execute Instance actualResult = adminClient.createInstance( - CreateInstanceRequest.of(INSTANCE_NAME.getInstance()) + CreateInstanceRequest.of(INSTANCE_ID) .setType(Instance.Type.DEVELOPMENT) .addCluster("cluster1", "us-east1-c", 1, StorageType.SSD)); @@ -273,22 +271,19 @@ public void testUpdateInstance() { .setUpdateMask(FieldMask.newBuilder().addPaths("display_name")) .setInstance( com.google.bigtable.admin.v2.Instance.newBuilder() - .setName(INSTANCE_NAME.toString()) + .setName(INSTANCE_NAME) .setDisplayName("new display name")) .build(); com.google.bigtable.admin.v2.Instance expectedResponse = - com.google.bigtable.admin.v2.Instance.newBuilder() - .setName(INSTANCE_NAME.toString()) - .build(); + com.google.bigtable.admin.v2.Instance.newBuilder().setName(INSTANCE_NAME).build(); mockOperationResult(mockUpdateInstanceCallable, expectedRequest, expectedResponse); // Execute Instance actualResult = adminClient.updateInstance( - UpdateInstanceRequest.of(INSTANCE_NAME.getInstance()) - .setDisplayName("new display name")); + UpdateInstanceRequest.of(INSTANCE_ID).setDisplayName("new display name")); // Verify assertThat(actualResult).isEqualTo(Instance.fromProto(expectedResponse)); @@ -298,20 +293,16 @@ public void testUpdateInstance() { public void testGetInstance() { // Setup com.google.bigtable.admin.v2.GetInstanceRequest expectedRequest = - com.google.bigtable.admin.v2.GetInstanceRequest.newBuilder() - .setName(INSTANCE_NAME.toString()) - .build(); + com.google.bigtable.admin.v2.GetInstanceRequest.newBuilder().setName(INSTANCE_NAME).build(); com.google.bigtable.admin.v2.Instance expectedResponse = - com.google.bigtable.admin.v2.Instance.newBuilder() - .setName(INSTANCE_NAME.toString()) - .build(); + com.google.bigtable.admin.v2.Instance.newBuilder().setName(INSTANCE_NAME).build(); Mockito.when(mockGetInstanceCallable.futureCall(expectedRequest)) .thenReturn(ApiFutures.immediateFuture(expectedResponse)); // Execute - Instance actualResult = adminClient.getInstance(INSTANCE_NAME.getInstance()); + Instance actualResult = adminClient.getInstance(INSTANCE_ID); // Verify assertThat(actualResult).isEqualTo(Instance.fromProto(expectedResponse)); @@ -322,7 +313,7 @@ public void testListInstances() { // Setup com.google.bigtable.admin.v2.ListInstancesRequest expectedRequest = com.google.bigtable.admin.v2.ListInstancesRequest.newBuilder() - .setParent(PROJECT_NAME.toString()) + .setParent(PROJECT_NAME) .build(); com.google.bigtable.admin.v2.ListInstancesResponse expectedResponse = @@ -355,7 +346,7 @@ public void testListInstancesFailedZone() { // Setup com.google.bigtable.admin.v2.ListInstancesRequest expectedRequest = com.google.bigtable.admin.v2.ListInstancesRequest.newBuilder() - .setParent(PROJECT_NAME.toString()) + .setParent(PROJECT_NAME) .build(); com.google.bigtable.admin.v2.ListInstancesResponse expectedResponse = @@ -364,7 +355,7 @@ public void testListInstancesFailedZone() { com.google.bigtable.admin.v2.Instance.newBuilder() .setName(INSTANCE_NAME + "1") .build()) - .addFailedLocations(LocationName.of(PROJECT_NAME.getProject(), "us-east1-d").toString()) + .addFailedLocations(NameUtil.formatLocationName(PROJECT_ID, "us-east1-d")) .build(); Mockito.when(mockListInstancesCallable.futureCall(expectedRequest)) @@ -394,7 +385,7 @@ public void testDeleteInstance() { // Setup com.google.bigtable.admin.v2.DeleteInstanceRequest expectedRequest = com.google.bigtable.admin.v2.DeleteInstanceRequest.newBuilder() - .setName(INSTANCE_NAME.toString()) + .setName(INSTANCE_NAME) .build(); final AtomicBoolean wasCalled = new AtomicBoolean(false); @@ -410,7 +401,7 @@ public ApiFuture answer(InvocationOnMock invocationOnMock) { }); // Execute - adminClient.deleteInstance(INSTANCE_NAME.getInstance()); + adminClient.deleteInstance(INSTANCE_ID); // Verify assertThat(wasCalled.get()).isTrue(); @@ -421,8 +412,8 @@ public void testCreateCluster() { // Setup com.google.bigtable.admin.v2.CreateClusterRequest expectedRequest = com.google.bigtable.admin.v2.CreateClusterRequest.newBuilder() - .setParent(INSTANCE_NAME.toString()) - .setClusterId(CLUSTER_NAME.getCluster()) + .setParent(INSTANCE_NAME) + .setClusterId(CLUSTER_ID) .setCluster( com.google.bigtable.admin.v2.Cluster.newBuilder() .setLocation("projects/my-project/locations/us-east1-c") @@ -430,13 +421,13 @@ public void testCreateCluster() { .setDefaultStorageType(com.google.bigtable.admin.v2.StorageType.SSD)) .build(); com.google.bigtable.admin.v2.Cluster expectedResponse = - com.google.bigtable.admin.v2.Cluster.newBuilder().setName(CLUSTER_NAME.toString()).build(); + com.google.bigtable.admin.v2.Cluster.newBuilder().setName(CLUSTER_NAME).build(); mockOperationResult(mockCreateClusterCallable, expectedRequest, expectedResponse); // Execute Cluster actualResult = adminClient.createCluster( - CreateClusterRequest.of(CLUSTER_NAME.getInstance(), CLUSTER_NAME.getCluster()) + CreateClusterRequest.of(INSTANCE_ID, CLUSTER_ID) .setZone("us-east1-c") .setServeNodes(3) .setStorageType(StorageType.SSD)); @@ -448,19 +439,16 @@ public void testCreateCluster() { public void testGetCluster() { // Setup com.google.bigtable.admin.v2.GetClusterRequest expectedRequest = - com.google.bigtable.admin.v2.GetClusterRequest.newBuilder() - .setName(CLUSTER_NAME.toString()) - .build(); + com.google.bigtable.admin.v2.GetClusterRequest.newBuilder().setName(CLUSTER_NAME).build(); com.google.bigtable.admin.v2.Cluster expectedResponse = - com.google.bigtable.admin.v2.Cluster.newBuilder().setName(CLUSTER_NAME.toString()).build(); + com.google.bigtable.admin.v2.Cluster.newBuilder().setName(CLUSTER_NAME).build(); Mockito.when(mockGetClusterCallable.futureCall(expectedRequest)) .thenReturn(ApiFutures.immediateFuture(expectedResponse)); // Execute - Cluster actualResult = - adminClient.getCluster(CLUSTER_NAME.getInstance(), CLUSTER_NAME.getCluster()); + Cluster actualResult = adminClient.getCluster(INSTANCE_ID, CLUSTER_ID); // Verify assertThat(actualResult).isEqualTo(Cluster.fromProto(expectedResponse)); @@ -471,24 +459,22 @@ public void testListClusters() { // Setup com.google.bigtable.admin.v2.ListClustersRequest expectedRequest = com.google.bigtable.admin.v2.ListClustersRequest.newBuilder() - .setParent(INSTANCE_NAME.toString()) + .setParent(INSTANCE_NAME) .build(); com.google.bigtable.admin.v2.ListClustersResponse expectedResponse = com.google.bigtable.admin.v2.ListClustersResponse.newBuilder() .addClusters( - com.google.bigtable.admin.v2.Cluster.newBuilder() - .setName(CLUSTER_NAME.toString() + "1")) + com.google.bigtable.admin.v2.Cluster.newBuilder().setName(CLUSTER_NAME + "1")) .addClusters( - com.google.bigtable.admin.v2.Cluster.newBuilder() - .setName(CLUSTER_NAME.toString() + "2")) + com.google.bigtable.admin.v2.Cluster.newBuilder().setName(CLUSTER_NAME + "2")) .build(); Mockito.when(mockListClustersCallable.futureCall(expectedRequest)) .thenReturn(ApiFutures.immediateFuture(expectedResponse)); // Execute - List actualResult = adminClient.listClusters(INSTANCE_NAME.getInstance()); + List actualResult = adminClient.listClusters(INSTANCE_ID); // Verify assertThat(actualResult) @@ -502,14 +488,13 @@ public void testListClustersFailedZone() { // Setup com.google.bigtable.admin.v2.ListClustersRequest expectedRequest = com.google.bigtable.admin.v2.ListClustersRequest.newBuilder() - .setParent(INSTANCE_NAME.toString()) + .setParent(INSTANCE_NAME) .build(); com.google.bigtable.admin.v2.ListClustersResponse expectedResponse = com.google.bigtable.admin.v2.ListClustersResponse.newBuilder() - .addClusters( - com.google.bigtable.admin.v2.Cluster.newBuilder().setName(CLUSTER_NAME.toString())) - .addFailedLocations(LocationName.of(PROJECT_NAME.getProject(), "us-east1-c").toString()) + .addClusters(com.google.bigtable.admin.v2.Cluster.newBuilder().setName(CLUSTER_NAME)) + .addFailedLocations(NameUtil.formatLocationName(PROJECT_ID, "us-east1-c")) .build(); Mockito.when(mockListClustersCallable.futureCall(expectedRequest)) @@ -519,7 +504,7 @@ public void testListClustersFailedZone() { Exception actualError = null; try { - adminClient.listClusters(INSTANCE_NAME.getInstance()); + adminClient.listClusters(INSTANCE_ID); } catch (Exception e) { actualError = e; } @@ -538,22 +523,21 @@ public void testResizeCluster() { // Setup com.google.bigtable.admin.v2.Cluster expectedRequest = com.google.bigtable.admin.v2.Cluster.newBuilder() - .setName(CLUSTER_NAME.toString()) + .setName(CLUSTER_NAME) .setServeNodes(30) .build(); com.google.bigtable.admin.v2.Cluster expectedResponse = com.google.bigtable.admin.v2.Cluster.newBuilder() - .setName(CLUSTER_NAME.toString()) - .setLocation(LocationName.of(PROJECT_NAME.getProject(), "us-east1-c").toString()) + .setName(CLUSTER_NAME) + .setLocation(NameUtil.formatLocationName(PROJECT_ID, "us-east1-c")) .setServeNodes(30) .build(); mockOperationResult(mockUpdateClusterCallable, expectedRequest, expectedResponse); // Execute - Cluster actualResult = - adminClient.resizeCluster(CLUSTER_NAME.getInstance(), CLUSTER_NAME.getCluster(), 30); + Cluster actualResult = adminClient.resizeCluster(INSTANCE_ID, CLUSTER_ID, 30); // Verify assertThat(actualResult).isEqualTo(Cluster.fromProto(expectedResponse)); @@ -564,7 +548,7 @@ public void testDeleteCluster() { // Setup com.google.bigtable.admin.v2.DeleteClusterRequest expectedRequest = com.google.bigtable.admin.v2.DeleteClusterRequest.newBuilder() - .setName(CLUSTER_NAME.toString()) + .setName(CLUSTER_NAME) .build(); final AtomicBoolean wasCalled = new AtomicBoolean(false); @@ -580,7 +564,7 @@ public ApiFuture answer(InvocationOnMock invocationOnMock) { }); // Execute - adminClient.deleteCluster(CLUSTER_NAME.getInstance(), CLUSTER_NAME.getCluster()); + adminClient.deleteCluster(INSTANCE_ID, CLUSTER_ID); // Verify assertThat(wasCalled.get()).isTrue(); @@ -591,8 +575,8 @@ public void testCreateAppProfile() { // Setup com.google.bigtable.admin.v2.CreateAppProfileRequest expectedRequest = com.google.bigtable.admin.v2.CreateAppProfileRequest.newBuilder() - .setParent(INSTANCE_NAME.toString()) - .setAppProfileId(APP_PROFILE_NAME.getAppProfile()) + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .setAppProfileId(APP_PROFILE_ID) .setAppProfile( com.google.bigtable.admin.v2.AppProfile.newBuilder() .setDescription("my description") @@ -603,7 +587,7 @@ public void testCreateAppProfile() { com.google.bigtable.admin.v2.AppProfile expectedResponse = com.google.bigtable.admin.v2.AppProfile.newBuilder() - .setName(APP_PROFILE_NAME.toString()) + .setName(APP_PROFILE_NAME) .setDescription("my description") .setMultiClusterRoutingUseAny( com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny @@ -616,8 +600,7 @@ public void testCreateAppProfile() { // Execute AppProfile actualResult = adminClient.createAppProfile( - CreateAppProfileRequest.of( - APP_PROFILE_NAME.getInstance(), APP_PROFILE_NAME.getAppProfile()) + CreateAppProfileRequest.of(INSTANCE_ID, APP_PROFILE_ID) .setDescription("my description") .setRoutingPolicy(MultiClusterRoutingPolicy.of())); @@ -630,12 +613,12 @@ public void testGetAppProfile() { // Setup com.google.bigtable.admin.v2.GetAppProfileRequest expectedRequest = com.google.bigtable.admin.v2.GetAppProfileRequest.newBuilder() - .setName(APP_PROFILE_NAME.toString()) + .setName(APP_PROFILE_NAME) .build(); com.google.bigtable.admin.v2.AppProfile expectedResponse = com.google.bigtable.admin.v2.AppProfile.newBuilder() - .setName(APP_PROFILE_NAME.toString()) + .setName(APP_PROFILE_NAME) .setDescription("my description") .setMultiClusterRoutingUseAny( com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny @@ -646,8 +629,7 @@ public void testGetAppProfile() { .thenReturn(ApiFutures.immediateFuture(expectedResponse)); // Execute - AppProfile actualResult = - adminClient.getAppProfile(APP_PROFILE_NAME.getInstance(), APP_PROFILE_NAME.getAppProfile()); + AppProfile actualResult = adminClient.getAppProfile(INSTANCE_ID, APP_PROFILE_ID); // Verify assertThat(actualResult).isEqualTo(AppProfile.fromProto(expectedResponse)); @@ -658,7 +640,7 @@ public void testListAppProfiles() { // Setup com.google.bigtable.admin.v2.ListAppProfilesRequest expectedRequest = com.google.bigtable.admin.v2.ListAppProfilesRequest.newBuilder() - .setParent(INSTANCE_NAME.toString()) + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) .build(); // 3 AppProfiles spread across 2 pages @@ -666,7 +648,7 @@ public void testListAppProfiles() { for (int i = 0; i < 3; i++) { expectedProtos.add( com.google.bigtable.admin.v2.AppProfile.newBuilder() - .setName(APP_PROFILE_NAME.toString() + i) + .setName(APP_PROFILE_NAME + i) .setDescription("profile" + i) .setMultiClusterRoutingUseAny( com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny @@ -694,7 +676,7 @@ public void testListAppProfiles() { .thenReturn(ApiFutures.immediateFuture(response0)); // Execute - List actualResults = adminClient.listAppProfiles(INSTANCE_NAME.getInstance()); + List actualResults = adminClient.listAppProfiles(INSTANCE_ID); // Verify List expectedResults = Lists.newArrayList(); @@ -712,14 +694,14 @@ public void testUpdateAppProfile() { com.google.bigtable.admin.v2.UpdateAppProfileRequest.newBuilder() .setAppProfile( com.google.bigtable.admin.v2.AppProfile.newBuilder() - .setName(APP_PROFILE_NAME.toString()) + .setName(APP_PROFILE_NAME) .setDescription("updated description")) .setUpdateMask(FieldMask.newBuilder().addPaths("description")) .build(); com.google.bigtable.admin.v2.AppProfile expectedResponse = com.google.bigtable.admin.v2.AppProfile.newBuilder() - .setName(APP_PROFILE_NAME.toString()) + .setName(APP_PROFILE_NAME) .setDescription("updated description") .setMultiClusterRoutingUseAny( com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny @@ -731,8 +713,7 @@ public void testUpdateAppProfile() { // Execute AppProfile actualResult = adminClient.updateAppProfile( - UpdateAppProfileRequest.of( - APP_PROFILE_NAME.getInstance(), APP_PROFILE_NAME.getAppProfile()) + UpdateAppProfileRequest.of(INSTANCE_ID, APP_PROFILE_ID) .setDescription("updated description")); // Verify @@ -744,7 +725,7 @@ public void testDeleteAppProfile() { // Setup com.google.bigtable.admin.v2.DeleteAppProfileRequest expectedRequest = com.google.bigtable.admin.v2.DeleteAppProfileRequest.newBuilder() - .setName(APP_PROFILE_NAME.toString()) + .setName(APP_PROFILE_NAME) .build(); final AtomicBoolean wasCalled = new AtomicBoolean(false); @@ -760,7 +741,7 @@ public ApiFuture answer(InvocationOnMock invocationOnMock) { }); // Execute - adminClient.deleteAppProfile(APP_PROFILE_NAME.getInstance(), APP_PROFILE_NAME.getAppProfile()); + adminClient.deleteAppProfile(INSTANCE_ID, APP_PROFILE_ID); // Verify assertThat(wasCalled.get()).isTrue(); @@ -785,7 +766,7 @@ public void testGetIamPolicy() { // Setup com.google.iam.v1.GetIamPolicyRequest expectedRequest = com.google.iam.v1.GetIamPolicyRequest.newBuilder() - .setResource(INSTANCE_NAME.toString()) + .setResource(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) .build(); com.google.iam.v1.Policy expectedResponse = @@ -801,7 +782,7 @@ public void testGetIamPolicy() { .thenReturn(ApiFutures.immediateFuture(expectedResponse)); // Execute - Policy actualResult = adminClient.getIamPolicy(INSTANCE_NAME.getInstance()); + Policy actualResult = adminClient.getIamPolicy(INSTANCE_ID); // Verify assertThat(actualResult) @@ -817,7 +798,7 @@ public void testSetIamPolicy() { // Setup com.google.iam.v1.SetIamPolicyRequest expectedRequest = com.google.iam.v1.SetIamPolicyRequest.newBuilder() - .setResource(INSTANCE_NAME.toString()) + .setResource(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) .setPolicy( com.google.iam.v1.Policy.newBuilder() .addBindings( @@ -841,7 +822,7 @@ public void testSetIamPolicy() { // Execute Policy actualResult = adminClient.setIamPolicy( - INSTANCE_NAME.getInstance(), + INSTANCE_ID, Policy.newBuilder() .addIdentity(Role.of("bigtable.user"), Identity.user("someone@example.com")) .build()); @@ -860,7 +841,7 @@ public void testTestIamPermissions() { // Setup com.google.iam.v1.TestIamPermissionsRequest expectedRequest = com.google.iam.v1.TestIamPermissionsRequest.newBuilder() - .setResource(INSTANCE_NAME.toString()) + .setResource(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) .addPermissions("bigtable.tables.readRows") .build(); @@ -874,7 +855,7 @@ public void testTestIamPermissions() { // Execute List actualResult = - adminClient.testIamPermission(INSTANCE_NAME.getInstance(), "bigtable.tables.readRows"); + adminClient.testIamPermission(INSTANCE_ID, "bigtable.tables.readRows"); // Verify assertThat(actualResult).containsExactly("bigtable.tables.readRows"); @@ -885,14 +866,14 @@ public void testExistsTrue() { // Setup com.google.bigtable.admin.v2.Instance expectedResponse = com.google.bigtable.admin.v2.Instance.newBuilder() - .setName(INSTANCE_NAME.toString()) + .setName(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) .build(); Mockito.when(mockGetInstanceCallable.futureCall(Matchers.any(GetInstanceRequest.class))) .thenReturn(ApiFutures.immediateFuture(expectedResponse)); // Execute - boolean found = adminClient.exists(INSTANCE_NAME.getInstance()); + boolean found = adminClient.exists(INSTANCE_ID); // Verify assertThat(found).isTrue(); @@ -909,7 +890,7 @@ public void testExistsFalse() { ApiFutures.immediateFailedFuture(exception)); // Execute - boolean found = adminClient.exists(INSTANCE_NAME.getInstance()); + boolean found = adminClient.exists(INSTANCE_ID); // Verify assertThat(found).isFalse(); diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java index 278a939f897a..1567b4323a85 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java @@ -18,7 +18,6 @@ import static com.google.common.truth.Truth.assertThat; import com.google.api.gax.rpc.StatusCode.Code; -import com.google.bigtable.admin.v2.ProjectName; import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminSettings.Builder; import java.io.IOException; import org.junit.Test; @@ -26,12 +25,12 @@ public class BigtableInstanceAdminSettingsTest { @Test public void testProjectName() throws Exception { - ProjectName projectName = ProjectName.of("my-project"); - Builder builder = BigtableInstanceAdminSettings.newBuilder().setProjectName(projectName); + String projectId = "my-project"; + Builder builder = BigtableInstanceAdminSettings.newBuilder().setProjectId(projectId); - assertThat(builder.getProjectName()).isEqualTo(projectName); - assertThat(builder.build().getProjectName()).isEqualTo(projectName); - assertThat(builder.build().toBuilder().getProjectName()).isEqualTo(projectName); + assertThat(builder.getProjectId()).isEqualTo(projectId); + assertThat(builder.build().getProjectId()).isEqualTo(projectId); + assertThat(builder.build().toBuilder().getProjectId()).isEqualTo(projectId); } @Test @@ -39,7 +38,7 @@ public void testMissingProjectName() { Exception actualException = null; Builder settingsBuilder = BigtableInstanceAdminSettings.newBuilder(); - assertThat(settingsBuilder.getProjectName()).isNull(); + assertThat(settingsBuilder.getProjectId()).isNull(); try { settingsBuilder.build(); @@ -52,10 +51,10 @@ public void testMissingProjectName() { @Test public void testStubSettings() throws IOException { - ProjectName projectName = ProjectName.of("my-project"); + String projectId = "my-project"; BigtableInstanceAdminSettings.Builder builder = - BigtableInstanceAdminSettings.newBuilder().setProjectName(projectName); + BigtableInstanceAdminSettings.newBuilder().setProjectId(projectId); builder.stubSettings().createInstanceSettings().setRetryableCodes(Code.INVALID_ARGUMENT); diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTest.java index 9a590a22a225..99f86dca33dc 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTest.java @@ -27,13 +27,13 @@ import com.google.bigtable.admin.v2.DropRowRangeRequest; import com.google.bigtable.admin.v2.GcRule; import com.google.bigtable.admin.v2.GetTableRequest; -import com.google.bigtable.admin.v2.InstanceName; import com.google.bigtable.admin.v2.ListTablesRequest; import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification; import com.google.bigtable.admin.v2.Table.View; import com.google.bigtable.admin.v2.TableName; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPage; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; import com.google.cloud.bigtable.admin.v2.models.ModifyColumnFamiliesRequest; import com.google.cloud.bigtable.admin.v2.models.Table; @@ -57,9 +57,14 @@ @RunWith(MockitoJUnitRunner.class) public class BigtableTableAdminClientTest { - private static final InstanceName INSTANCE_NAME = InstanceName.of("my-project", "my-instance"); - private static final TableName TABLE_NAME = - TableName.of(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), "my-table"); + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String TABLE_ID = "my-table"; + + private static final String PROJECT_NAME = NameUtil.formatProjectName(PROJECT_ID); + private static final String INSTANCE_NAME = NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID); + private static final String TABLE_NAME = + NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID); private BigtableTableAdminClient adminClient; @Mock private EnhancedBigtableTableAdminStub mockStub; @@ -86,7 +91,7 @@ public class BigtableTableAdminClientTest { @Before public void setUp() { - adminClient = BigtableTableAdminClient.create(INSTANCE_NAME, mockStub); + adminClient = BigtableTableAdminClient.create(PROJECT_ID, INSTANCE_ID, mockStub); Mockito.when(mockStub.createTableCallable()).thenReturn(mockCreateTableCallable); Mockito.when(mockStub.modifyColumnFamiliesCallable()).thenReturn(mockModifyTableCallable); @@ -108,8 +113,8 @@ public void testCreateTable() { // Setup com.google.bigtable.admin.v2.CreateTableRequest expectedRequest = com.google.bigtable.admin.v2.CreateTableRequest.newBuilder() - .setParent(INSTANCE_NAME.toString()) - .setTableId(TABLE_NAME.getTable()) + .setParent(INSTANCE_NAME) + .setTableId(TABLE_ID) .setTable(com.google.bigtable.admin.v2.Table.getDefaultInstance()) .build(); @@ -120,7 +125,7 @@ public void testCreateTable() { .thenReturn(ApiFutures.immediateFuture(expectedResponse)); // Execute - Table result = adminClient.createTable(CreateTableRequest.of(TABLE_NAME.getTable())); + Table result = adminClient.createTable(CreateTableRequest.of(TABLE_ID)); // Verify assertThat(result).isEqualTo(Table.fromProto(expectedResponse)); @@ -131,7 +136,7 @@ public void testModifyFamilies() { // Setup com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest expectedRequest = com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.newBuilder() - .setName(TABLE_NAME.toString()) + .setName(TABLE_NAME) .addModifications( Modification.newBuilder() .setId("cf") @@ -140,7 +145,7 @@ public void testModifyFamilies() { com.google.bigtable.admin.v2.Table fakeResponse = com.google.bigtable.admin.v2.Table.newBuilder() - .setName(TABLE_NAME.toString()) + .setName(TABLE_NAME) .putColumnFamilies( "cf", ColumnFamily.newBuilder().setGcRule(GcRule.getDefaultInstance()).build()) .build(); @@ -150,8 +155,7 @@ public void testModifyFamilies() { // Execute Table actualResult = - adminClient.modifyFamilies( - ModifyColumnFamiliesRequest.of(TABLE_NAME.getTable()).addFamily("cf")); + adminClient.modifyFamilies(ModifyColumnFamiliesRequest.of(TABLE_ID).addFamily("cf")); // Verify assertThat(actualResult).isEqualTo(Table.fromProto(fakeResponse)); @@ -176,7 +180,7 @@ public ApiFuture answer(InvocationOnMock invocationOnMock) { }); // Execute - adminClient.deleteTable(TABLE_NAME.getTable()); + adminClient.deleteTable(TABLE_ID); // Verify assertThat(wasCalled.get()).isTrue(); @@ -198,7 +202,7 @@ public void testGetTable() { .thenReturn(ApiFutures.immediateFuture(expectedResponse)); // Execute - Table actualResult = adminClient.getTable(TABLE_NAME.getTable()); + Table actualResult = adminClient.getTable(TABLE_ID); // Verify assertThat(actualResult).isEqualTo(Table.fromProto(expectedResponse)); @@ -209,16 +213,14 @@ public void testListTables() { // Setup com.google.bigtable.admin.v2.ListTablesRequest expectedRequest = com.google.bigtable.admin.v2.ListTablesRequest.newBuilder() - .setParent(INSTANCE_NAME.toString()) + .setParent(INSTANCE_NAME) .build(); // 3 Tables spread across 2 pages List expectedProtos = Lists.newArrayList(); for (int i = 0; i < 3; i++) { expectedProtos.add( - com.google.bigtable.admin.v2.Table.newBuilder() - .setName(TABLE_NAME.toString() + i) - .build()); + com.google.bigtable.admin.v2.Table.newBuilder().setName(TABLE_NAME + i).build()); } // 2 on the first page ListTablesPage page0 = Mockito.mock(ListTablesPage.class); @@ -257,7 +259,7 @@ public void testDropRowRange() { // Setup DropRowRangeRequest expectedRequest = DropRowRangeRequest.newBuilder() - .setName(TABLE_NAME.toString()) + .setName(TABLE_NAME) .setRowKeyPrefix(ByteString.copyFromUtf8("rowKeyPrefix")) .build(); @@ -276,7 +278,7 @@ public ApiFuture answer(InvocationOnMock invocationOnMock) { }); // Execute - adminClient.dropRowRange(TABLE_NAME.getTable(), "rowKeyPrefix"); + adminClient.dropRowRange(TABLE_ID, "rowKeyPrefix"); // Verify assertThat(wasCalled.get()).isTrue(); @@ -286,7 +288,7 @@ public ApiFuture answer(InvocationOnMock invocationOnMock) { public void testAwaitReplication() { // Setup @SuppressWarnings("UnnecessaryLocalVariable") - TableName expectedRequest = TABLE_NAME; + TableName expectedRequest = TableName.parse(TABLE_NAME); final AtomicBoolean wasCalled = new AtomicBoolean(false); @@ -294,14 +296,14 @@ public void testAwaitReplication() { .thenAnswer( new Answer>() { @Override - public ApiFuture answer(InvocationOnMock invocationOnMock) throws Throwable { + public ApiFuture answer(InvocationOnMock invocationOnMock) { wasCalled.set(true); return ApiFutures.immediateFuture(null); } }); // Execute - adminClient.awaitReplication(TABLE_NAME.getTable()); + adminClient.awaitReplication(TABLE_ID); // Verify assertThat(wasCalled.get()).isTrue(); @@ -317,7 +319,7 @@ public void testExistsTrue() { .thenReturn(ApiFutures.immediateFuture(expectedResponse)); // Execute - boolean found = adminClient.exists(TABLE_NAME.getTable()); + boolean found = adminClient.exists(TABLE_ID); // Verify assertThat(found).isTrue(); @@ -334,7 +336,7 @@ public void testExistsFalse() { ApiFutures.immediateFailedFuture(exception)); // Execute - boolean found = adminClient.exists(TABLE_NAME.getTable()); + boolean found = adminClient.exists(TABLE_ID); // Verify assertThat(found).isFalse(); diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java index 611c3fc8c0e2..116504c8cd6a 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java @@ -18,7 +18,6 @@ import static com.google.common.truth.Truth.assertThat; import com.google.api.gax.rpc.StatusCode.Code; -import com.google.bigtable.admin.v2.InstanceName; import java.io.IOException; import org.junit.Test; @@ -26,14 +25,17 @@ public class BigtableTableAdminSettingsTest { @Test public void testInstanceName() throws IOException { - InstanceName instanceName = InstanceName.of("my-project", "my-instance"); - BigtableTableAdminSettings.Builder builder = - BigtableTableAdminSettings.newBuilder().setInstanceName(instanceName); + BigtableTableAdminSettings.newBuilder() + .setProjectId("my-project") + .setInstanceId("my-instance"); - assertThat(builder.getInstanceName()).isEqualTo(instanceName); - assertThat(builder.build().getInstanceName()).isEqualTo(instanceName); - assertThat(builder.build().toBuilder().getInstanceName()).isEqualTo(instanceName); + assertThat(builder.getProjectId()).isEqualTo("my-project"); + assertThat(builder.getInstanceId()).isEqualTo("my-instance"); + assertThat(builder.build().getProjectId()).isEqualTo("my-project"); + assertThat(builder.build().getInstanceId()).isEqualTo("my-instance"); + assertThat(builder.build().toBuilder().getProjectId()).isEqualTo("my-project"); + assertThat(builder.build().toBuilder().getInstanceId()).isEqualTo("my-instance"); } @Test @@ -51,10 +53,10 @@ public void testMissingInstanceName() { @Test public void testStubSettings() throws IOException { - InstanceName instanceName = InstanceName.of("my-project", "my-instance"); - BigtableTableAdminSettings.Builder builder = - BigtableTableAdminSettings.newBuilder().setInstanceName(instanceName); + BigtableTableAdminSettings.newBuilder() + .setProjectId("my-project") + .setInstanceId("my-instance"); builder.stubSettings().createTableSettings().setRetryableCodes(Code.INVALID_ARGUMENT); diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableTableAdminClientIT.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableTableAdminClientIT.java index 25ad2d28bc20..7788d534a9e2 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableTableAdminClientIT.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableTableAdminClientIT.java @@ -21,7 +21,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import com.google.bigtable.admin.v2.InstanceName; import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; import com.google.cloud.bigtable.admin.v2.models.ColumnFamily; import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; @@ -31,12 +30,15 @@ import com.google.cloud.bigtable.admin.v2.models.GCRules.VersionRule; import com.google.cloud.bigtable.admin.v2.models.ModifyColumnFamiliesRequest; import com.google.cloud.bigtable.admin.v2.models.Table; +import com.google.common.base.Joiner; +import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.protobuf.ByteString; import java.io.IOException; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; +import java.util.logging.Logger; import org.junit.AfterClass; import org.junit.AssumptionViolatedException; import org.junit.Before; @@ -45,22 +47,35 @@ import org.threeten.bp.Duration; public class BigtableTableAdminClientIT { + private static final Logger LOGGER = Logger.getLogger(BigtableTableAdminClientIT.class.getName()); + + private static final String PROJECT_PROPERTY_NAME = "bigtable.project"; private static final String INSTANCE_PROPERTY_NAME = "bigtable.instance"; + private static List missingProperties; private static BigtableTableAdminClient tableAdmin; private static String prefix; @BeforeClass public static void createClient() throws IOException { - String targetInstance = System.getProperty(INSTANCE_PROPERTY_NAME); + missingProperties = Lists.newArrayList(); + + String targetProject = System.getProperty(PROJECT_PROPERTY_NAME); + if (targetProject == null) { + missingProperties.add(PROJECT_PROPERTY_NAME); + } + String targetInstance = System.getProperty(INSTANCE_PROPERTY_NAME); if (targetInstance == null) { - tableAdmin = null; + missingProperties.add(INSTANCE_PROPERTY_NAME); + } + + if (!missingProperties.isEmpty()) { + LOGGER.warning("Missing properties: " + Joiner.on(",").join(missingProperties)); return; } - InstanceName instanceName = InstanceName.parse(targetInstance); - tableAdmin = BigtableTableAdminClient.create(instanceName); + tableAdmin = BigtableTableAdminClient.create(targetProject, targetInstance); // Setup a prefix to avoid collisions between concurrent test runs prefix = String.format("020%d", System.currentTimeMillis()); @@ -86,7 +101,7 @@ public static void closeClient() { public void setup() { if (tableAdmin == null) { throw new AssumptionViolatedException( - INSTANCE_PROPERTY_NAME + " property is not set, skipping integration tests."); + "Required properties are not set, skipping integration tests."); } } diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequestTest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequestTest.java index 44b89ec2388e..9b7141d3ab2e 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequestTest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequestTest.java @@ -20,7 +20,6 @@ import com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny; import com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting; import com.google.bigtable.admin.v2.InstanceName; -import com.google.bigtable.admin.v2.ProjectName; import com.google.cloud.bigtable.admin.v2.models.AppProfile.MultiClusterRoutingPolicy; import com.google.cloud.bigtable.admin.v2.models.AppProfile.SingleClusterRoutingPolicy; import org.junit.Test; @@ -37,7 +36,7 @@ public void testToProto() { .setRoutingPolicy(SingleClusterRoutingPolicy.of("my-cluster", true)) .setIgnoreWarnings(true); - assertThat(wrapper.toProto(ProjectName.of("my-project"))) + assertThat(wrapper.toProto("my-project")) .isEqualTo( com.google.bigtable.admin.v2.CreateAppProfileRequest.newBuilder() .setParent(InstanceName.of("my-project", "my-instance").toString()) @@ -59,11 +58,7 @@ public void testMultiClusterRouting() { CreateAppProfileRequest.of("my-instance", "my-profile") .setRoutingPolicy(MultiClusterRoutingPolicy.of()); - assertThat( - wrapper - .toProto(ProjectName.of("my-project")) - .getAppProfile() - .getMultiClusterRoutingUseAny()) + assertThat(wrapper.toProto("my-project").getAppProfile().getMultiClusterRoutingUseAny()) .isEqualTo(MultiClusterRoutingUseAny.getDefaultInstance()); } @@ -73,7 +68,7 @@ public void testDefaultDescription() { CreateAppProfileRequest.of("my-instance", "my-profile") .setRoutingPolicy(MultiClusterRoutingPolicy.of()); - assertThat(wrapper.toProto(ProjectName.of("my-project")).getAppProfile().getDescription()) + assertThat(wrapper.toProto("my-project").getAppProfile().getDescription()) .isEqualTo("my-profile"); } } diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequestTest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequestTest.java index 53ce781b55f0..3b3e6340cf90 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequestTest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequestTest.java @@ -17,7 +17,7 @@ import static com.google.common.truth.Truth.assertThat; -import com.google.bigtable.admin.v2.ProjectName; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -31,12 +31,11 @@ public void testProductionSingle() { .setType(Instance.Type.PRODUCTION) .addCluster("cluster1", "us-east1-c", 3, StorageType.SSD); - com.google.bigtable.admin.v2.CreateInstanceRequest actual = - input.toProto(ProjectName.of("my-project")); + com.google.bigtable.admin.v2.CreateInstanceRequest actual = input.toProto("my-project"); com.google.bigtable.admin.v2.CreateInstanceRequest expected = com.google.bigtable.admin.v2.CreateInstanceRequest.newBuilder() - .setParent(ProjectName.of("my-project").toString()) + .setParent(NameUtil.formatProjectName("my-project")) .setInstanceId("my-instance") .setInstance( com.google.bigtable.admin.v2.Instance.newBuilder() @@ -62,12 +61,11 @@ public void testProductionReplication() { .addCluster("cluster1", "us-east1-c", 3, StorageType.SSD) .addCluster("cluster2", "us-east1-a", 3, StorageType.SSD); - com.google.bigtable.admin.v2.CreateInstanceRequest actual = - input.toProto(ProjectName.of("my-project")); + com.google.bigtable.admin.v2.CreateInstanceRequest actual = input.toProto("my-project"); com.google.bigtable.admin.v2.CreateInstanceRequest expected = com.google.bigtable.admin.v2.CreateInstanceRequest.newBuilder() - .setParent(ProjectName.of("my-project").toString()) + .setParent(NameUtil.formatProjectName("my-project")) .setInstanceId("my-instance") .setInstance( com.google.bigtable.admin.v2.Instance.newBuilder() @@ -99,12 +97,11 @@ public void testDevelopment() { .setType(Instance.Type.DEVELOPMENT) .addCluster("cluster1", "us-east1-c", 1, StorageType.SSD); - com.google.bigtable.admin.v2.CreateInstanceRequest actual = - input.toProto(ProjectName.of("my-project")); + com.google.bigtable.admin.v2.CreateInstanceRequest actual = input.toProto("my-project"); com.google.bigtable.admin.v2.CreateInstanceRequest expected = com.google.bigtable.admin.v2.CreateInstanceRequest.newBuilder() - .setParent(ProjectName.of("my-project").toString()) + .setParent(NameUtil.formatProjectName("my-project")) .setInstanceId("my-instance") .setInstance( com.google.bigtable.admin.v2.Instance.newBuilder() @@ -132,12 +129,11 @@ public void testOptionalFields() { .setType(Instance.Type.DEVELOPMENT) .addCluster("cluster1", "us-east1-c", 1, StorageType.SSD); - com.google.bigtable.admin.v2.CreateInstanceRequest actual = - input.toProto(ProjectName.of("my-project")); + com.google.bigtable.admin.v2.CreateInstanceRequest actual = input.toProto("my-project"); com.google.bigtable.admin.v2.CreateInstanceRequest expected = com.google.bigtable.admin.v2.CreateInstanceRequest.newBuilder() - .setParent(ProjectName.of("my-project").toString()) + .setParent(NameUtil.formatProjectName("my-project")) .setInstanceId("my-instance") .setInstance( com.google.bigtable.admin.v2.Instance.newBuilder() diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableAdminRequestsTest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableAdminRequestsTest.java index da10ce27f747..21366854cde4 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableAdminRequestsTest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableAdminRequestsTest.java @@ -21,7 +21,7 @@ import com.google.bigtable.admin.v2.GcRule; import com.google.bigtable.admin.v2.InstanceName; import com.google.bigtable.admin.v2.Table; -import com.google.bigtable.admin.v2.TableName; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.protobuf.ByteString; import org.junit.Test; import org.junit.runner.RunWith; @@ -29,7 +29,8 @@ @RunWith(JUnit4.class) public class TableAdminRequestsTest { - private final InstanceName instanceName = InstanceName.of("project", "instance"); + private final String PROJECT_ID = "project"; + private final String INSTANCE_ID = "instance"; @Test public void createTable() { @@ -38,7 +39,7 @@ public void createTable() { .addFamily("cf1") .addFamily("cf2", GCRules.GCRULES.maxVersions(1)) .addSplit(ByteString.copyFromUtf8("c")) - .toProto(instanceName); + .toProto(PROJECT_ID, INSTANCE_ID); com.google.bigtable.admin.v2.CreateTableRequest expected = com.google.bigtable.admin.v2.CreateTableRequest.newBuilder() @@ -64,9 +65,10 @@ public void createTableRequiredTableId() { CreateTableRequest.of(null); } + @SuppressWarnings("ConstantConditions") @Test(expected = NullPointerException.class) public void createTableRequiredParent() { - CreateTableRequest.of("tableId").toProto(null); + CreateTableRequest.of("tableId").toProto(null, null); } @Test @@ -78,13 +80,11 @@ public void modifyFamilies() { .addFamily("cf3") .updateFamily("cf1", GCRules.GCRULES.maxVersions(5)) .dropFamily("cf3") - .toProto(instanceName); + .toProto(PROJECT_ID, INSTANCE_ID); com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest expected = com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.newBuilder() - .setName( - TableName.of(instanceName.getProject(), instanceName.getInstance(), "tableId") - .toString()) + .setName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, "tableId")) .addModifications( com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.newBuilder() .setId("cf1") @@ -119,11 +119,11 @@ public void modifyFamilies() { @Test(expected = NullPointerException.class) public void modifyFamiliesRequiredTableId() { - ModifyColumnFamiliesRequest.of(null).toProto(instanceName); + ModifyColumnFamiliesRequest.of(null).toProto(PROJECT_ID, INSTANCE_ID); } @Test(expected = NullPointerException.class) public void modifyFamiliesRequiredParent() { - ModifyColumnFamiliesRequest.of("tableId").toProto(null); + ModifyColumnFamiliesRequest.of("tableId").toProto(null, null); } } diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequestTest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequestTest.java index dfa04d5ad9f8..ae3119b81a44 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequestTest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequestTest.java @@ -19,7 +19,6 @@ import com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny; import com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting; -import com.google.bigtable.admin.v2.ProjectName; import com.google.cloud.bigtable.admin.v2.models.AppProfile.SingleClusterRoutingPolicy; import com.google.protobuf.FieldMask; import org.junit.Test; @@ -36,7 +35,7 @@ public void testToProto() { .setRoutingPolicy(SingleClusterRoutingPolicy.of("my-cluster", true)) .setIgnoreWarnings(true); - assertThat(wrapper.toProto(ProjectName.of("my-project"))) + assertThat(wrapper.toProto("my-project")) .isEqualTo( com.google.bigtable.admin.v2.UpdateAppProfileRequest.newBuilder() .setAppProfile( @@ -70,7 +69,7 @@ public void testUpdateExisting() { UpdateAppProfileRequest updateWrapper = UpdateAppProfileRequest.of(existingWrapper).setDescription("new description"); - assertThat(updateWrapper.toProto(ProjectName.of("my-project"))) + assertThat(updateWrapper.toProto("my-project")) .isEqualTo( com.google.bigtable.admin.v2.UpdateAppProfileRequest.newBuilder() .setAppProfile(existingProto.toBuilder().setDescription("new description")) diff --git a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequestTest.java b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequestTest.java index 05f382681956..b5561769b604 100644 --- a/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequestTest.java +++ b/google-cloud-clients/google-cloud-bigtable-admin/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequestTest.java @@ -20,7 +20,6 @@ import com.google.bigtable.admin.v2.Instance; import com.google.bigtable.admin.v2.Instance.Type; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; -import com.google.bigtable.admin.v2.ProjectName; import com.google.common.collect.ImmutableMap; import com.google.protobuf.FieldMask; import org.junit.Test; @@ -36,7 +35,7 @@ public void testEmpty() { Exception actualError = null; try { - input.toProto(ProjectName.of("my-project")); + input.toProto("my-project"); } catch (Exception e) { actualError = e; } @@ -49,7 +48,7 @@ public void testDisplayName() { UpdateInstanceRequest input = UpdateInstanceRequest.of("my-instance").setDisplayName("my display name"); - PartialUpdateInstanceRequest actual = input.toProto(ProjectName.of("my-project")); + PartialUpdateInstanceRequest actual = input.toProto("my-project"); PartialUpdateInstanceRequest expected = PartialUpdateInstanceRequest.newBuilder() @@ -72,7 +71,7 @@ public void testLabels() { "label1", "value1", "label2", "value2")); - PartialUpdateInstanceRequest actual = input.toProto(ProjectName.of("my-project")); + PartialUpdateInstanceRequest actual = input.toProto("my-project"); PartialUpdateInstanceRequest expected = PartialUpdateInstanceRequest.newBuilder() @@ -91,7 +90,7 @@ public void testLabels() { public void testType() { UpdateInstanceRequest input = UpdateInstanceRequest.of("my-instance").setProductionType(); - PartialUpdateInstanceRequest actual = input.toProto(ProjectName.of("my-project")); + PartialUpdateInstanceRequest actual = input.toProto("my-project"); PartialUpdateInstanceRequest expected = PartialUpdateInstanceRequest.newBuilder() diff --git a/google-cloud-clients/google-cloud-bigtable/README.md b/google-cloud-clients/google-cloud-bigtable/README.md index de41191a0563..1fff53b41f57 100644 --- a/google-cloud-clients/google-cloud-bigtable/README.md +++ b/google-cloud-clients/google-cloud-bigtable/README.md @@ -21,16 +21,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-bigtable - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-bigtable:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-bigtable:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-bigtable/pom.xml b/google-cloud-clients/google-cloud-bigtable/pom.xml index 5c1b1be34682..7b055841ee51 100644 --- a/google-cloud-clients/google-cloud-bigtable/pom.xml +++ b/google-cloud-clients/google-cloud-bigtable/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-bigtable - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Bigtable https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-bigtable @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-bigtable diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java index d1061ac74d11..aa1084b6ff1a 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java @@ -27,7 +27,6 @@ import com.google.cloud.bigtable.data.v2.models.BulkMutationBatcher; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.Filters.Filter; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; @@ -47,8 +46,7 @@ * get started: * *

{@code
- * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+ * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
  *   for(Row row : bigtableDataClient.readRows(Query.create("[TABLE]")) {
  *     // Do something with row
  *   }
@@ -89,7 +87,8 @@
  * 
{@code
  * BigtableDataSettings bigtableDataSettings =
  *     BigtableDataSettings.newBuilder()
- *         .setInstanceName(InstanceName.of("[PROJECT]", "[INSTANCE]"))
+ *         .setProjectId("[PROJECT]")
+ *         .setInstanceId("[INSTANCE]")
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
  * try(BigtableDataClient bigtableDataClient = BigtableDataClient.create(bigtableDataSettings)) {
@@ -102,7 +101,8 @@
  * 
{@code
  * BigtableDataSettings bigtableDataSettings =
  *     BigtableDataSettings.newBuilder()
- *       .setInstanceName(InstanceName.of("[PROJECT]", "[INSTANCE]"))
+ *       .setProjectId("[PROJECT]")
+ *       .setInstanceId("[INSTANCE]")
  *       .setEndpoint(myEndpoint).build();
  * try(BigtableDataClient bigtableDataClient = BigtableDataClient.create(bigtableDataSettings)) {
  *   // ..
@@ -112,14 +112,31 @@
 public class BigtableDataClient implements AutoCloseable {
   private final EnhancedBigtableStub stub;
 
+  /**
+   * Constructs an instance of BigtableDataClient with default settings.
+   *
+   * @param projectId The project id of the instance to connect to.
+   * @param instanceId The id of the instance to connect to.
+   * @return A new client.
+   * @throws IOException If any.
+   */
+  public static BigtableDataClient create(String projectId, String instanceId) throws IOException {
+    BigtableDataSettings settings =
+        BigtableDataSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId).build();
+    return create(settings);
+  }
+
   /**
    * Constructs an instance of BigtableDataClient with default settings.
    *
    * @param instanceName The instance to connect to.
    * @return A new client.
    * @throws IOException If any.
+   * @deprecated Please use {@link #create(String, String)}.
    */
-  public static BigtableDataClient create(InstanceName instanceName) throws IOException {
+  @Deprecated
+  public static BigtableDataClient create(
+      com.google.cloud.bigtable.data.v2.models.InstanceName instanceName) throws IOException {
     BigtableDataSettings settings =
         BigtableDataSettings.newBuilder().setInstanceName(instanceName).build();
     return create(settings);
@@ -145,9 +162,8 @@ public static BigtableDataClient create(BigtableDataSettings settings) throws IO
    *
    * 

Sample code: * - *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * 
{code
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE]";
    *
    *   Row row = bigtableDataClient.readRow(tableId, ByteString.copyFromUtf8("key"));
@@ -176,9 +192,8 @@ public Row readRow(String tableId, ByteString rowKey) {
    *
    * 

Sample code: * - *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * 
{code
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE]";
    *
    *   Row row = bigtableDataClient.readRow(tableId, "key");
@@ -209,8 +224,7 @@ public Row readRow(String tableId, String rowKey) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE]";
    *
    *  // Build the filter expression
@@ -282,8 +296,7 @@ public Row readRow(String tableId, ByteString rowKey, @Nullable Filter filter) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE]";
    *
    *   ApiFuture futureResult = bigtableDataClient.readRowAsync(tableId,  "key");
@@ -316,8 +329,7 @@ public ApiFuture readRowAsync(String tableId, String rowKey) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE]";
    *
    *   ApiFuture futureResult = bigtableDataClient.readRowAsync(tableId,  ByteString.copyFromUtf8("key"));
@@ -350,8 +362,7 @@ public ApiFuture readRowAsync(String tableId, ByteString rowKey) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE]";
    *
    *  // Build the filter expression
@@ -422,7 +433,88 @@ public ApiFuture readRowAsync(String tableId, ByteString rowKey, @Nullable
     if (filter != null) {
       query = query.filter(filter);
     }
-    return readRowsCallable().first().futureCall(query);
+    return readRowCallable().futureCall(query);
+  }
+
+  /**
+   * Reads a single row. The returned callable object allows for customization of api invocation.
+   *
+   * 

Sample code: + * + *

{@code
+   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   *   String tableId = "[TABLE]";
+   *
+   *   Query query = Query.create(tableId)
+   *          .rowKey("[KEY]")
+   *          .filter(FILTERS.qualifier().regex("[COLUMN PREFIX].*"));
+   *
+   *   // Synchronous invocation
+   *   try {
+   *     Row row = bigtableDataClient.readRowCallable().call(query);
+   *     if (row == null) {
+   *       System.out.println("Row not found");
+   *     }
+   *   } catch (RuntimeException e) {
+   *     e.printStackTrace();
+   *   }
+   *
+   *   // Asynchronous invocation
+   *   ApiFuture rowFuture = bigtableDataClient.readRowCallable().futureCall(query);
+   *
+   *   ApiFutures.addCallback(rowFuture, new ApiFutureCallback() {
+   *     public void onFailure(Throwable t) {
+   *       if (t instanceof NotFoundException) {
+   *         System.out.println("Tried to read a non-existent table");
+   *       } else {
+   *         t.printStackTrace();
+   *       }
+   *     }
+   *     public void onSuccess(Row row) {
+   *       if (row == null) {
+   *         System.out.println("Row not found");
+   *       }
+   *     }
+   *   }, MoreExecutors.directExecutor());
+   * }
+   * }
+ * + * @see UnaryCallable For call styles. + * @see Query For query options. + * @see com.google.cloud.bigtable.data.v2.models.Filters For the filter building DSL. + */ + public UnaryCallable readRowCallable() { + return stub.readRowCallable(); + } + + /** + * Reads a single row. This callable allows for customization of the logical representation of a + * row. It's meant for advanced use cases. + * + *

Sample code: + * + *

{@code
+   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   *   String tableId = "[TABLE]";
+   *
+   *   Query query = Query.create(tableId)
+   *          .rowKey("[KEY]")
+   *          .filter(FILTERS.qualifier().regex("[COLUMN PREFIX].*"));
+   *
+   *   // Synchronous invocation
+   *   CustomRow row = bigtableDataClient.readRowCallable(new CustomRowAdapter()).call(query));
+   *   // Do something with row
+   * }
+   * }
+ * + * @see ServerStreamingCallable For call styles. + * @see Query For query options. + * @see com.google.cloud.bigtable.data.v2.models.Filters For the filter building DSL. + */ + public UnaryCallable readRowCallable(RowAdapter rowAdapter) { + return stub.createReadRowCallable(rowAdapter); } /** @@ -434,8 +526,7 @@ public ApiFuture readRowAsync(String tableId, ByteString rowKey, @Nullable * // Import the filter DSL * import static com.google.cloud.bigtable.data.v2.models.Filters.FILTERS; * - * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]"); - * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) { + * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) { * String tableId = "[TABLE]"; * * Query query = Query.create(tableId) @@ -469,8 +560,7 @@ public ServerStream readRows(Query query) { *

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE]";
    *
    *   Query query = Query.create(tableId)
@@ -507,8 +597,7 @@ public void readRowsAsync(Query query, ResponseObserver observer) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE]";
    *
    *   Query query = Query.create(tableId)
@@ -570,8 +659,7 @@ public ServerStreamingCallable readRowsCallable() {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE]";
    *
    *   Query query = Query.create(tableId)
@@ -607,8 +695,7 @@ public  ServerStreamingCallable readRowsCallable(RowAdapterSample code:
    *
    * 
{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   String tableId = "[TABLE_ID]";
    *
    *   List keyOffsets = bigtableDataClient.sampleRowKeys(tableId);
@@ -634,8 +721,7 @@ public List sampleRowKeys(String tableId) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableClient bigtableDataClient = BigtableClient.create(instanceName)) {
+   * try (BigtableClient bigtableDataClient = BigtableClient.create("[PROJECT]", "[INSTANCE]")) {
    *   ApiFuture> keyOffsetsFuture = bigtableClient.sampleRowKeysAsync("[TABLE]");
    *
    *   ApiFutures.addCallback(keyOffsetsFuture, new ApiFutureCallback>() {
@@ -666,8 +752,7 @@ public ApiFuture> sampleRowKeysAsync(String tableId) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   // Synchronous invocation
    *   try {
    *     List keyOffsets = bigtableDataClient.sampleRowKeysCallable().call("[TABLE]");
@@ -706,8 +791,7 @@ public UnaryCallable> sampleRowKeysCallable() {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   RowMutation mutation = RowMutation.create("[TABLE]", "[ROW KEY]")
    *     .setCell("[FAMILY NAME]", "[QUALIFIER]", "[VALUE]");
    *
@@ -730,8 +814,7 @@ public void mutateRow(RowMutation rowMutation) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   RowMutation mutation = RowMutation.create("[TABLE]", "[ROW KEY]")
    *     .setCell("[FAMILY NAME]", "[QUALIFIER]", "[VALUE]");
    *
@@ -763,8 +846,7 @@ public ApiFuture mutateRowAsync(RowMutation rowMutation) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   RowMutation mutation = RowMutation.create("[TABLE]", "[ROW KEY]")
    *     .setCell("[FAMILY NAME]", "[QUALIFIER]", "[VALUE]");
    *
@@ -790,8 +872,7 @@ public UnaryCallable mutateRowCallable() {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   try (BulkMutationBatcher batcher = bigtableDataClient.newBulkMutationBatcher()) {
    *     for (String someValue : someCollection) {
    *       RowMutation mutation = RowMutation.create("[TABLE]", "[ROW KEY]")
@@ -819,8 +900,7 @@ public BulkMutationBatcher newBulkMutationBatcher() {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   BulkMutation batch = BulkMutation.create("[TABLE]");
    *   for (String someValue : someCollection) {
    *     batch.add("[ROW KEY]", Mutation.create().setCell("[FAMILY NAME]", "[QUALIFIER]", "[VALUE]"));
@@ -849,8 +929,7 @@ public void bulkMutateRows(BulkMutation mutation) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableClient bigtableClient = BigtableClient.create(instanceName)) {
+   * try (BigtableClient bigtableClient = BigtableClient.create("[PROJECT]", "[INSTANCE]")) {
    *   BulkMutation batch = BulkMutation.create("[TABLE]");
    *   for (String someValue : someCollection) {
    *     ApiFuture entryFuture = batch.add("[ROW KEY]",
@@ -885,8 +964,7 @@ public ApiFuture bulkMutateRowsAsync(BulkMutation mutation) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   BulkMutation batch = BulkMutation.create("[TABLE]");
    *   for (String someValue : someCollection) {
    *     ApiFuture entryFuture = batch.add("[ROW KEY]",
@@ -906,8 +984,7 @@ public UnaryCallable bulkMutationCallable() {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   ConditionalRowMutation mutation = ConditionalRowMutation.create("[TABLE]", "[KEY]")
    *     .condition(FILTERS.value().regex("old-value"))
    *     .then(
@@ -933,8 +1010,7 @@ public Boolean checkAndMutateRow(ConditionalRowMutation mutation) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   ConditionalRowMutation mutation = ConditionalRowMutation.create("[TABLE]", "[KEY]")
    *     .condition(FILTERS.value().regex("old-value"))
    *     .then(
@@ -969,8 +1045,7 @@ public ApiFuture checkAndMutateRowAsync(ConditionalRowMutation mutation
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   ConditionalRowMutation mutation = ConditionalRowMutation.create("[TABLE]", "[KEY]")
    *     .condition(FILTERS.value().regex("old-value"))
    *     .then(
@@ -1005,8 +1080,7 @@ public UnaryCallable checkAndMutateRowCallable(
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   ReadModifyWriteRow mutation = ReadModifyWriteRow.create("[TABLE]", "[KEY]")
    *     .increment("[FAMILY]", "[QUALIFIER]", 1)
    *     .append("[FAMILY2]", "[QUALIFIER2]", "suffix");
@@ -1032,8 +1106,7 @@ public Row readModifyWriteRow(ReadModifyWriteRow mutation) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   ReadModifyWriteRow mutation = ReadModifyWriteRow.create("[TABLE]", "[KEY]")
    *     .increment("[FAMILY]", "[QUALIFIER]", 1)
    *     .append("[FAMILY2]", "[QUALIFIER2]", "suffix");
@@ -1068,8 +1141,7 @@ public ApiFuture readModifyWriteRowAsync(ReadModifyWriteRow mutation) {
    * 

Sample code: * *

{@code
-   * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
-   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create(instanceName)) {
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    *   ReadModifyWriteRow mutation = ReadModifyWriteRow.create("[TABLE]", "[KEY]")
    *     .increment("[FAMILY]", "[QUALIFIER]", 1)
    *     .append("[FAMILY2]", "[QUALIFIER2]", "suffix");
diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java
index 037737488df9..58991620a52b 100644
--- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java
+++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java
@@ -20,7 +20,6 @@
 import com.google.api.gax.rpc.ServerStreamingCallSettings;
 import com.google.api.gax.rpc.UnaryCallSettings;
 import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation;
-import com.google.cloud.bigtable.data.v2.models.InstanceName;
 import com.google.cloud.bigtable.data.v2.models.KeyOffset;
 import com.google.cloud.bigtable.data.v2.models.Query;
 import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow;
@@ -49,7 +48,8 @@
  *
  * 
{@code
  * BigtableDataSettings.Builder settingsBuilder = BigtableDataSettings.newBuilder()
- *   .setInstanceName(InstanceName.of("my-project", "my-instance-id"))
+ *   .setProjectId("my-project")
+ *   .setInstanceId("my-instance-id")
  *   .setAppProfileId("default");
  *
  * settingsBuilder.readRowsSettings().setRetryableCodes(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE);
@@ -67,12 +67,27 @@ public static Builder newBuilder() {
     return new Builder();
   }
 
-  /** Returns the target instance */
-  public InstanceName getInstanceName() {
+  /**
+   * Returns the target instance.
+   *
+   * @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}.
+   */
+  @Deprecated()
+  public com.google.cloud.bigtable.data.v2.models.InstanceName getInstanceName() {
     return getTypedStubSettings().getInstanceName();
   }
 
-  /** Returns the configured AppProfile to use */
+  /** Returns the target project id. */
+  public String getProjectId() {
+    return getTypedStubSettings().getProjectId();
+  }
+
+  /** Returns the target instance id. */
+  public String getInstanceId() {
+    return getTypedStubSettings().getInstanceId();
+  }
+
+  /** Returns the configured AppProfile id to use. */
   public String getAppProfileId() {
     return getTypedStubSettings().getAppProfileId();
   }
@@ -142,17 +157,55 @@ private Builder(BigtableDataSettings settings) {
     /**
      * Sets the target instance. This setting is required. All RPCs will be made in the context of
      * this setting.
+     *
+     * @deprecated Please use {@link #setProjectId(String)} and {@link #setInstanceId(String)}.
      */
-    public Builder setInstanceName(@Nonnull InstanceName instanceName) {
+    @Deprecated
+    public Builder setInstanceName(
+        @Nonnull com.google.cloud.bigtable.data.v2.models.InstanceName instanceName) {
       getTypedStubSettings().setInstanceName(instanceName);
       return this;
     }
 
-    /** Gets the {@link InstanceName} that was previously set on this Builder. */
-    public InstanceName getInstanceName() {
+    /**
+     * Gets the {@link com.google.cloud.bigtable.data.v2.models.InstanceName} that was previously
+     * set on this Builder.
+     *
+     * @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}.
+     */
+    @Deprecated
+    public com.google.cloud.bigtable.data.v2.models.InstanceName getInstanceName() {
       return getTypedStubSettings().getInstanceName();
     }
 
+    /**
+     * Sets the target project. This setting is required. All RPCs will be made in the context of
+     * this setting.
+     */
+    public Builder setProjectId(@Nonnull String projectId) {
+      getTypedStubSettings().setProjectId(projectId);
+      return this;
+    }
+
+    /** Gets the project id that was previously set on this Builder. */
+    public String getProjectId() {
+      return getTypedStubSettings().getProjectId();
+    }
+
+    /**
+     * Sets the target instance. This setting is required. All RPCs will be made in the context of
+     * this setting.
+     */
+    public Builder setInstanceId(@Nonnull String instanceId) {
+      getTypedStubSettings().setInstanceId(instanceId);
+      return this;
+    }
+
+    /** Gets the instance id that was previously set on this Builder. */
+    public String getInstanceId() {
+      return getTypedStubSettings().getInstanceId();
+    }
+
     /**
      * Sets the AppProfile to use. An application profile (sometimes also shortened to "app
      * profile") is a group of configuration parameters for an individual use case. A client will
diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/NameUtil.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/NameUtil.java
new file mode 100644
index 000000000000..c1118ed181c7
--- /dev/null
+++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/NameUtil.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2018 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.
+ */
+package com.google.cloud.bigtable.data.v2.internal;
+
+import com.google.api.core.InternalApi;
+import javax.annotation.Nonnull;
+
+/**
+ * Internal helper to compose full resource names.
+ *
+ * 

This class is considered an internal implementation detail and not meant to be used by + * applications. + */ +@InternalApi +public class NameUtil { + public static String formatInstanceName(@Nonnull String projectId, @Nonnull String instanceId) { + return "projects/" + projectId + "/instances/" + instanceId; + } + + public static String formatTableName( + @Nonnull String projectId, @Nonnull String instanceId, @Nonnull String tableId) { + return formatInstanceName(projectId, instanceId) + "/tables/" + tableId; + } +} diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RequestContext.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RequestContext.java index eabef9c766f8..dd90f5b35086 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RequestContext.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RequestContext.java @@ -17,7 +17,6 @@ import com.google.api.core.InternalApi; import com.google.auto.value.AutoValue; -import com.google.cloud.bigtable.data.v2.models.InstanceName; /** * Contains information necessary to construct Bigtable protobuf requests from user facing models. @@ -32,12 +31,36 @@ @InternalApi @AutoValue public abstract class RequestContext { - public static RequestContext create(InstanceName instanceName, String appProfileId) { - return new AutoValue_RequestContext(instanceName, appProfileId); + + /** Creates a new instance of the {@link RequestContext}. */ + public static RequestContext create(String projectId, String instanceId, String appProfileId) { + return new AutoValue_RequestContext(projectId, instanceId, appProfileId); + } + + /** @deprecated Please use {@link #create(String, String, String)}. */ + @Deprecated + public static RequestContext create( + com.google.cloud.bigtable.data.v2.models.InstanceName instanceName, String appProfileId) { + return new AutoValue_RequestContext( + instanceName.getProject(), instanceName.getInstance(), appProfileId); } - /** The instance that the client is configured to target */ - public abstract InstanceName getInstanceName(); + /** The project id that the client is configured to target. */ + public abstract String getProjectId(); + + /** The instance id that the client is configured to target. */ + public abstract String getInstanceId(); + + /** + * The instance that the client is configured to target. + * + * @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}. + */ + @Deprecated + public com.google.cloud.bigtable.data.v2.models.InstanceName getInstanceName() { + return com.google.cloud.bigtable.data.v2.models.InstanceName.of( + getProjectId(), getInstanceId()); + } /** The App Profile to use when processing the current request */ public abstract String getAppProfileId(); diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java index 8ec8b3050388..e8951a74475c 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java @@ -17,7 +17,7 @@ import com.google.api.core.InternalApi; import com.google.bigtable.v2.MutateRowsRequest; -import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; @@ -91,14 +91,12 @@ public BulkMutation add(@Nonnull ByteString rowKey, @Nonnull Mutation mutation) @InternalApi public MutateRowsRequest toProto(RequestContext requestContext) { - TableName tableName = - TableName.of( - requestContext.getInstanceName().getProject(), - requestContext.getInstanceName().getInstance(), - tableId); + String tableName = + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), tableId); return builder - .setTableName(tableName.toString()) + .setTableName(tableName) .setAppProfileId(requestContext.getAppProfileId()) .build(); } diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java index d44e148105cc..15cc2be1f411 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java @@ -17,7 +17,7 @@ import com.google.api.core.InternalApi; import com.google.bigtable.v2.CheckAndMutateRowRequest; -import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.models.Filters.Filter; import com.google.common.base.Preconditions; @@ -128,11 +128,9 @@ public CheckAndMutateRowRequest toProto(RequestContext requestContext) { Preconditions.checkState( !builder.getTrueMutationsList().isEmpty() || !builder.getFalseMutationsList().isEmpty(), "ConditionalRowMutations must have `then` or `otherwise` mutations."); - TableName tableName = - TableName.of( - requestContext.getInstanceName().getProject(), - requestContext.getInstanceName().getInstance(), - tableId); + String tableName = + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), tableId); return builder .setTableName(tableName.toString()) .setAppProfileId(requestContext.getAppProfileId()) diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/InstanceName.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/InstanceName.java index ed64f7375dd6..fc63cdaf68e9 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/InstanceName.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/InstanceName.java @@ -24,8 +24,9 @@ import java.util.Map; // Copied from com.google.bigtable.admin.v2 -// TODO: figure out how to unify admin & data resource names -/** Typesafe representation of a fully qualified Bigtable instance name */ + +/** @deprecated Please use project id and instance id strings instead. */ +@Deprecated public class InstanceName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("projects/{project}/instances/{instance}"); diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java index 41091c894bad..c01174bbe07d 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java @@ -19,11 +19,13 @@ import com.google.bigtable.v2.ReadRowsRequest; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.RowSet; -import com.google.bigtable.v2.TableName; import com.google.cloud.bigtable.data.v2.internal.ByteStringComparator; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.internal.RowSetUtil; import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.Lists; @@ -246,14 +248,12 @@ public ByteStringRange getBound() { */ @InternalApi public ReadRowsRequest toProto(RequestContext requestContext) { - TableName tableName = - TableName.of( - requestContext.getInstanceName().getProject(), - requestContext.getInstanceName().getInstance(), - tableId); + String tableName = + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), tableId); return builder - .setTableName(tableName.toString()) + .setTableName(tableName) .setAppProfileId(requestContext.getAppProfileId()) .build(); } @@ -264,4 +264,34 @@ private static ByteString wrapKey(String key) { } return ByteString.copyFromUtf8(key); } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Query query = (Query) o; + return Objects.equal(tableId, query.tableId) + && Objects.equal(builder.build(), query.builder.build()); + } + + @Override + public int hashCode() { + return Objects.hashCode(tableId, builder.build()); + } + + @Override + public String toString() { + ReadRowsRequest request = builder.build(); + + return MoreObjects.toStringHelper(this) + .add("tableId", tableId) + .add("keys", request.getRows().getRowKeysList()) + .add("ranges", request.getRows().getRowRangesList()) + .add("filter", request.getFilter()) + .toString(); + } } diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java index 9e04b14ad255..26253b9cbcc9 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java @@ -18,7 +18,7 @@ import com.google.api.core.InternalApi; import com.google.bigtable.v2.ReadModifyWriteRowRequest; import com.google.bigtable.v2.ReadModifyWriteRule; -import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; @@ -128,13 +128,12 @@ public ReadModifyWriteRow increment( @InternalApi public ReadModifyWriteRowRequest toProto(RequestContext requestContext) { - TableName tableName = - TableName.of( - requestContext.getInstanceName().getProject(), - requestContext.getInstanceName().getInstance(), - tableId); + String tableName = + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), tableId); + return builder - .setTableName(tableName.toString()) + .setTableName(tableName) .setAppProfileId(requestContext.getAppProfileId()) .build(); } diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java index 87b5cee693cd..8e6885ea6918 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java @@ -19,7 +19,7 @@ import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsRequest.Entry; -import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.protobuf.ByteString; @@ -158,15 +158,13 @@ public RowMutation deleteRow() { @InternalApi public MutateRowRequest toProto(RequestContext requestContext) { - TableName tableName = - TableName.of( - requestContext.getInstanceName().getProject(), - requestContext.getInstanceName().getInstance(), - tableId); + String tableName = + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), tableId); return MutateRowRequest.newBuilder() .setAppProfileId(requestContext.getAppProfileId()) - .setTableName(tableName.toString()) + .setTableName(tableName) .setRowKey(key) .addAllMutations(mutation.getMutations()) .build(); @@ -178,15 +176,13 @@ public MutateRowRequest toProto(RequestContext requestContext) { */ @InternalApi public MutateRowsRequest toBulkProto(RequestContext requestContext) { - TableName tableName = - TableName.of( - requestContext.getInstanceName().getProject(), - requestContext.getInstanceName().getInstance(), - tableId); + String tableName = + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), tableId); return MutateRowsRequest.newBuilder() .setAppProfileId(requestContext.getAppProfileId()) - .setTableName(tableName.toString()) + .setTableName(tableName) .addEntries( Entry.newBuilder().setRowKey(key).addAllMutations(mutation.getMutations()).build()) .build(); diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index 5d3c733476cc..b9159a26eabe 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -74,6 +74,7 @@ public class EnhancedBigtableStub implements AutoCloseable { private final RequestContext requestContext; private final ServerStreamingCallable readRowsCallable; + private final UnaryCallable readRowCallable; private final UnaryCallable> sampleRowKeysCallable; private final UnaryCallable mutateRowCallable; private final UnaryCallable bulkMutateRowsCallable; @@ -148,9 +149,11 @@ public static EnhancedBigtableStub create(EnhancedBigtableStubSettings settings) this.clientContext = clientContext; this.stub = stub; this.requestContext = - RequestContext.create(settings.getInstanceName(), settings.getAppProfileId()); + RequestContext.create( + settings.getProjectId(), settings.getInstanceId(), settings.getAppProfileId()); readRowsCallable = createReadRowsCallable(new DefaultRowAdapter()); + readRowCallable = createReadRowCallable(new DefaultRowAdapter()); sampleRowKeysCallable = createSampleRowKeysCallable(); mutateRowCallable = createMutateRowCallable(); bulkMutateRowsCallable = createBulkMutateRowsCallable(); @@ -162,7 +165,7 @@ public static EnhancedBigtableStub create(EnhancedBigtableStubSettings settings) // /** - * Creates a callable chain to handle ReadRows RPCs. The chain will: + * Creates a callable chain to handle streaming ReadRows RPCs. The chain will: * *

    *
  • Convert a {@link Query} into a {@link com.google.bigtable.v2.ReadRowsRequest} and @@ -176,6 +179,48 @@ public static EnhancedBigtableStub create(EnhancedBigtableStubSettings settings) */ public ServerStreamingCallable createReadRowsCallable( RowAdapter rowAdapter) { + return createReadRowsCallable(settings.readRowsSettings(), rowAdapter); + } + + /** + * Creates a callable chain to handle point ReadRows RPCs. The chain will: + * + *
      + *
    • Convert a {@link Query} into a {@link com.google.bigtable.v2.ReadRowsRequest} and + * dispatch the RPC. + *
    • Upon receiving the response stream, it will merge the {@link + * com.google.bigtable.v2.ReadRowsResponse.CellChunk}s in logical rows. The actual row + * implementation can be configured in by the {@code rowAdapter} parameter. + *
    • Retry/resume on failure. + *
    • Filter out marker rows. + *
    + */ + public UnaryCallable createReadRowCallable(RowAdapter rowAdapter) { + return createReadRowsCallable( + ServerStreamingCallSettings.newBuilder() + .setRetryableCodes(settings.readRowSettings().getRetryableCodes()) + .setRetrySettings(settings.readRowSettings().getRetrySettings()) + .setIdleTimeout(settings.readRowSettings().getRetrySettings().getTotalTimeout()) + .build(), + rowAdapter) + .first(); + } + + /** + * Creates a callable chain to handle ReadRows RPCs. The chain will: + * + *
      + *
    • Convert a {@link Query} into a {@link com.google.bigtable.v2.ReadRowsRequest} and + * dispatch the RPC. + *
    • Upon receiving the response stream, it will merge the {@link + * com.google.bigtable.v2.ReadRowsResponse.CellChunk}s in logical rows. The actual row + * implementation can be configured in by the {@code rowAdapter} parameter. + *
    • Retry/resume on failure. + *
    • Filter out marker rows. + *
    + */ + private ServerStreamingCallable createReadRowsCallable( + ServerStreamingCallSettings readRowsSettings, RowAdapter rowAdapter) { ServerStreamingCallable merging = new RowMergingCallable<>(stub.readRowsCallable(), rowAdapter); @@ -185,9 +230,9 @@ public ServerStreamingCallable createReadRowsCallable( ServerStreamingCallSettings innerSettings = ServerStreamingCallSettings.newBuilder() .setResumptionStrategy(new ReadRowsResumptionStrategy<>(rowAdapter)) - .setRetryableCodes(settings.readRowsSettings().getRetryableCodes()) - .setRetrySettings(settings.readRowsSettings().getRetrySettings()) - .setIdleTimeout(settings.readRowsSettings().getIdleTimeout()) + .setRetryableCodes(readRowsSettings.getRetryableCodes()) + .setRetrySettings(readRowsSettings.getRetrySettings()) + .setIdleTimeout(readRowsSettings.getIdleTimeout()) .build(); // Retry logic is split into 2 parts to workaround a rare edge case described in @@ -356,10 +401,16 @@ private UnaryCallable createReadModifyWriteRowCallable( // // + /** Returns a streaming read rows callable */ public ServerStreamingCallable readRowsCallable() { return readRowsCallable; } + /** Return a point read callable */ + public UnaryCallable readRowCallable() { + return readRowCallable; + } + public UnaryCallable> sampleRowKeysCallable() { return sampleRowKeysCallable; } diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java index 63320cfdc3d0..ca44142a91eb 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java @@ -29,7 +29,6 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.bigtable.data.v2.internal.DummyBatchingDescriptor; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; @@ -61,7 +60,8 @@ * *
    {@code
      * BigtableDataSettings.Builder settingsBuilder = BigtableDataSettings.newBuilder()
    - *   .setInstanceName(InstanceName.of("my-project", "my-instance-id"))
    + *   .setProjectId("my-project-id")
    + *   .setInstanceId("my-instance-id")
      *   .setAppProfileId("default");
      *
      * settingsBuilder.readRowsSettings()
    @@ -108,10 +108,12 @@ public class EnhancedBigtableStubSettings extends StubSettings readRowsSettings;
    +  private final UnaryCallSettings readRowSettings;
       private final UnaryCallSettings> sampleRowKeysSettings;
       private final UnaryCallSettings mutateRowSettings;
       private final BatchingCallSettings bulkMutateRowsSettings;
    @@ -120,11 +122,23 @@ public class EnhancedBigtableStubSettings extends StubSettings> sampleRowKeysSettings() {
         return sampleRowKeysSettings;
       }
     
    +  /** Returns the object with the settings used for point reads via ReadRows. */
    +  public UnaryCallSettings readRowSettings() {
    +    return readRowSettings;
    +  }
    +
       /** Returns the object with the settings used for calls to MutateRow. */
       public UnaryCallSettings mutateRowSettings() {
         return mutateRowSettings;
    @@ -196,10 +230,13 @@ public Builder toBuilder() {
     
       /** Builder for BigtableDataSettings. */
       public static class Builder extends StubSettings.Builder {
    -    private InstanceName instanceName;
    +
    +    private String projectId;
    +    private String instanceId;
         private String appProfileId;
     
         private final ServerStreamingCallSettings.Builder readRowsSettings;
    +    private final UnaryCallSettings.Builder readRowSettings;
         private final UnaryCallSettings.Builder> sampleRowKeysSettings;
         private final UnaryCallSettings.Builder mutateRowSettings;
         private final BatchingCallSettings.Builder bulkMutateRowsSettings;
    @@ -234,18 +271,27 @@ private Builder() {
     
           // Per-method settings using baseSettings for defaults.
           readRowsSettings = ServerStreamingCallSettings.newBuilder();
    -      /* TODO: copy timeouts, retryCodes & retrySettings from baseSettings.readRows once it exists in GAPIC */
           readRowsSettings
    -          .setRetryableCodes(DEFAULT_RETRY_CODES)
    -          .setRetrySettings(
    -              DEFAULT_RETRY_SETTINGS.toBuilder().setTotalTimeout(Duration.ofHours(1)).build())
    +          .setRetryableCodes(baseDefaults.readRowsSettings().getRetryableCodes())
    +          .setRetrySettings(baseDefaults.readRowsSettings().getRetrySettings())
               .setIdleTimeout(Duration.ofMinutes(5));
     
    +      // Point reads should use same defaults as streaming reads, but with a shorter timeout
    +      readRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
    +      readRowSettings
    +          .setRetryableCodes(baseDefaults.readRowsSettings().getRetryableCodes())
    +          .setRetrySettings(
    +              baseDefaults
    +                  .readRowsSettings()
    +                  .getRetrySettings()
    +                  .toBuilder()
    +                  .setTotalTimeout(DEFAULT_RETRY_SETTINGS.getTotalTimeout())
    +                  .build());
    +
           sampleRowKeysSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
    -      /* TODO: copy retryCodes & retrySettings from baseSettings.sampleRowKeysSettings once it exists in GAPIC */
           sampleRowKeysSettings
    -          .setRetryableCodes(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE, Code.ABORTED)
    -          .setRetrySettings(DEFAULT_RETRY_SETTINGS);
    +          .setRetryableCodes(baseDefaults.sampleRowKeysSettings().getRetryableCodes())
    +          .setRetrySettings(baseDefaults.sampleRowKeysSettings().getRetrySettings());
     
           mutateRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
           copyRetrySettings(baseDefaults.mutateRowSettings(), mutateRowSettings);
    @@ -277,11 +323,13 @@ private Builder() {
     
         private Builder(EnhancedBigtableStubSettings settings) {
           super(settings);
    -      instanceName = settings.instanceName;
    +      projectId = settings.projectId;
    +      instanceId = settings.instanceId;
           appProfileId = settings.appProfileId;
     
           // Per method settings.
           readRowsSettings = settings.readRowsSettings.toBuilder();
    +      readRowSettings = settings.readRowSettings.toBuilder();
           sampleRowKeysSettings = settings.sampleRowKeysSettings.toBuilder();
           mutateRowSettings = settings.mutateRowSettings.toBuilder();
           bulkMutateRowsSettings = settings.bulkMutateRowsSettings.toBuilder();
    @@ -305,16 +353,60 @@ private static void copyRetrySettings(
         /**
          * Sets the target instance. This setting is required. All RPCs will be made in the context of
          * this setting.
    +     *
    +     * @deprecated Please use {@link #setProjectId(String)} and {@link #setInstanceId(String)}.
          */
    -    public Builder setInstanceName(@Nonnull InstanceName instanceName) {
    +    @Deprecated
    +    public Builder setInstanceName(
    +        @Nonnull com.google.cloud.bigtable.data.v2.models.InstanceName instanceName) {
           Preconditions.checkNotNull(instanceName);
    -      this.instanceName = instanceName;
    +      this.projectId = instanceName.getProject();
    +      this.instanceId = instanceName.getInstance();
    +      return this;
    +    }
    +
    +    /**
    +     * Gets the {@link com.google.cloud.bigtable.data.v2.models.InstanceName} that was previously
    +     * set on this Builder.
    +     *
    +     * @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}.
    +     */
    +    @Deprecated
    +    public com.google.cloud.bigtable.data.v2.models.InstanceName getInstanceName() {
    +      if (projectId != null && instanceId != null) {
    +        return com.google.cloud.bigtable.data.v2.models.InstanceName.of(projectId, instanceId);
    +      }
    +      return null;
    +    }
    +
    +    /**
    +     * Sets the project id of that target instance. This setting is required. All RPCs will be made
    +     * in the context of this setting.
    +     */
    +    public Builder setProjectId(@Nonnull String projectId) {
    +      Preconditions.checkNotNull(projectId);
    +      this.projectId = projectId;
           return this;
         }
     
    -    /** Gets the {@link InstanceName} that was previously set on this Builder. */
    -    public InstanceName getInstanceName() {
    -      return instanceName;
    +    /** Gets the project id of the target instance that was previously set on this Builder. */
    +    public String getProjectId() {
    +      return projectId;
    +    }
    +
    +    /**
    +     * Sets the target instance id. This setting is required. All RPCs will be made in the context
    +     * of this setting.
    +     */
    +    public Builder setInstanceId(@Nonnull String instanceId) {
    +      Preconditions.checkNotNull(instanceId);
    +      this.instanceId = instanceId;
    +      return this;
    +    }
    +
    +    /** Gets the target instance id that was previously set on this Builder. */
    +    public String getInstanceId() {
    +      return instanceId;
         }
     
         /**
    @@ -339,6 +431,11 @@ public ServerStreamingCallSettings.Builder readRowsSettings() {
           return readRowsSettings;
         }
     
    +    /** Returns the builder for the settings used for point reads using readRow. */
    +    public UnaryCallSettings.Builder readRowSettings() {
    +      return readRowSettings;
    +    }
    +
         /** Returns the builder for the settings used for calls to SampleRowKeysSettings. */
         public UnaryCallSettings.Builder> sampleRowKeysSettings() {
           return sampleRowKeysSettings;
    @@ -366,7 +463,8 @@ public UnaryCallSettings.Builder readModifyWriteRowSett
     
         @SuppressWarnings("unchecked")
         public EnhancedBigtableStubSettings build() {
    -      Preconditions.checkState(instanceName != null, "InstanceName must be set");
    +      Preconditions.checkState(projectId != null, "Project id must be set");
    +      Preconditions.checkState(instanceId != null, "Instance id must be set");
     
           return new EnhancedBigtableStubSettings(this);
         }
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallable.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallable.java
    index 554bf2bb08a8..7658e414922b 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallable.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallable.java
    @@ -22,7 +22,7 @@
     import com.google.api.gax.rpc.UnaryCallable;
     import com.google.bigtable.v2.SampleRowKeysRequest;
     import com.google.bigtable.v2.SampleRowKeysResponse;
    -import com.google.bigtable.v2.TableName;
    +import com.google.cloud.bigtable.data.v2.internal.NameUtil;
     import com.google.cloud.bigtable.data.v2.internal.RequestContext;
     import com.google.cloud.bigtable.data.v2.models.KeyOffset;
     import com.google.common.collect.ImmutableList;
    @@ -44,15 +44,13 @@ class SampleRowKeysCallable extends UnaryCallable> {
     
       @Override
       public ApiFuture> futureCall(String tableId, ApiCallContext context) {
    -    TableName tableName =
    -        TableName.of(
    -            requestContext.getInstanceName().getProject(),
    -            requestContext.getInstanceName().getInstance(),
    -            tableId);
    +    String tableName =
    +        NameUtil.formatTableName(
    +            requestContext.getProjectId(), requestContext.getInstanceId(), tableId);
     
         SampleRowKeysRequest request =
             SampleRowKeysRequest.newBuilder()
    -            .setTableName(tableName.toString())
    +            .setTableName(tableName)
                 .setAppProfileId(requestContext.getAppProfileId())
                 .build();
     
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClientTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClientTest.java
    index 8fa5813be340..0b55cb6ed4b0 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClientTest.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClientTest.java
    @@ -40,7 +40,7 @@
     import com.google.bigtable.v2.RowFilter;
     import com.google.bigtable.v2.SampleRowKeysRequest;
     import com.google.bigtable.v2.SampleRowKeysResponse;
    -import com.google.bigtable.v2.TableName;
    +import com.google.cloud.bigtable.data.v2.internal.NameUtil;
     import com.google.protobuf.ByteString;
     import com.google.protobuf.GeneratedMessageV3;
     import io.grpc.Status;
    @@ -101,9 +101,8 @@ public void readRowsTest() throws Exception {
         ReadRowsResponse expectedResponse =
             ReadRowsResponse.newBuilder().setLastScannedRowKey(lastScannedRowKey).build();
         mockBigtable.addResponse(expectedResponse);
    -    TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    -    ReadRowsRequest request =
    -        ReadRowsRequest.newBuilder().setTableName(tableName.toString()).build();
    +    String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +    ReadRowsRequest request = ReadRowsRequest.newBuilder().setTableName(tableName).build();
     
         MockStreamObserver responseObserver = new MockStreamObserver<>();
     
    @@ -120,9 +119,8 @@ public void readRowsTest() throws Exception {
       public void readRowsExceptionTest() throws Exception {
         StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
         mockBigtable.addException(exception);
    -    TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    -    ReadRowsRequest request =
    -        ReadRowsRequest.newBuilder().setTableName(tableName.toString()).build();
    +    String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +    ReadRowsRequest request = ReadRowsRequest.newBuilder().setTableName(tableName).build();
     
         MockStreamObserver responseObserver = new MockStreamObserver<>();
     
    @@ -147,9 +145,9 @@ public void sampleRowKeysTest() throws Exception {
         SampleRowKeysResponse expectedResponse =
             SampleRowKeysResponse.newBuilder().setRowKey(rowKey).setOffsetBytes(offsetBytes).build();
         mockBigtable.addResponse(expectedResponse);
    -    TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +    String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
         SampleRowKeysRequest request =
    -        SampleRowKeysRequest.newBuilder().setTableName(tableName.toString()).build();
    +        SampleRowKeysRequest.newBuilder().setTableName(tableName).build();
     
         MockStreamObserver responseObserver = new MockStreamObserver<>();
     
    @@ -167,9 +165,9 @@ public void sampleRowKeysTest() throws Exception {
       public void sampleRowKeysExceptionTest() throws Exception {
         StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
         mockBigtable.addException(exception);
    -    TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +    String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
         SampleRowKeysRequest request =
    -        SampleRowKeysRequest.newBuilder().setTableName(tableName.toString()).build();
    +        SampleRowKeysRequest.newBuilder().setTableName(tableName).build();
     
         MockStreamObserver responseObserver = new MockStreamObserver<>();
     
    @@ -193,7 +191,7 @@ public void mutateRowTest() {
         MutateRowResponse expectedResponse = MutateRowResponse.newBuilder().build();
         mockBigtable.addResponse(expectedResponse);
     
    -    TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +    String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
         ByteString rowKey = ByteString.copyFromUtf8("122");
         List mutations = new ArrayList<>();
     
    @@ -204,7 +202,7 @@ public void mutateRowTest() {
         Assert.assertEquals(1, actualRequests.size());
         MutateRowRequest actualRequest = (MutateRowRequest) actualRequests.get(0);
     
    -    Assert.assertEquals(tableName, TableName.parse(actualRequest.getTableName()));
    +    Assert.assertEquals(tableName, actualRequest.getTableName());
         Assert.assertEquals(rowKey, actualRequest.getRowKey());
         Assert.assertEquals(mutations, actualRequest.getMutationsList());
         Assert.assertTrue(
    @@ -220,7 +218,7 @@ public void mutateRowExceptionTest() throws Exception {
         mockBigtable.addException(exception);
     
         try {
    -      TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +      String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
           ByteString rowKey = ByteString.copyFromUtf8("122");
           List mutations = new ArrayList<>();
     
    @@ -236,13 +234,10 @@ public void mutateRowExceptionTest() throws Exception {
       public void mutateRowsTest() throws Exception {
         MutateRowsResponse expectedResponse = MutateRowsResponse.newBuilder().build();
         mockBigtable.addResponse(expectedResponse);
    -    TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +    String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
         List entries = new ArrayList<>();
         MutateRowsRequest request =
    -        MutateRowsRequest.newBuilder()
    -            .setTableName(tableName.toString())
    -            .addAllEntries(entries)
    -            .build();
    +        MutateRowsRequest.newBuilder().setTableName(tableName).addAllEntries(entries).build();
     
         MockStreamObserver responseObserver = new MockStreamObserver<>();
     
    @@ -260,13 +255,10 @@ public void mutateRowsTest() throws Exception {
       public void mutateRowsExceptionTest() throws Exception {
         StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
         mockBigtable.addException(exception);
    -    TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +    String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
         List entries = new ArrayList<>();
         MutateRowsRequest request =
    -        MutateRowsRequest.newBuilder()
    -            .setTableName(tableName.toString())
    -            .addAllEntries(entries)
    -            .build();
    +        MutateRowsRequest.newBuilder().setTableName(tableName).addAllEntries(entries).build();
     
         MockStreamObserver responseObserver = new MockStreamObserver<>();
     
    @@ -292,7 +284,7 @@ public void checkAndMutateRowTest() {
             CheckAndMutateRowResponse.newBuilder().setPredicateMatched(predicateMatched).build();
         mockBigtable.addResponse(expectedResponse);
     
    -    TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +    String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
         ByteString rowKey = ByteString.copyFromUtf8("122");
         RowFilter predicateFilter = RowFilter.newBuilder().build();
         List trueMutations = new ArrayList<>();
    @@ -306,7 +298,7 @@ public void checkAndMutateRowTest() {
         Assert.assertEquals(1, actualRequests.size());
         CheckAndMutateRowRequest actualRequest = (CheckAndMutateRowRequest) actualRequests.get(0);
     
    -    Assert.assertEquals(tableName, TableName.parse(actualRequest.getTableName()));
    +    Assert.assertEquals(tableName, actualRequest.getTableName());
         Assert.assertEquals(rowKey, actualRequest.getRowKey());
         Assert.assertEquals(predicateFilter, actualRequest.getPredicateFilter());
         Assert.assertEquals(trueMutations, actualRequest.getTrueMutationsList());
    @@ -324,7 +316,7 @@ public void checkAndMutateRowExceptionTest() throws Exception {
         mockBigtable.addException(exception);
     
         try {
    -      TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +      String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
           ByteString rowKey = ByteString.copyFromUtf8("122");
           RowFilter predicateFilter = RowFilter.newBuilder().build();
           List trueMutations = new ArrayList<>();
    @@ -343,7 +335,7 @@ public void readModifyWriteRowTest() {
         ReadModifyWriteRowResponse expectedResponse = ReadModifyWriteRowResponse.newBuilder().build();
         mockBigtable.addResponse(expectedResponse);
     
    -    TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +    String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
         ByteString rowKey = ByteString.copyFromUtf8("122");
         List rules = new ArrayList<>();
     
    @@ -354,7 +346,7 @@ public void readModifyWriteRowTest() {
         Assert.assertEquals(1, actualRequests.size());
         ReadModifyWriteRowRequest actualRequest = (ReadModifyWriteRowRequest) actualRequests.get(0);
     
    -    Assert.assertEquals(tableName, TableName.parse(actualRequest.getTableName()));
    +    Assert.assertEquals(tableName, actualRequest.getTableName());
         Assert.assertEquals(rowKey, actualRequest.getRowKey());
         Assert.assertEquals(rules, actualRequest.getRulesList());
         Assert.assertTrue(
    @@ -370,7 +362,7 @@ public void readModifyWriteRowExceptionTest() throws Exception {
         mockBigtable.addException(exception);
     
         try {
    -      TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +      String tableName = NameUtil.formatTableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
           ByteString rowKey = ByteString.copyFromUtf8("122");
           List rules = new ArrayList<>();
     
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTest.java
    index be6cb2b965c5..be268b00b6fc 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTest.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTest.java
    @@ -27,15 +27,11 @@
     import com.google.api.gax.rpc.ResponseObserver;
     import com.google.api.gax.rpc.ServerStreamingCallable;
     import com.google.api.gax.rpc.UnaryCallable;
    -import com.google.bigtable.v2.ReadRowsRequest;
    -import com.google.bigtable.v2.RowSet;
    -import com.google.cloud.bigtable.data.v2.internal.RequestContext;
     import com.google.cloud.bigtable.data.v2.models.BulkMutation;
     import com.google.cloud.bigtable.data.v2.models.BulkMutationBatcher;
     import com.google.cloud.bigtable.data.v2.models.BulkMutationBatcher.BulkMutationFailure;
     import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation;
     import com.google.cloud.bigtable.data.v2.models.Filters.Filter;
    -import com.google.cloud.bigtable.data.v2.models.InstanceName;
     import com.google.cloud.bigtable.data.v2.models.KeyOffset;
     import com.google.cloud.bigtable.data.v2.models.Mutation;
     import com.google.cloud.bigtable.data.v2.models.Query;
    @@ -44,6 +40,7 @@
     import com.google.cloud.bigtable.data.v2.models.RowCell;
     import com.google.cloud.bigtable.data.v2.models.RowMutation;
     import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub;
    +import com.google.common.collect.ImmutableList;
     import com.google.protobuf.ByteString;
     import com.google.protobuf.Empty;
     import io.grpc.Status.Code;
    @@ -54,7 +51,6 @@
     import org.junit.Test;
     import org.junit.runner.RunWith;
     import org.mockito.Answers;
    -import org.mockito.ArgumentCaptor;
     import org.mockito.Mock;
     import org.mockito.Mockito;
     import org.mockito.invocation.InvocationOnMock;
    @@ -69,6 +65,7 @@ public class BigtableDataClientTest {
       @Mock(answer = Answers.RETURNS_DEEP_STUBS)
       private ServerStreamingCallable mockReadRowsCallable;
     
    +  @Mock private UnaryCallable mockReadRowCallable;
       @Mock private UnaryCallable> mockSampleRowKeysCallable;
       @Mock private UnaryCallable mockMutateRowCallable;
       @Mock private UnaryCallable mockCheckAndMutateRowCallable;
    @@ -82,6 +79,7 @@ public class BigtableDataClientTest {
       public void setUp() {
         bigtableDataClient = new BigtableDataClient(mockStub);
         Mockito.when(mockStub.readRowsCallable()).thenReturn(mockReadRowsCallable);
    +    Mockito.when(mockStub.readRowCallable()).thenReturn(mockReadRowCallable);
         Mockito.when(mockStub.sampleRowKeysCallable()).thenReturn(mockSampleRowKeysCallable);
         Mockito.when(mockStub.mutateRowCallable()).thenReturn(mockMutateRowCallable);
         Mockito.when(mockStub.bulkMutateRowsCallable()).thenReturn(mockBulkMutateRowsCallable);
    @@ -105,38 +103,15 @@ public void proxyReadRowsCallableTest() {
       @Test
       public void proxyReadRowAsyncTest() {
         bigtableDataClient.readRowAsync("fake-table", ByteString.copyFromUtf8("fake-row-key"));
    -
    -    ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(Query.class);
    -    Mockito.verify(mockReadRowsCallable.first()).futureCall(requestCaptor.capture());
    -
    -    RequestContext ctx =
    -        RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile");
    -    // NOTE: limit(1) is added by the mocked first() call, so it's not tested here
    -    assertThat(requestCaptor.getValue().toProto(ctx))
    -        .isEqualTo(
    -            ReadRowsRequest.newBuilder()
    -                .setTableName("projects/fake-project/instances/fake-instance/tables/fake-table")
    -                .setAppProfileId("fake-profile")
    -                .setRows(RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("fake-row-key")))
    -                .build());
    +    Mockito.verify(mockReadRowCallable)
    +        .futureCall(Query.create("fake-table").rowKey("fake-row-key"));
       }
     
       @Test
       public void proxyReadRowStrAsyncTest() {
         bigtableDataClient.readRowAsync("fake-table", "fake-row-key");
    -    ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(Query.class);
    -    Mockito.verify(mockReadRowsCallable.first()).futureCall(requestCaptor.capture());
    -
    -    RequestContext ctx =
    -        RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile");
    -    // NOTE: limit(1) is added by the mocked first() call, so it's not tested here
    -    assertThat(requestCaptor.getValue().toProto(ctx))
    -        .isEqualTo(
    -            ReadRowsRequest.newBuilder()
    -                .setTableName("projects/fake-project/instances/fake-instance/tables/fake-table")
    -                .setAppProfileId("fake-profile")
    -                .setRows(RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("fake-row-key")))
    -                .build());
    +    Mockito.verify(mockReadRowCallable)
    +        .futureCall(Query.create("fake-table").rowKey("fake-row-key"));
       }
     
       @Test
    @@ -148,25 +123,9 @@ public void readRowFilterAsyncTest() {
                 .filter(FILTERS.qualifier().regex("prefix.*"))
                 .filter(FILTERS.limit().cellsPerRow(10));
         bigtableDataClient.readRowAsync("fake-table", ByteString.copyFromUtf8("fake-row-key"), filter);
    -    ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(Query.class);
    -    Mockito.verify(mockReadRowsCallable.first()).futureCall(requestCaptor.capture());
    -
    -    RequestContext ctx =
    -        RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile");
    -    // NOTE: limit(1) is added by the mocked first() call, so it's not tested here
    -    assertThat(requestCaptor.getValue().toProto(ctx))
    -        .isEqualTo(
    -            ReadRowsRequest.newBuilder()
    -                .setTableName("projects/fake-project/instances/fake-instance/tables/fake-table")
    -                .setAppProfileId("fake-profile")
    -                .setRows(RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("fake-row-key")))
    -                .setFilter(
    -                    FILTERS
    -                        .chain()
    -                        .filter(FILTERS.qualifier().regex("prefix.*"))
    -                        .filter(FILTERS.limit().cellsPerRow(10))
    -                        .toProto())
    -                .build());
    +
    +    Mockito.verify(mockReadRowCallable)
    +        .futureCall(Query.create("fake-table").rowKey("fake-row-key").filter(filter));
       }
     
       @Test
    @@ -178,73 +137,34 @@ public void readRowFilterStrAsyncTest() {
                 .filter(FILTERS.qualifier().regex("prefix.*"))
                 .filter(FILTERS.limit().cellsPerRow(10));
         bigtableDataClient.readRowAsync("fake-table", "fake-row-key", filter);
    -    ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(Query.class);
    -    Mockito.verify(mockReadRowsCallable.first()).futureCall(requestCaptor.capture());
    -
    -    RequestContext ctx =
    -        RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile");
    -    // NOTE: limit(1) is added by the mocked first() call, so it's not tested here
    -    assertThat(requestCaptor.getValue().toProto(ctx))
    -        .isEqualTo(
    -            ReadRowsRequest.newBuilder()
    -                .setTableName("projects/fake-project/instances/fake-instance/tables/fake-table")
    -                .setAppProfileId("fake-profile")
    -                .setRows(RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("fake-row-key")))
    -                .setFilter(
    -                    FILTERS
    -                        .chain()
    -                        .filter(FILTERS.qualifier().regex("prefix.*"))
    -                        .filter(FILTERS.limit().cellsPerRow(10))
    -                        .toProto())
    -                .build());
    +
    +    Mockito.verify(mockReadRowCallable)
    +        .futureCall(Query.create("fake-table").rowKey("fake-row-key").filter(filter));
       }
     
       @Test
       public void readRowTest() {
    -    Mockito.when(mockReadRowsCallable.first().futureCall(any(Query.class)))
    -        .thenReturn(
    -            ApiFutures.immediateFuture(
    -                Row.create(
    -                    ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList())));
    -    bigtableDataClient.readRow("fake-table", ByteString.copyFromUtf8("fake-row-key"));
    -
    -    ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(Query.class);
    -    Mockito.verify(mockReadRowsCallable.first()).futureCall(requestCaptor.capture());
    -
    -    RequestContext ctx =
    -        RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile");
    -    // NOTE: limit(1) is added by the mocked first() call, so it's not tested here
    -    assertThat(requestCaptor.getValue().toProto(ctx))
    -        .isEqualTo(
    -            ReadRowsRequest.newBuilder()
    -                .setTableName("projects/fake-project/instances/fake-instance/tables/fake-table")
    -                .setAppProfileId("fake-profile")
    -                .setRows(RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("fake-row-key")))
    -                .build());
    +    Row expectedRow =
    +        Row.create(ByteString.copyFromUtf8("fake-row-key"), ImmutableList.of());
    +    Mockito.when(mockReadRowCallable.futureCall(Query.create("fake-table").rowKey("fake-row-key")))
    +        .thenReturn(ApiFutures.immediateFuture(expectedRow));
    +
    +    Row actualRow =
    +        bigtableDataClient.readRow("fake-table", ByteString.copyFromUtf8("fake-row-key"));
    +
    +    assertThat(actualRow).isEqualTo(expectedRow);
       }
     
       @Test
       public void readRowStrTest() {
    -    Mockito.when(mockReadRowsCallable.first().futureCall(any(Query.class)))
    -        .thenReturn(
    -            ApiFutures.immediateFuture(
    -                Row.create(
    -                    ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList())));
    -    bigtableDataClient.readRow("fake-table", "fake-row-key");
    -
    -    ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(Query.class);
    -    Mockito.verify(mockReadRowsCallable.first()).futureCall(requestCaptor.capture());
    -
    -    RequestContext ctx =
    -        RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile");
    -    // NOTE: limit(1) is added by the mocked first() call, so it's not tested here
    -    assertThat(requestCaptor.getValue().toProto(ctx))
    -        .isEqualTo(
    -            ReadRowsRequest.newBuilder()
    -                .setTableName("projects/fake-project/instances/fake-instance/tables/fake-table")
    -                .setAppProfileId("fake-profile")
    -                .setRows(RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("fake-row-key")))
    -                .build());
    +    Row expectedRow =
    +        Row.create(ByteString.copyFromUtf8("fake-row-key"), ImmutableList.of());
    +    Mockito.when(mockReadRowCallable.futureCall(Query.create("fake-table").rowKey("fake-row-key")))
    +        .thenReturn(ApiFutures.immediateFuture(expectedRow));
    +
    +    Row actualRow = bigtableDataClient.readRow("fake-table", "fake-row-key");
    +
    +    assertThat(actualRow).isEqualTo(expectedRow);
       }
     
       @Test
    @@ -255,32 +175,18 @@ public void readRowFilterTest() {
                 .chain()
                 .filter(FILTERS.qualifier().regex("prefix.*"))
                 .filter(FILTERS.limit().cellsPerRow(10));
    -    Mockito.when(mockReadRowsCallable.first().futureCall(any(Query.class)))
    -        .thenReturn(
    -            ApiFutures.immediateFuture(
    -                Row.create(
    -                    ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList())));
    -    bigtableDataClient.readRow("fake-table", ByteString.copyFromUtf8("fake-row-key"), filter);
    -
    -    ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(Query.class);
    -    Mockito.verify(mockReadRowsCallable.first()).futureCall(requestCaptor.capture());
    -
    -    RequestContext ctx =
    -        RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile");
    -    // NOTE: limit(1) is added by the mocked first() call, so it's not tested here
    -    assertThat(requestCaptor.getValue().toProto(ctx))
    -        .isEqualTo(
    -            ReadRowsRequest.newBuilder()
    -                .setTableName("projects/fake-project/instances/fake-instance/tables/fake-table")
    -                .setAppProfileId("fake-profile")
    -                .setRows(RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("fake-row-key")))
    -                .setFilter(
    -                    FILTERS
    -                        .chain()
    -                        .filter(FILTERS.qualifier().regex("prefix.*"))
    -                        .filter(FILTERS.limit().cellsPerRow(10))
    -                        .toProto())
    -                .build());
    +
    +    Row expectedRow =
    +        Row.create(ByteString.copyFromUtf8("fake-row-key"), ImmutableList.of());
    +    Mockito.when(
    +            mockReadRowCallable.futureCall(
    +                Query.create("fake-table").rowKey("fake-row-key").filter(filter)))
    +        .thenReturn(ApiFutures.immediateFuture(expectedRow));
    +
    +    Row actualRow =
    +        bigtableDataClient.readRow("fake-table", ByteString.copyFromUtf8("fake-row-key"), filter);
    +
    +    assertThat(actualRow).isEqualTo(expectedRow);
       }
     
       @Test
    @@ -291,32 +197,16 @@ public void readRowStrFilterTest() {
                 .chain()
                 .filter(FILTERS.qualifier().regex("prefix.*"))
                 .filter(FILTERS.limit().cellsPerRow(10));
    -    Mockito.when(mockReadRowsCallable.first().futureCall(any(Query.class)))
    -        .thenReturn(
    -            ApiFutures.immediateFuture(
    -                Row.create(
    -                    ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList())));
    -    bigtableDataClient.readRow("fake-table", "fake-row-key", filter);
    -
    -    ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(Query.class);
    -    Mockito.verify(mockReadRowsCallable.first()).futureCall(requestCaptor.capture());
    -
    -    RequestContext ctx =
    -        RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile");
    -    // NOTE: limit(1) is added by the mocked first() call, so it's not tested here
    -    assertThat(requestCaptor.getValue().toProto(ctx))
    -        .isEqualTo(
    -            ReadRowsRequest.newBuilder()
    -                .setTableName("projects/fake-project/instances/fake-instance/tables/fake-table")
    -                .setAppProfileId("fake-profile")
    -                .setRows(RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("fake-row-key")))
    -                .setFilter(
    -                    FILTERS
    -                        .chain()
    -                        .filter(FILTERS.qualifier().regex("prefix.*"))
    -                        .filter(FILTERS.limit().cellsPerRow(10))
    -                        .toProto())
    -                .build());
    +    Row expectedRow =
    +        Row.create(ByteString.copyFromUtf8("fake-row-key"), ImmutableList.of());
    +    Mockito.when(
    +            mockReadRowCallable.futureCall(
    +                Query.create("fake-table").rowKey("fake-row-key").filter(filter)))
    +        .thenReturn(ApiFutures.immediateFuture(expectedRow));
    +
    +    Row actualRow = bigtableDataClient.readRow("fake-table", "fake-row-key", filter);
    +
    +    assertThat(actualRow).isEqualTo(expectedRow);
       }
     
       @Test
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java
    index 21d1dd7b0c74..555676ffb1d1 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java
    @@ -23,6 +23,7 @@
     import com.google.common.collect.ImmutableSortedSet;
     import com.google.common.collect.Lists;
     import com.google.protobuf.ByteString;
    +import java.util.Arrays;
     import java.util.List;
     import java.util.SortedSet;
     import org.junit.Test;
    @@ -571,7 +572,7 @@ public void multipleRangeBoundTest() {
       // Helpers
       private static void verifySplit(RowSet input, SortedSet splits, RowSet... expected) {
         List actualWithNull = RowSetUtil.split(input, splits, true);
    -    assertThat(actualWithNull).containsExactly(expected).inOrder();
    +    assertThat(actualWithNull).containsExactlyElementsIn(Arrays.asList(expected)).inOrder();
     
         List actualNonnull = RowSetUtil.split(input, splits, false);
         List expectedNonnull = Lists.newArrayList();
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkMutationBatcherIT.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkMutationBatcherIT.java
    index b0d82d8d9388..97d42978ed9d 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkMutationBatcherIT.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkMutationBatcherIT.java
    @@ -39,7 +39,7 @@ public class BulkMutationBatcherIT {
       @Test
       public void test() throws Exception {
         BigtableDataClient client = testEnvRule.env().getDataClient();
    -    String tableId = testEnvRule.env().getTableName().getTable();
    +    String tableId = testEnvRule.env().getTableId();
         String family = testEnvRule.env().getFamilyId();
         String rowPrefix = testEnvRule.env().getRowPrefix();
     
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/CheckAndMutateIT.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/CheckAndMutateIT.java
    index 2b65517f232d..53f1a8997dd1 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/CheckAndMutateIT.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/CheckAndMutateIT.java
    @@ -37,7 +37,7 @@ public class CheckAndMutateIT {
     
       @Test
       public void test() throws Exception {
    -    String tableId = testEnvRule.env().getTableName().getTable();
    +    String tableId = testEnvRule.env().getTableId();
         String rowKey = testEnvRule.env().getRowPrefix();
         String familyId = testEnvRule.env().getFamilyId();
     
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MutateRowIT.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MutateRowIT.java
    index 4fdfef18e665..545028e14a58 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MutateRowIT.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MutateRowIT.java
    @@ -41,7 +41,7 @@ public void test() throws Exception {
             .env()
             .getDataClient()
             .mutateRowAsync(
    -            RowMutation.create(testEnvRule.env().getTableName().getTable(), rowKey)
    +            RowMutation.create(testEnvRule.env().getTableId(), rowKey)
                     .setCell(familyId, "q", "myVal")
                     .setCell(familyId, "q2", "myVal2")
                     .setCell(familyId, "q3", "myVal3"))
    @@ -51,8 +51,7 @@ public void test() throws Exception {
             .env()
             .getDataClient()
             .mutateRowAsync(
    -            RowMutation.create(testEnvRule.env().getTableName().getTable(), rowKey)
    -                .deleteCells(familyId, "q2"))
    +            RowMutation.create(testEnvRule.env().getTableId(), rowKey).deleteCells(familyId, "q2"))
             .get(1, TimeUnit.MINUTES);
     
         Row row =
    @@ -61,7 +60,7 @@ public void test() throws Exception {
                 .getDataClient()
                 .readRowsCallable()
                 .first()
    -            .call(Query.create(testEnvRule.env().getTableName().getTable()).rowKey(rowKey));
    +            .call(Query.create(testEnvRule.env().getTableId()).rowKey(rowKey));
     
         assertThat(row.getCells()).hasSize(2);
         assertThat(row.getCells().get(0).getValue()).isEqualTo(ByteString.copyFromUtf8("myVal"));
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadIT.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadIT.java
    index 76add465c838..d1f621a814ce 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadIT.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadIT.java
    @@ -59,7 +59,7 @@ public void setUp() {
       public void readEmpty() throws Throwable {
         String uniqueKey = prefix + "-readEmpty";
     
    -    Query query = Query.create(testEnvRule.env().getTableName().getTable()).rowKey(uniqueKey);
    +    Query query = Query.create(testEnvRule.env().getTableId()).rowKey(uniqueKey);
     
         // Sync
         ArrayList rows = Lists.newArrayList(testEnvRule.env().getDataClient().readRows(query));
    @@ -78,7 +78,7 @@ public void read() throws Throwable {
         List expectedRows = Lists.newArrayList();
         String uniqueKey = prefix + "-read";
     
    -    long timestampMicros = System.nanoTime() * 1_000;
    +    long timestampMicros = System.currentTimeMillis() * 1_000;
     
         for (int i = 0; i < numRows; i++) {
           testEnvRule
    @@ -86,7 +86,7 @@ public void read() throws Throwable {
               .getDataClient()
               .mutateRowCallable()
               .call(
    -              RowMutation.create(testEnvRule.env().getTableName().getTable(), uniqueKey + "-" + i)
    +              RowMutation.create(testEnvRule.env().getTableId(), uniqueKey + "-" + i)
                       .setCell(testEnvRule.env().getFamilyId(), "q", timestampMicros, "my-value"));
     
           expectedRows.add(
    @@ -101,10 +101,10 @@ public void read() throws Throwable {
                           ByteString.copyFromUtf8("my-value")))));
         }
     
    +    String tableId = testEnvRule.env().getTableId();
    +
         // Sync
    -    Query query =
    -        Query.create(testEnvRule.env().getTableName().getTable())
    -            .range(uniqueKey + "-0", uniqueKey + "-" + numRows);
    +    Query query = Query.create(tableId).range(uniqueKey + "-0", uniqueKey + "-" + numRows);
         ArrayList actualResults =
             Lists.newArrayList(testEnvRule.env().getDataClient().readRows(query));
     
    @@ -115,6 +115,16 @@ public void read() throws Throwable {
         testEnvRule.env().getDataClient().readRowsAsync(query, observer);
         observer.awaitCompletion();
         assertThat(observer.responses).containsExactlyElementsIn(expectedRows);
    +
    +    // Point Sync
    +    Row actualRow =
    +        testEnvRule.env().getDataClient().readRow(tableId, expectedRows.get(0).getKey());
    +    assertThat(actualRow).isEqualTo(expectedRows.get(0));
    +
    +    // Point Async
    +    ApiFuture actualRowFuture =
    +        testEnvRule.env().getDataClient().readRowAsync(tableId, expectedRows.get(0).getKey());
    +    assertThat(actualRowFuture.get()).isEqualTo(expectedRows.get(0));
       }
     
       @Test
    @@ -123,7 +133,7 @@ public void readSingleNonexistentAsyncCallback() throws Exception {
             testEnvRule
                 .env()
                 .getDataClient()
    -            .readRowAsync(testEnvRule.env().getTableName().getTable(), "somenonexistentkey");
    +            .readRowAsync(testEnvRule.env().getTableId(), "somenonexistentkey");
     
         final AtomicBoolean found = new AtomicBoolean();
         final CountDownLatch latch = new CountDownLatch(1);
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadModifyWriteIT.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadModifyWriteIT.java
    index 296f43e2ddbe..692027db5446 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadModifyWriteIT.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadModifyWriteIT.java
    @@ -35,7 +35,7 @@ public class ReadModifyWriteIT {
     
       @Test
       public void test() throws InterruptedException, ExecutionException, TimeoutException {
    -    String tableId = testEnvRule.env().getTableName().getTable();
    +    String tableId = testEnvRule.env().getTableId();
         String family = testEnvRule.env().getFamilyId();
         String rowKey = testEnvRule.env().getRowPrefix();
     
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/SampleRowsIT.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/SampleRowsIT.java
    index e77fcdd98a16..20bba81ea4ae 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/SampleRowsIT.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/SampleRowsIT.java
    @@ -47,15 +47,13 @@ public void test() throws InterruptedException, ExecutionException, TimeoutExcep
           ApiFuture future =
               client.mutateRowAsync(
                   RowMutation.create(
    -                      testEnvRule.env().getTableName().getTable(),
    -                      testEnvRule.env().getRowPrefix() + "-" + i)
    +                      testEnvRule.env().getTableId(), testEnvRule.env().getRowPrefix() + "-" + i)
                       .setCell(testEnvRule.env().getFamilyId(), "", "value"));
           futures.add(future);
         }
         ApiFutures.allAsList(futures).get(1, TimeUnit.MINUTES);
     
    -    ApiFuture> future =
    -        client.sampleRowKeysAsync(testEnvRule.env().getTableName().getTable());
    +    ApiFuture> future = client.sampleRowKeysAsync(testEnvRule.env().getTableId());
     
         List results = future.get(1, TimeUnit.MINUTES);
     
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/Emulator.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/Emulator.java
    index 738b330007c9..d8e7b00b0c4f 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/Emulator.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/Emulator.java
    @@ -23,7 +23,6 @@
     import com.google.bigtable.admin.v2.BigtableTableAdminGrpc.BigtableTableAdminBlockingStub;
     import com.google.cloud.bigtable.data.v2.BigtableDataClient;
     import com.google.cloud.bigtable.data.v2.BigtableDataSettings;
    -import com.google.cloud.bigtable.data.v2.models.InstanceName;
     import com.google.common.io.CharStreams;
     import io.grpc.ManagedChannel;
     import io.grpc.ManagedChannelBuilder;
    @@ -57,8 +56,8 @@ class Emulator {
       private BigtableTableAdminBlockingStub tableAdminClient;
       private BigtableDataClient dataClient;
     
    -  private static final InstanceName INSTANCE_NAME =
    -      InstanceName.of("fake-project", "fake-instance");
    +  private static final String PROJECT_ID = "fake-project";
    +  private static final String INSTANCE_ID = "fake-instance";
     
       // Use the gcloud installed emulator
       static Emulator createGCloud() {
    @@ -101,7 +100,10 @@ void start() throws Exception {
     
         dataClient =
             BigtableDataClient.create(
    -            configureClient(BigtableDataSettings.newBuilder().setInstanceName(INSTANCE_NAME))
    +            configureClient(
    +                    BigtableDataSettings.newBuilder()
    +                        .setProjectId(PROJECT_ID)
    +                        .setInstanceId(INSTANCE_ID))
                     .build());
     
         Runtime.getRuntime()
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/EmulatorEnv.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/EmulatorEnv.java
    index 3741246aabb2..c4ce28ee13e2 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/EmulatorEnv.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/EmulatorEnv.java
    @@ -18,13 +18,12 @@
     import com.google.bigtable.admin.v2.ColumnFamily;
     import com.google.bigtable.admin.v2.CreateTableRequest;
     import com.google.bigtable.admin.v2.Table;
    -import com.google.bigtable.v2.TableName;
     import com.google.cloud.bigtable.data.v2.BigtableDataClient;
    -import com.google.cloud.bigtable.data.v2.models.InstanceName;
    +import com.google.cloud.bigtable.data.v2.internal.NameUtil;
     
     public class EmulatorEnv implements TestEnv {
    -  private static final InstanceName INSTANCE_NAME =
    -      InstanceName.of("fake-project", "fake-instance");
    +  private static final String PROJECT_ID = "fake-project";
    +  private static final String INSTANCE_ID = "fake-instance";
       private static final String TABLE_ID = "default-table";
       private static final String FAMILY_ID = "cf";
     
    @@ -39,7 +38,7 @@ public void start() throws Exception {
             .getTableAdminClient()
             .createTable(
                 CreateTableRequest.newBuilder()
    -                .setParent(INSTANCE_NAME.toString())
    +                .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID))
                     .setTableId(TABLE_ID)
                     .setTable(
                         Table.newBuilder()
    @@ -53,8 +52,18 @@ public void stop() throws Exception {
       }
     
       @Override
    -  public TableName getTableName() {
    -    return TableName.of(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), TABLE_ID);
    +  public String getProjectId() {
    +    return PROJECT_ID;
    +  }
    +
    +  @Override
    +  public String getInstanceId() {
    +    return INSTANCE_ID;
    +  }
    +
    +  @Override
    +  public String getTableId() {
    +    return TABLE_ID;
       }
     
       @Override
    diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/ProdEnv.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/ProdEnv.java
    index f418c3c2d9f7..6f3f333350dd 100644
    --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/ProdEnv.java
    +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/ProdEnv.java
    @@ -18,9 +18,7 @@
     import com.google.api.core.ApiFuture;
     import com.google.api.core.ApiFutures;
     import com.google.api.gax.rpc.ServerStream;
    -import com.google.bigtable.v2.TableName;
     import com.google.cloud.bigtable.data.v2.BigtableDataClient;
    -import com.google.cloud.bigtable.data.v2.models.InstanceName;
     import com.google.cloud.bigtable.data.v2.models.Query;
     import com.google.cloud.bigtable.data.v2.models.Row;
     import com.google.cloud.bigtable.data.v2.models.RowMutation;
    @@ -43,30 +41,35 @@
      * 
*/ public class ProdEnv implements TestEnv { + private static final String PROJECT_PROPERTY_NAME = "bigtable.project"; + private static final String INSTANCE_PROPERTY_NAME = "bigtable.instance"; private static final String TABLE_PROPERTY_NAME = "bigtable.table"; - private TableName tableName; + private final String projectId; + private final String instanceId; + private final String tableId; private static final String FAMILY_ID = "cf"; private String rowPrefix; private BigtableDataClient dataClient; static ProdEnv fromSystemProperties() { - String tableNameStr = getRequiredProperty(TABLE_PROPERTY_NAME); - TableName tableName = TableName.parse(tableNameStr); - - return new ProdEnv(tableName); + return new ProdEnv( + getRequiredProperty(PROJECT_PROPERTY_NAME), + getRequiredProperty(INSTANCE_PROPERTY_NAME), + getRequiredProperty(TABLE_PROPERTY_NAME)); } - ProdEnv(TableName tableName) { - this.tableName = tableName; + public ProdEnv(String projectId, String instanceId, String tableId) { + this.projectId = projectId; + this.instanceId = instanceId; + this.tableId = tableId; + this.rowPrefix = UUID.randomUUID() + "-"; } @Override public void start() throws IOException { - rowPrefix = UUID.randomUUID() + "-"; - dataClient = - BigtableDataClient.create(InstanceName.of(tableName.getProject(), tableName.getInstance())); + dataClient = BigtableDataClient.create(projectId, instanceId); } @Override @@ -81,8 +84,18 @@ public BigtableDataClient getDataClient() { } @Override - public TableName getTableName() { - return tableName; + public String getProjectId() { + return projectId; + } + + @Override + public String getInstanceId() { + return instanceId; + } + + @Override + public String getTableId() { + return tableId; } @Override @@ -96,14 +109,13 @@ public String getRowPrefix() { } private void deleteRows() throws InterruptedException, ExecutionException, TimeoutException { - Query query = Query.create(tableName.getTable()).prefix(rowPrefix); + Query query = Query.create(tableId).prefix(rowPrefix); List> futures = Lists.newArrayList(); ServerStream rows = dataClient.readRows(query); for (Row row : rows) { ApiFuture future = - dataClient.mutateRowAsync( - RowMutation.create(tableName.getTable(), row.getKey()).deleteRow()); + dataClient.mutateRowAsync(RowMutation.create(tableId, row.getKey()).deleteRow()); futures.add(future); } diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/TestEnv.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/TestEnv.java index 00a81de596c2..69c70efc3189 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/TestEnv.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/TestEnv.java @@ -15,7 +15,6 @@ */ package com.google.cloud.bigtable.data.v2.it.env; -import com.google.bigtable.v2.TableName; import com.google.cloud.bigtable.data.v2.BigtableDataClient; /** @@ -30,7 +29,11 @@ public interface TestEnv { BigtableDataClient getDataClient(); - TableName getTableName(); + String getProjectId(); + + String getInstanceId(); + + String getTableId(); String getFamilyId(); diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/BulkMutationTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/BulkMutationTest.java index c6734c7b577c..ab203d25f269 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/BulkMutationTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/BulkMutationTest.java @@ -18,7 +18,7 @@ import static com.google.common.truth.Truth.assertThat; import com.google.bigtable.v2.MutateRowsRequest; -import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.protobuf.ByteString; import com.google.protobuf.TextFormat; @@ -34,12 +34,12 @@ @RunWith(JUnit4.class) public class BulkMutationTest { - private static final InstanceName INSTANCE_NAME = - InstanceName.of("fake-project", "fake-instance"); + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; private static final String TABLE_ID = "fake-table"; private static final String APP_PROFILE = "fake-profile"; private static final RequestContext REQUEST_CONTEXT = - RequestContext.create(INSTANCE_NAME, APP_PROFILE); + RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE); @Test public void test() throws ParseException { @@ -58,8 +58,7 @@ public void test() throws ParseException { MutateRowsRequest.Builder expected = MutateRowsRequest.newBuilder() - .setTableName( - TableName.format(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), TABLE_ID)) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAppProfileId(APP_PROFILE); TextFormat.merge( "entries {" diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutationTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutationTest.java index dfdad7548bf7..044e54f4ef3d 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutationTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutationTest.java @@ -20,7 +20,7 @@ import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.Mutation.DeleteFromColumn; import com.google.bigtable.v2.RowFilter; -import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.protobuf.ByteString; import java.io.ByteArrayInputStream; @@ -34,15 +34,13 @@ @RunWith(JUnit4.class) public class ConditionalRowMutationTest { - private static final InstanceName INSTANCE_NAME = - InstanceName.of("fake-project", "fake-instance"); - private static final TableName TABLE_NAME = - TableName.of(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), "fake-table"); - private static final String TABLE_ID = TABLE_NAME.getTable(); + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; private static final String APP_PROFILE_ID = "fake-profile"; private static final RequestContext REQUEST_CONTEXT = - RequestContext.create(INSTANCE_NAME, APP_PROFILE_ID); + RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); private static final ByteString TEST_KEY = ByteString.copyFromUtf8("fake-key"); @@ -58,7 +56,7 @@ public void toProtoTest() { assertThat(actualProto) .isEqualTo( CheckAndMutateRowRequest.newBuilder() - .setTableName(TABLE_NAME.toString()) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAppProfileId(APP_PROFILE_ID) .setRowKey(TEST_KEY) .build()); diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java index 85521bc2dbe9..780720fceea4 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java @@ -23,8 +23,8 @@ import com.google.bigtable.v2.RowFilter; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.RowSet; -import com.google.bigtable.v2.TableName; import com.google.cloud.bigtable.data.v2.internal.ByteStringComparator; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.common.collect.ImmutableList; @@ -44,21 +44,20 @@ @RunWith(JUnit4.class) public class QueryTest { - private static final InstanceName INSTANCE_NAME = - InstanceName.of("fake-project", "fake-instance"); - private static final TableName TABLE_NAME = - TableName.of("fake-project", "fake-instance", "fake-table"); + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; private static final String APP_PROFILE_ID = "fake-profile-id"; private RequestContext requestContext; @Before public void setUp() { - requestContext = RequestContext.create(INSTANCE_NAME, APP_PROFILE_ID); + requestContext = RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); } @Test public void requestContextTest() { - Query query = Query.create(TABLE_NAME.getTable()); + Query query = Query.create(TABLE_ID); ReadRowsRequest proto = query.toProto(requestContext); assertThat(proto).isEqualTo(expectedProtoBuilder().build()); @@ -67,7 +66,7 @@ public void requestContextTest() { @Test public void rowKeysTest() { Query query = - Query.create(TABLE_NAME.getTable()) + Query.create(TABLE_ID) .rowKey("simple-string") .rowKey(ByteString.copyFromUtf8("byte-string")); @@ -84,7 +83,7 @@ public void rowKeysTest() { @Test public void rowRangeTest() { Query query = - Query.create(TABLE_NAME.getTable()) + Query.create(TABLE_ID) .range("simple-begin", "simple-end") .range(ByteString.copyFromUtf8("byte-begin"), ByteString.copyFromUtf8("byte-end")) .range(ByteStringRange.create("range-begin", "range-end")); @@ -111,7 +110,7 @@ public void rowRangeTest() { @Test public void filterTest() { - Query query = Query.create(TABLE_NAME.getTable()).filter(FILTERS.key().regex(".*")); + Query query = Query.create(TABLE_ID).filter(FILTERS.key().regex(".*")); Builder expectedProto = expectedProtoBuilder() @@ -123,7 +122,7 @@ public void filterTest() { @Test public void limitTest() { - Query query = Query.create(TABLE_NAME.getTable()).limit(10); + Query query = Query.create(TABLE_ID).limit(10); Builder expectedProto = expectedProtoBuilder().setRowsLimit(10); @@ -133,7 +132,7 @@ public void limitTest() { @Test public void serializationTest() throws IOException, ClassNotFoundException { - Query expected = Query.create(TABLE_NAME.getTable()).filter(FILTERS.key().regex(".*")); + Query expected = Query.create(TABLE_ID).filter(FILTERS.key().regex(".*")); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); @@ -148,7 +147,7 @@ public void serializationTest() throws IOException, ClassNotFoundException { @Test public void shardTestSplitPoints() { - Query query = Query.create(TABLE_NAME.getTable()).range("a", "z"); + Query query = Query.create(TABLE_ID).range("a", "z"); SortedSet splitPoints = ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE) @@ -161,7 +160,7 @@ public void shardTestSplitPoints() { assertThat(subQueries.get(0).toProto(requestContext)) .isEqualTo( ReadRowsRequest.newBuilder() - .setTableName(TABLE_NAME.toString()) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAppProfileId(APP_PROFILE_ID) .setRows( RowSet.newBuilder() @@ -173,7 +172,7 @@ public void shardTestSplitPoints() { assertThat(subQueries.get(1).toProto(requestContext)) .isEqualTo( ReadRowsRequest.newBuilder() - .setTableName(TABLE_NAME.toString()) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAppProfileId(APP_PROFILE_ID) .setRows( RowSet.newBuilder() @@ -186,7 +185,7 @@ public void shardTestSplitPoints() { @Test public void shardTestKeyOffsets() { - Query query = Query.create(TABLE_NAME.getTable()).range("a", "z"); + Query query = Query.create(TABLE_ID).range("a", "z"); List keyOffsets = ImmutableList.of( @@ -199,7 +198,7 @@ public void shardTestKeyOffsets() { assertThat(subQueries.get(0).toProto(requestContext)) .isEqualTo( ReadRowsRequest.newBuilder() - .setTableName(TABLE_NAME.toString()) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAppProfileId(APP_PROFILE_ID) .setRows( RowSet.newBuilder() @@ -211,7 +210,7 @@ public void shardTestKeyOffsets() { assertThat(subQueries.get(1).toProto(requestContext)) .isEqualTo( ReadRowsRequest.newBuilder() - .setTableName(TABLE_NAME.toString()) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAppProfileId(APP_PROFILE_ID) .setRows( RowSet.newBuilder() @@ -224,7 +223,7 @@ public void shardTestKeyOffsets() { private static ReadRowsRequest.Builder expectedProtoBuilder() { return ReadRowsRequest.newBuilder() - .setTableName(TABLE_NAME.toString()) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAppProfileId(APP_PROFILE_ID); } } diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRowTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRowTest.java index 7d6d8563d093..a318a61f0ec9 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRowTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRowTest.java @@ -19,7 +19,7 @@ import com.google.bigtable.v2.ReadModifyWriteRowRequest; import com.google.bigtable.v2.ReadModifyWriteRule; -import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.protobuf.ByteString; import java.io.ByteArrayInputStream; @@ -30,18 +30,17 @@ import org.junit.Test; public class ReadModifyWriteRowTest { - private static final InstanceName INSTANCE_NAME = - InstanceName.of("fake-project", "fake-instance"); + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; private static final String APP_PROFILE_ID = "fake-profile"; private static final RequestContext REQUEST_CONTEXT = - RequestContext.create(INSTANCE_NAME, APP_PROFILE_ID); - private static final TableName TABLE_NAME = - TableName.of(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), "fake-table"); + RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); @Test public void testAppend() { ReadModifyWriteRow mutation = - ReadModifyWriteRow.create(TABLE_NAME.getTable(), "fake-key") + ReadModifyWriteRow.create(TABLE_ID, "fake-key") .append( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), @@ -52,7 +51,7 @@ public void testAppend() { ReadModifyWriteRowRequest expected = ReadModifyWriteRowRequest.newBuilder() - .setTableName(TABLE_NAME.toString()) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAppProfileId(APP_PROFILE_ID) .setRowKey(ByteString.copyFromUtf8("fake-key")) .addRules( @@ -72,7 +71,7 @@ public void testAppend() { @Test public void testIncrement() { ReadModifyWriteRow mutation = - ReadModifyWriteRow.create(TABLE_NAME.getTable(), "fake-key") + ReadModifyWriteRow.create(TABLE_ID, "fake-key") .increment("fake-family", ByteString.copyFromUtf8("fake-qualifier"), 1) .increment("fake-family", "fake-qualifier-str", 2); @@ -81,7 +80,7 @@ public void testIncrement() { assertThat(actualProto) .isEqualTo( ReadModifyWriteRowRequest.newBuilder() - .setTableName(TABLE_NAME.toString()) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAppProfileId(APP_PROFILE_ID) .setRowKey(ByteString.copyFromUtf8("fake-key")) .addRules( @@ -100,7 +99,7 @@ public void testIncrement() { @Test public void serializationTest() throws IOException, ClassNotFoundException { ReadModifyWriteRow expected = - ReadModifyWriteRow.create(TABLE_NAME.getTable(), "fake-key") + ReadModifyWriteRow.create(TABLE_ID, "fake-key") .increment("fake-family", ByteString.copyFromUtf8("fake-qualifier"), 1) .append("fake-family", "a", "b"); diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowMutationTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowMutationTest.java index d38ef5bffe8b..1698449401b7 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowMutationTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowMutationTest.java @@ -19,7 +19,7 @@ import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowsRequest; -import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.protobuf.ByteString; import java.io.ByteArrayInputStream; @@ -33,11 +33,12 @@ @RunWith(JUnit4.class) public class RowMutationTest { - private static final InstanceName INSTANCE_NAME = - InstanceName.of("fake-project", "fake-instance"); + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; private static final String APP_PROFILE_ID = "fake-profile"; private static final RequestContext REQUEST_CONTEXT = - RequestContext.create(INSTANCE_NAME, APP_PROFILE_ID); + RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); @Test public void toProtoTest() { @@ -52,9 +53,7 @@ public void toProtoTest() { com.google.common.collect.Range.closed(timestampMin, System.currentTimeMillis() * 1_000); assertThat(actualRowMutation.getTableName()) - .isEqualTo( - TableName.of(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), "fake-table") - .toString()); + .isEqualTo(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, "fake-table")); assertThat(actualRowMutation.getAppProfileId()).isEqualTo(APP_PROFILE_ID); assertThat(actualRowMutation.getMutationsList()).hasSize(1); assertThat(actualRowMutation.getMutations(0).getSetCell().getValue()) @@ -77,9 +76,7 @@ public void toBulkProtoTest() { com.google.common.collect.Range.closed(timestampMin, System.currentTimeMillis() * 1_000); assertThat(actualRowMutation.getTableName()) - .isEqualTo( - TableName.of(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), "fake-table") - .toString()); + .isEqualTo(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)); assertThat(actualRowMutation.getAppProfileId()).isEqualTo(APP_PROFILE_ID); assertThat(actualRowMutation.getEntriesList()).hasSize(1); assertThat(actualRowMutation.getEntries(0).getMutationsList()).hasSize(1); diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallableTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallableTest.java index cb9cfb2bf96d..5441f1d1f8ec 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallableTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallableTest.java @@ -26,9 +26,9 @@ import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; import com.google.bigtable.v2.Mutation.DeleteFromRow; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.Mutation; import com.google.protobuf.ByteString; import io.grpc.Status.Code; @@ -41,8 +41,9 @@ @RunWith(JUnit4.class) public class CheckAndMutateRowCallableTest { + private final RequestContext requestContext = - RequestContext.create(InstanceName.of("my-project", "my-instance"), "my-app-profile"); + RequestContext.create("my-project", "my-instance", "my-app-profile"); private FakeCallable inner; private CheckAndMutateRowCallable callable; @@ -60,7 +61,9 @@ public void requestIsCorrect() { assertThat(inner.request) .isEqualTo( CheckAndMutateRowRequest.newBuilder() - .setTableName(requestContext.getInstanceName() + "/tables/my-table") + .setTableName( + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), "my-table")) .setRowKey(ByteString.copyFromUtf8("row-key")) .setAppProfileId(requestContext.getAppProfileId()) .addTrueMutations( diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java index 5e1698828ad2..017eb2ab0312 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java @@ -27,7 +27,6 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.WatchdogProvider; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; @@ -59,7 +58,8 @@ public void instanceNameIsRequiredTest() { @Test public void settingsAreNotLostTest() { - InstanceName instanceName = InstanceName.of("my-project", "my-instance"); + String projectId = "my-project"; + String instanceId = "my-instance"; String appProfileId = "my-app-profile-id"; String endpoint = "some.other.host:123"; CredentialsProvider credentialsProvider = Mockito.mock(CredentialsProvider.class); @@ -68,7 +68,8 @@ public void settingsAreNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() - .setInstanceName(instanceName) + .setProjectId(projectId) + .setInstanceId(instanceId) .setAppProfileId(appProfileId) .setEndpoint(endpoint) .setCredentialsProvider(credentialsProvider) @@ -77,7 +78,8 @@ public void settingsAreNotLostTest() { verifyBuilder( builder, - instanceName, + projectId, + instanceId, appProfileId, endpoint, credentialsProvider, @@ -85,7 +87,8 @@ public void settingsAreNotLostTest() { watchdogInterval); verifySettings( builder.build(), - instanceName, + projectId, + instanceId, appProfileId, endpoint, credentialsProvider, @@ -93,7 +96,8 @@ public void settingsAreNotLostTest() { watchdogInterval); verifyBuilder( builder.build().toBuilder(), - instanceName, + projectId, + instanceId, appProfileId, endpoint, credentialsProvider, @@ -103,13 +107,15 @@ public void settingsAreNotLostTest() { private void verifyBuilder( EnhancedBigtableStubSettings.Builder builder, - InstanceName instanceName, + String projectId, + String instanceId, String appProfileId, String endpoint, CredentialsProvider credentialsProvider, WatchdogProvider watchdogProvider, Duration watchdogInterval) { - assertThat(builder.getInstanceName()).isEqualTo(instanceName); + assertThat(builder.getProjectId()).isEqualTo(projectId); + assertThat(builder.getInstanceId()).isEqualTo(instanceId); assertThat(builder.getAppProfileId()).isEqualTo(appProfileId); assertThat(builder.getEndpoint()).isEqualTo(endpoint); assertThat(builder.getCredentialsProvider()).isEqualTo(credentialsProvider); @@ -119,13 +125,15 @@ private void verifyBuilder( private void verifySettings( EnhancedBigtableStubSettings settings, - InstanceName instanceName, + String projectId, + String instanceId, String appProfileId, String endpoint, CredentialsProvider credentialsProvider, WatchdogProvider watchdogProvider, Duration watchdogInterval) { - assertThat(settings.getInstanceName()).isEqualTo(instanceName); + assertThat(settings.getProjectId()).isEqualTo(projectId); + assertThat(settings.getInstanceId()).isEqualTo(instanceId); assertThat(settings.getAppProfileId()).isEqualTo(appProfileId); assertThat(settings.getEndpoint()).isEqualTo(endpoint); assertThat(settings.getCredentialsProvider()).isEqualTo(credentialsProvider); @@ -135,10 +143,13 @@ private void verifySettings( @Test public void multipleChannelsByDefaultTest() { - InstanceName dummyInstanceName = InstanceName.of("my-project", "my-instance"); + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder().setInstanceName(dummyInstanceName); + EnhancedBigtableStubSettings.newBuilder() + .setProjectId(dummyProjectId) + .setInstanceId(dummyInstanceId); InstantiatingGrpcChannelProvider provider = (InstantiatingGrpcChannelProvider) builder.getTransportChannelProvider(); @@ -148,10 +159,13 @@ public void multipleChannelsByDefaultTest() { @Test public void readRowsIsNotLostTest() { - InstanceName dummyInstanceName = InstanceName.of("my-project", "my-instance"); + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder().setInstanceName(dummyInstanceName); + EnhancedBigtableStubSettings.newBuilder() + .setProjectId(dummyProjectId) + .setInstanceId(dummyInstanceId); RetrySettings retrySettings = RetrySettings.newBuilder() @@ -170,6 +184,9 @@ public void readRowsIsNotLostTest() { .setRetrySettings(retrySettings) .build(); + // Point readRow settings must match streaming settings + builder.readRowSettings().setRetryableCodes(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.readRowsSettings().getIdleTimeout()).isEqualTo(Duration.ofMinutes(5)); assertThat(builder.readRowsSettings().getRetryableCodes()) .containsAllOf(Code.ABORTED, Code.DEADLINE_EXCEEDED); @@ -197,12 +214,93 @@ public void readRowsHasSaneDefaultsTest() { verifyRetrySettingAreSane(builder.getRetryableCodes(), builder.getRetrySettings()); } + @Test + public void readRowIsNotLostTest() { + EnhancedBigtableStubSettings.Builder builder = + EnhancedBigtableStubSettings.newBuilder() + .setProjectId("my-project") + .setInstanceId("my-instance"); + + RetrySettings retrySettings = + RetrySettings.newBuilder() + .setMaxAttempts(10) + .setTotalTimeout(Duration.ofHours(1)) + .setInitialRpcTimeout(Duration.ofSeconds(10)) + .setRpcTimeoutMultiplier(1) + .setMaxRpcTimeout(Duration.ofSeconds(10)) + .setJittered(true) + .build(); + + builder + .readRowSettings() + .setRetryableCodes(Code.ABORTED, Code.DEADLINE_EXCEEDED) + .setRetrySettings(retrySettings) + .build(); + + // Streaming readRows settings must match point lookup settings. + builder.readRowsSettings().setRetryableCodes(Code.ABORTED, Code.DEADLINE_EXCEEDED); + + assertThat(builder.readRowSettings().getRetryableCodes()) + .containsAllOf(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.readRowSettings().getRetrySettings()).isEqualTo(retrySettings); + + assertThat(builder.build().readRowSettings().getRetryableCodes()) + .containsAllOf(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.build().readRowSettings().getRetrySettings()).isEqualTo(retrySettings); + + assertThat(builder.build().toBuilder().readRowSettings().getRetryableCodes()) + .containsAllOf(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.build().toBuilder().readRowSettings().getRetrySettings()) + .isEqualTo(retrySettings); + } + + @Test + public void readRowHasSaneDefaultsTest() { + UnaryCallSettings.Builder builder = + EnhancedBigtableStubSettings.newBuilder().readRowSettings(); + + verifyRetrySettingAreSane(builder.getRetryableCodes(), builder.getRetrySettings()); + } + + @Test + public void readRowRetryCodesMustMatch() { + EnhancedBigtableStubSettings.Builder builder = + EnhancedBigtableStubSettings.newBuilder() + .setProjectId("my-project") + .setInstanceId("my-instance"); + + builder.readRowsSettings().setRetryableCodes(Code.DEADLINE_EXCEEDED); + + builder.readRowSettings().setRetryableCodes(Code.ABORTED); + + Exception actualError = null; + try { + builder.build(); + } catch (Exception e) { + actualError = e; + } + assertThat(actualError).isNotNull(); + + builder.readRowSettings().setRetryableCodes(Code.DEADLINE_EXCEEDED); + + actualError = null; + try { + builder.build(); + } catch (Exception e) { + actualError = e; + } + assertThat(actualError).isNull(); + } + @Test public void sampleRowKeysSettingsAreNotLostTest() { - InstanceName dummyInstanceName = InstanceName.of("my-project", "my-instance"); + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder().setInstanceName(dummyInstanceName); + EnhancedBigtableStubSettings.newBuilder() + .setProjectId(dummyProjectId) + .setInstanceId(dummyInstanceId); RetrySettings retrySettings = RetrySettings.newBuilder() @@ -243,10 +341,13 @@ public void sampleRowKeysHasSaneDefaultsTest() { @Test public void mutateRowSettingsAreNotLostTest() { - InstanceName dummyInstanceName = InstanceName.of("my-project", "my-instance"); + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder().setInstanceName(dummyInstanceName); + EnhancedBigtableStubSettings.newBuilder() + .setProjectId(dummyProjectId) + .setInstanceId(dummyInstanceId); RetrySettings retrySettings = RetrySettings.newBuilder() @@ -287,10 +388,13 @@ public void mutateRowHasSaneDefaultsTest() { @Test public void bulkMutateRowsSettingsAreNotLostTest() { - InstanceName dummyInstanceName = InstanceName.of("my-project", "my-instance"); + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder().setInstanceName(dummyInstanceName); + EnhancedBigtableStubSettings.newBuilder() + .setProjectId(dummyProjectId) + .setInstanceId(dummyInstanceId); RetrySettings retrySettings = RetrySettings.newBuilder() @@ -355,10 +459,13 @@ public void mutateRowsHasSaneDefaultsTest() { @Test public void checkAndMutateRowSettingsAreNotLostTest() { - InstanceName dummyInstanceName = InstanceName.of("my-project", "my-instance"); + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder().setInstanceName(dummyInstanceName); + EnhancedBigtableStubSettings.newBuilder() + .setProjectId(dummyProjectId) + .setInstanceId(dummyInstanceId); RetrySettings retrySettings = RetrySettings.newBuilder().build(); builder diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallableTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallableTest.java index aac06f077486..2b688292576b 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallableTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallableTest.java @@ -21,7 +21,6 @@ import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.common.truth.Truth; import org.junit.Before; @@ -35,7 +34,7 @@ public class MutateRowCallableTest { private static final RequestContext REQUEST_CONTEXT = - RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile"); + RequestContext.create("fake-project", "fake-instance", "fake-profile"); private UnaryCallable innerCallable; private ArgumentCaptor innerMutation; private SettableApiFuture innerResult; diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallableTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallableTest.java index a91325de3237..76dabd159303 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallableTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallableTest.java @@ -29,8 +29,8 @@ import com.google.bigtable.v2.ReadModifyWriteRowRequest; import com.google.bigtable.v2.ReadModifyWriteRowResponse; import com.google.bigtable.v2.ReadModifyWriteRule; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowCell; @@ -47,7 +47,7 @@ @RunWith(JUnit4.class) public class ReadModifyWriteRowCallableTest { private final RequestContext requestContext = - RequestContext.create(InstanceName.of("my-project", "my-instance"), "my-app-profile"); + RequestContext.create("fake-project", "fake-instance", "fake-profile"); private FakeCallable inner; private ReadModifyWriteRowCallable callable; @@ -65,7 +65,9 @@ public void requestIsCorrect() { assertThat(inner.request) .isEqualTo( ReadModifyWriteRowRequest.newBuilder() - .setTableName(requestContext.getInstanceName() + "/tables/my-table") + .setTableName( + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), "my-table")) .setAppProfileId(requestContext.getAppProfileId()) .setRowKey(ByteString.copyFromUtf8("my-key")) .addRules( diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ResourceHeaderTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ResourceHeaderTest.java index 275e801e4e5f..8acb7cde9b17 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ResourceHeaderTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ResourceHeaderTest.java @@ -21,13 +21,12 @@ import com.google.api.gax.grpc.testing.InProcessServer; import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.bigtable.v2.BigtableGrpc; -import com.google.bigtable.v2.TableName; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.models.BulkMutationBatcher; import com.google.cloud.bigtable.data.v2.models.BulkMutationBatcher.BulkMutationFailure; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.Mutation; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; @@ -42,11 +41,12 @@ @RunWith(JUnit4.class) public class ResourceHeaderTest { + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; private static final String NAME = "resource-header-test:123"; - private static final TableName TABLE_NAME = - TableName.of("fake-project", "fake-instance", "fake-table"); private static final Pattern EXPECTED_HEADER_PATTERN = - Pattern.compile(".*" + TABLE_NAME.toString() + ".*"); + Pattern.compile(".*" + NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID) + ".*"); private static final String HEADER_NAME = "x-goog-request-params"; private InProcessServer server; @@ -61,7 +61,8 @@ public void setUp() throws Exception { BigtableDataSettings.Builder settings = BigtableDataSettings.newBuilder() - .setInstanceName(InstanceName.of(TABLE_NAME.getProject(), TABLE_NAME.getInstance())) + .setProjectId(PROJECT_ID) + .setInstanceId(INSTANCE_ID) .setTransportChannelProvider(channelProvider) .setCredentialsProvider(NoCredentialsProvider.create()); @@ -88,26 +89,26 @@ public void tearDown() throws Exception { @Test public void readRowsTest() { - client.readRows(Query.create(TABLE_NAME.getTable())); + client.readRows(Query.create(TABLE_ID)); verifyHeaderSent(); } @Test public void sampleRowKeysTest() { - client.sampleRowKeysAsync(TABLE_NAME.getTable()); + client.sampleRowKeysAsync(TABLE_ID); verifyHeaderSent(); } @Test public void mutateRowTest() { - client.mutateRowAsync(RowMutation.create(TABLE_NAME.getTable(), "fake-key").deleteRow()); + client.mutateRowAsync(RowMutation.create(TABLE_ID, "fake-key").deleteRow()); verifyHeaderSent(); } @Test public void mutateRowsTest() throws TimeoutException, InterruptedException { try (BulkMutationBatcher batcher = client.newBulkMutationBatcher()) { - batcher.add(RowMutation.create(TABLE_NAME.getTable(), "fake-key").deleteRow()); + batcher.add(RowMutation.create(TABLE_ID, "fake-key").deleteRow()); } catch (BulkMutationFailure e) { // Ignore the errors: none of the methods are actually implemented } @@ -117,15 +118,14 @@ public void mutateRowsTest() throws TimeoutException, InterruptedException { @Test public void checkAndMutateRowTest() { client.checkAndMutateRowAsync( - ConditionalRowMutation.create(TABLE_NAME.getTable(), "fake-key") - .then(Mutation.create().deleteRow())); + ConditionalRowMutation.create(TABLE_ID, "fake-key").then(Mutation.create().deleteRow())); verifyHeaderSent(); } @Test public void readModifyWriteTest() { client.readModifyWriteRowAsync( - ReadModifyWriteRow.create(TABLE_NAME.getTable(), "fake-key").increment("cf", "q", 1)); + ReadModifyWriteRow.create(TABLE_ID, "fake-key").increment("cf", "q", 1)); verifyHeaderSent(); } diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableTest.java index 1482eee96fff..40a30d326393 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableTest.java @@ -25,8 +25,8 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.bigtable.v2.SampleRowKeysRequest; import com.google.bigtable.v2.SampleRowKeysResponse; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; @@ -41,8 +41,9 @@ @RunWith(JUnit4.class) public class SampleRowKeysCallableTest { + private final RequestContext requestContext = - RequestContext.create(InstanceName.of("my-project", "my-instance"), "my-app-profile"); + RequestContext.create("my-project", "my-instance", "my-profile"); private FakeCallable inner; private SampleRowKeysCallable callable; @@ -59,7 +60,9 @@ public void requestIsCorrect() { assertThat(inner.request) .isEqualTo( SampleRowKeysRequest.newBuilder() - .setTableName(requestContext.getInstanceName() + "/tables/my-table") + .setTableName( + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), "my-table")) .setAppProfileId(requestContext.getAppProfileId()) .build()); } diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/BulkMutateRowsRetryTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/BulkMutateRowsRetryTest.java index ea3aae3ba214..10528d333d27 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/BulkMutateRowsRetryTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/BulkMutateRowsRetryTest.java @@ -30,11 +30,9 @@ import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsRequest.Entry; import com.google.bigtable.v2.MutateRowsResponse; -import com.google.bigtable.v2.TableName; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; import com.google.cloud.bigtable.data.v2.models.BulkMutationBatcher; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.common.collect.Maps; import com.google.common.collect.Queues; @@ -56,11 +54,9 @@ @RunWith(MockitoJUnitRunner.class) public class BulkMutateRowsRetryTest { - private static final InstanceName INSTANCE_NAME = - InstanceName.of("fake-project", "fake-instance"); - private static final TableName TABLE_NAME = - TableName.of(INSTANCE_NAME.getProject(), INSTANCE_NAME.getInstance(), "fake-table"); - private static final String TABLE_ID = TABLE_NAME.getTable(); + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; private static final int MAX_ATTEMPTS = 5; private static final long FLUSH_COUNT = 10; @@ -78,7 +74,8 @@ public void setUp() throws Exception { BigtableDataSettings.Builder settings = BigtableDataSettings.newBuilder() - .setInstanceName(INSTANCE_NAME) + .setProjectId(PROJECT_ID) + .setInstanceId(INSTANCE_ID) .setCredentialsProvider(NoCredentialsProvider.create()) .setTransportChannelProvider( FixedTransportChannelProvider.create( diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsBatchingDescriptorTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsBatchingDescriptorTest.java index 67d4ebf0a0a6..3178e82894d1 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsBatchingDescriptorTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsBatchingDescriptorTest.java @@ -30,7 +30,7 @@ import com.google.bigtable.v2.MutateRowsRequest.Entry.Builder; import com.google.bigtable.v2.Mutation; import com.google.bigtable.v2.Mutation.SetCell; -import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.models.MutateRowsException; import com.google.cloud.bigtable.data.v2.models.MutateRowsException.FailedMutation; import com.google.common.collect.ImmutableList; @@ -48,8 +48,9 @@ @RunWith(JUnit4.class) public class MutateRowsBatchingDescriptorTest { - private static final TableName TABLE_NAME = - TableName.of("fake-project", "fake-instance", "fake-table"); + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; private MutateRowsBatchingDescriptor descriptor; @@ -74,13 +75,12 @@ public void countElementsTest() { @Test public void partitionKeyTest() { - TableName myTableName = TableName.of("my-project", "my-instance", "my-table"); + String myTableName = NameUtil.formatTableName("my-project", "my-instance", "my-table"); - MutateRowsRequest request = - createRequest(2).toBuilder().setTableName(myTableName.toString()).build(); + MutateRowsRequest request = createRequest(2).toBuilder().setTableName(myTableName).build(); PartitionKey actual = descriptor.getBatchPartitionKey(request); - assertThat(actual).isEqualTo(new PartitionKey(myTableName.toString())); + assertThat(actual).isEqualTo(new PartitionKey(myTableName)); } @Test @@ -92,7 +92,7 @@ public void requestBuilderTest() { for (Entry entry : expected.getEntriesList()) { MutateRowsRequest singleReq = MutateRowsRequest.newBuilder() - .setTableName(TABLE_NAME.toString()) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .addEntries(entry) .build(); @@ -205,7 +205,8 @@ public void splitResponseOkTest() private static MutateRowsRequest createRequest(int count) { MutateRowsRequest.Builder request = - MutateRowsRequest.newBuilder().setTableName(TABLE_NAME.toString()); + MutateRowsRequest.newBuilder() + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)); for (int i = 0; i < count; i++) { Builder entry = diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java index 17cdf380e701..e7fb90941ec0 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java @@ -19,7 +19,6 @@ import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.common.truth.Truth; @@ -33,7 +32,7 @@ @RunWith(JUnit4.class) public class ReadRowsFirstCallableTest { private static final RequestContext REQUEST_CONTEXT = - RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile");; + RequestContext.create("fake-project", "fake-instance", "fake-profile"); private UnaryCallable innerCallable; private ArgumentCaptor innerQuery; private SettableApiFuture innerResult; diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java index 5188405578ed..12c01275cfe1 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java @@ -25,10 +25,9 @@ import com.google.bigtable.v2.ReadRowsResponse; import com.google.bigtable.v2.ReadRowsResponse.CellChunk; import com.google.bigtable.v2.RowRange; -import com.google.bigtable.v2.TableName; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; -import com.google.cloud.bigtable.data.v2.models.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.data.v2.models.Row; @@ -54,10 +53,9 @@ @RunWith(MockitoJUnitRunner.class) public class ReadRowsRetryTest { - private static final InstanceName instanceName = InstanceName.of("fake-project", "fake-instance"); - - private static final TableName tableName = - TableName.of(instanceName.getProject(), instanceName.getInstance(), "fake-table"); + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; @Rule public GrpcServerRule serverRule = new GrpcServerRule(); private TestBigtableService service; @@ -70,7 +68,8 @@ public void setUp() throws IOException { BigtableDataSettings settings = BigtableDataSettings.newBuilder() - .setInstanceName(instanceName) + .setProjectId(PROJECT_ID) + .setInstanceId(INSTANCE_ID) .setCredentialsProvider(NoCredentialsProvider.create()) .setTransportChannelProvider( FixedTransportChannelProvider.create( @@ -93,8 +92,7 @@ public void happyPathTest() { .expectRequest(Range.closedOpen("r1", "r3")) .respondWith("k1", "r1", "r2")); - List actualResults = - getResults(Query.create(tableName.getTable()).rowKey("k1").range("r1", "r3")); + List actualResults = getResults(Query.create(TABLE_ID).rowKey("k1").range("r1", "r3")); Truth.assertThat(actualResults).containsExactly("k1", "r1", "r2").inOrder(); } @@ -111,8 +109,7 @@ public void immediateRetryTest() { .expectRequest(Range.closedOpen("r1", "r3")) .respondWith("k1", "r1", "r2")); - List actualResults = - getResults(Query.create(tableName.getTable()).rowKey("k1").range("r1", "r3")); + List actualResults = getResults(Query.create(TABLE_ID).rowKey("k1").range("r1", "r3")); Truth.assertThat(actualResults).containsExactly("k1", "r1", "r2").inOrder(); } @@ -135,7 +132,7 @@ public void multipleRetryTest() { service.expectations.add( RpcExpectation.create().expectRequest(Range.open("r7", "r9")).respondWith("r8")); - List actualResults = getResults(Query.create(tableName.getTable()).range("r1", "r9")); + List actualResults = getResults(Query.create(TABLE_ID).range("r1", "r9")); Truth.assertThat(actualResults) .containsExactly("r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8") .inOrder(); @@ -155,8 +152,7 @@ public void rowLimitTest() { .expectRowLimit(1) .respondWith("r2")); - List actualResults = - getResults(Query.create(tableName.getTable()).range("r1", "r3").limit(2)); + List actualResults = getResults(Query.create(TABLE_ID).range("r1", "r3").limit(2)); Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @@ -171,8 +167,7 @@ public void errorAfterRowLimitMetTest() { // Second retry request is handled locally in ReadRowsRetryCompletedCallable - List actualResults = - getResults(Query.create(tableName.getTable()).range("r1", "r3").limit(2)); + List actualResults = getResults(Query.create(TABLE_ID).range("r1", "r3").limit(2)); Truth.assertThat(actualResults).containsExactly("r1", "r2"); } @@ -188,8 +183,7 @@ public void errorAfterRequestCompleteTest() { // Second retry request is handled locally in ReadRowsRetryCompletedCallable - List actualResults = - getResults(Query.create(tableName.getTable()).range("r1", "r3").rowKey("r4")); + List actualResults = getResults(Query.create(TABLE_ID).range("r1", "r3").rowKey("r4")); Truth.assertThat(actualResults).containsExactly("r2", "r4"); } @@ -203,8 +197,7 @@ public void pointTest() { .respondWithStatus(Code.UNAVAILABLE)); service.expectations.add(RpcExpectation.create().expectRequest("r2").respondWith("r2")); - List actualResults = - getResults(Query.create(tableName.getTable()).rowKey("r1").rowKey("r2")); + List actualResults = getResults(Query.create(TABLE_ID).rowKey("r1").rowKey("r2")); Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @@ -214,7 +207,7 @@ public void fullTableScanTest() { RpcExpectation.create().respondWith("r1").respondWithStatus(Code.UNAVAILABLE)); service.expectations.add( RpcExpectation.create().expectRequest(Range.greaterThan("r1")).respondWith("r2")); - List actualResults = getResults(Query.create(tableName.getTable())); + List actualResults = getResults(Query.create(TABLE_ID)); Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @@ -229,8 +222,7 @@ public void retryUnboundedStartTest() { RpcExpectation.create().expectRequest(Range.open("r1", "r9")).respondWith("r2")); List actualResults = - getResults( - Query.create(tableName.getTable()).range(ByteStringRange.unbounded().endOpen("r9"))); + getResults(Query.create(TABLE_ID).range(ByteStringRange.unbounded().endOpen("r9"))); Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @@ -245,9 +237,7 @@ public void retryUnboundedEndTest() { RpcExpectation.create().expectRequest(Range.greaterThan("r1")).respondWith("r2")); List actualResults = - getResults( - Query.create(tableName.getTable()) - .range(ByteStringRange.unbounded().startClosed("r1"))); + getResults(Query.create(TABLE_ID).range(ByteStringRange.unbounded().startClosed("r1"))); Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @@ -261,7 +251,7 @@ public void retryWithLastScannedKeyTest() { service.expectations.add( RpcExpectation.create().expectRequest(Range.open("r5", "r9")).respondWith("r7")); List actualResults = - getResults(Query.create(tableName.getTable()).range(ByteStringRange.create("r1", "r9"))); + getResults(Query.create(TABLE_ID).range(ByteStringRange.create("r1", "r9"))); Truth.assertThat(actualResults).containsExactly("r7").inOrder(); } @@ -309,7 +299,9 @@ private static class RpcExpectation { List responses; private RpcExpectation() { - this.requestBuilder = ReadRowsRequest.newBuilder().setTableName(tableName.toString()); + this.requestBuilder = + ReadRowsRequest.newBuilder() + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)); this.statusCode = Status.Code.OK; this.responses = Lists.newArrayList(); } diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsUserCallableTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsUserCallableTest.java index 8a0e2de9990c..d1e03df2c660 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsUserCallableTest.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsUserCallableTest.java @@ -17,7 +17,6 @@ import com.google.bigtable.v2.ReadRowsRequest; import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.InstanceName; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; @@ -29,7 +28,7 @@ @RunWith(JUnit4.class) public class ReadRowsUserCallableTest { private static final RequestContext REQUEST_CONTEXT = - RequestContext.create(InstanceName.of("fake-project", "fake-instance"), "fake-profile"); + RequestContext.create("fake-project", "fake-instance", "fake-profile"); @Test public void testRequestConverted() { diff --git a/google-cloud-clients/google-cloud-compute/README.md b/google-cloud-clients/google-cloud-compute/README.md index 963b7b03e807..1e7dd987ade2 100644 --- a/google-cloud-clients/google-cloud-compute/README.md +++ b/google-cloud-clients/google-cloud-compute/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-compute - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-compute:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-compute:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-compute/pom.xml b/google-cloud-clients/google-cloud-compute/pom.xml index 9d8f64edf047..1c032ba673ed 100644 --- a/google-cloud-clients/google-cloud-compute/pom.xml +++ b/google-cloud-clients/google-cloud-compute/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-compute - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Compute https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-compute @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-compute diff --git a/google-cloud-clients/google-cloud-container/README.md b/google-cloud-clients/google-cloud-container/README.md index cff03e12f2ca..2d33cae76cab 100644 --- a/google-cloud-clients/google-cloud-container/README.md +++ b/google-cloud-clients/google-cloud-container/README.md @@ -22,16 +22,16 @@ Add this to your pom.xml file com.google.cloud google-cloud-container - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-container:0.74.0-beta' +compile 'com.google.cloud:google-cloud-container:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-container" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-container" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-container/pom.xml b/google-cloud-clients/google-cloud-container/pom.xml index 8704d784d37f..a451853ebb69 100644 --- a/google-cloud-clients/google-cloud-container/pom.xml +++ b/google-cloud-clients/google-cloud-container/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-container - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Container https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-container @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-container diff --git a/google-cloud-clients/google-cloud-containeranalysis/README.md b/google-cloud-clients/google-cloud-containeranalysis/README.md index d3c4b7498da8..a62c3cb0c939 100644 --- a/google-cloud-clients/google-cloud-containeranalysis/README.md +++ b/google-cloud-clients/google-cloud-containeranalysis/README.md @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-containeranalysis - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-containeranalysis:0.74.0-beta' +compile 'com.google.cloud:google-cloud-containeranalysis:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-containeranalysis/pom.xml b/google-cloud-clients/google-cloud-containeranalysis/pom.xml index b656b0b5d501..7e9c3260b688 100644 --- a/google-cloud-clients/google-cloud-containeranalysis/pom.xml +++ b/google-cloud-clients/google-cloud-containeranalysis/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-containeranalysis - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Container Analysis https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-clients/google-cloud-containeranalysis @@ -15,7 +15,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-containeranalysis diff --git a/google-cloud-clients/google-cloud-contrib/README.md b/google-cloud-clients/google-cloud-contrib/README.md index 7ce3288ec6ca..c91e4b5648f5 100644 --- a/google-cloud-clients/google-cloud-contrib/README.md +++ b/google-cloud-clients/google-cloud-contrib/README.md @@ -25,16 +25,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-contrib - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-contrib:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-contrib:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-contrib" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-contrib" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/README.md b/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/README.md index 0665b61087d8..2d0504e4505e 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/README.md +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/README.md @@ -21,16 +21,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-logging-logback - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-logging-logback:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-logging-logback:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-logging-logback" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-logging-logback" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/pom.xml b/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/pom.xml index 29f497875303..e8a046bb22a6 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/pom.xml +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-logging-logback - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Logging Logback Appender https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback @@ -20,7 +20,7 @@ com.google.cloud google-cloud-contrib - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/README.md b/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/README.md index 6ecb0990d337..5708112cec4d 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/README.md +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/README.md @@ -23,12 +23,12 @@ To run this example: [//]: # ({x-version-update-start:google-cloud-nio:current}) ``` - java -cp google-cloud-clients/google-cloud-contrib/google-cloud-nio/target/google-cloud-nio-0.74.1-alpha-SNAPSHOT.jar:google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.74.1-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems + java -cp google-cloud-clients/google-cloud-contrib/google-cloud-nio/target/google-cloud-nio-0.76.0-alpha.jar:google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.76.0-alpha.jar com.google.cloud.nio.examples.ListFilesystems ``` Notice that it lists Google Cloud Storage, which it wouldn't if you ran it without the NIO jar: ``` - java -cp google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.74.1-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems + java -cp google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.76.0-alpha.jar com.google.cloud.nio.examples.ListFilesystems ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/pom.xml b/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/pom.xml index 107ac4b4221e..a0ea29bff621 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/pom.xml +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-nio-examples - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud NIO Examples https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples @@ -12,7 +12,7 @@ com.google.cloud google-cloud-contrib - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-nio-examples diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/README.md b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/README.md index e76272f949b3..eaeef5c9919f 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/README.md +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/README.md @@ -26,16 +26,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-nio - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-nio:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-nio:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-nio" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-nio" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml index d796f59c3e17..d2872e94e0ab 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-nio - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud NIO https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-contrib/google-cloud-nio @@ -12,7 +12,7 @@ com.google.cloud google-cloud-contrib - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-nio diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java index d4d7e0a246ee..4f22c9aeb89e 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java @@ -768,6 +768,12 @@ public A readAttributes( } CloudStorageObjectAttributes ret; ret = new CloudStorageObjectAttributes(blobInfo); + // if size is 0 it could be a folder + if (ret.size() == 0 && cloudPath.seemsLikeADirectoryAndUsePseudoDirectories(storage)) { + @SuppressWarnings("unchecked") + A result = (A) new CloudStoragePseudoDirectoryAttributes(cloudPath); + return result; + } @SuppressWarnings("unchecked") A result = (A) ret; return result; diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributesTest.java b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributesTest.java index 472c0cf0a5ce..041c66670ff7 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributesTest.java +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributesTest.java @@ -38,6 +38,7 @@ public class CloudStorageFileAttributesTest { private static final byte[] HAPPY = "(✿◕ ‿◕ )ノ".getBytes(UTF_8); + private static final byte[] EMPTY = "".getBytes(UTF_8); private Path path; private Path dir; @@ -104,6 +105,14 @@ public void testIsDirectory() throws IOException { assertThat(Files.readAttributes(dir, CloudStorageFileAttributes.class).isDirectory()).isTrue(); } + @Test + public void testIsPseudoDirectory() throws IOException { + Files.write(path, EMPTY); + assertThat(Files.readAttributes(path, CloudStorageFileAttributes.class).isDirectory()) + .isFalse(); + assertThat(Files.readAttributes(dir, CloudStorageFileAttributes.class).isDirectory()).isTrue(); + } + @Test public void testIsRegularFile() throws IOException { Files.write(path, HAPPY); diff --git a/google-cloud-clients/google-cloud-contrib/pom.xml b/google-cloud-clients/google-cloud-contrib/pom.xml index d79b05a8e808..41d9291e0136 100644 --- a/google-cloud-clients/google-cloud-contrib/pom.xml +++ b/google-cloud-clients/google-cloud-contrib/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-contrib - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha pom Google Cloud Contributions https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-contrib @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-contrib diff --git a/google-cloud-clients/google-cloud-core-grpc/pom.xml b/google-cloud-clients/google-cloud-core-grpc/pom.xml index db0bf740054e..4fa4e48bf26b 100644 --- a/google-cloud-clients/google-cloud-core-grpc/pom.xml +++ b/google-cloud-clients/google-cloud-core-grpc/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-core-grpc - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Core gRPC https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-grpc @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-core-grpc diff --git a/google-cloud-clients/google-cloud-core-http/pom.xml b/google-cloud-clients/google-cloud-core-http/pom.xml index 5409850a0cbb..0cea56cbedeb 100644 --- a/google-cloud-clients/google-cloud-core-http/pom.xml +++ b/google-cloud-clients/google-cloud-core-http/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-core-http - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Core HTTP https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-http @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-core-http diff --git a/google-cloud-clients/google-cloud-core/README.md b/google-cloud-clients/google-cloud-core/README.md index 3f70ad35b796..df46bd804056 100644 --- a/google-cloud-clients/google-cloud-core/README.md +++ b/google-cloud-clients/google-cloud-core/README.md @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-core - 1.56.0 + 1.58.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-core:1.56.0' +compile 'com.google.cloud:google-cloud-core:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-core" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-core" % "1.58.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-core/pom.xml b/google-cloud-clients/google-cloud-core/pom.xml index f5bd1611e5c6..55ea4e0355dd 100644 --- a/google-cloud-clients/google-cloud-core/pom.xml +++ b/google-cloud-clients/google-cloud-core/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-core - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Core https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-core diff --git a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java b/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java index 5c9550fe8530..723404697095 100644 --- a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java +++ b/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java @@ -43,7 +43,7 @@ public static String getProjectId() { public static String getZone() { String zoneId = getAttribute("instance/zone"); - if (zoneId.contains("/")) { + if (zoneId != null && zoneId.contains("/")) { return zoneId.substring(zoneId.lastIndexOf('/') + 1); } return zoneId; diff --git a/google-cloud-clients/google-cloud-dataproc/README.md b/google-cloud-clients/google-cloud-dataproc/README.md index 7bdafe9dd58d..1c8c76b13e8d 100644 --- a/google-cloud-clients/google-cloud-dataproc/README.md +++ b/google-cloud-clients/google-cloud-dataproc/README.md @@ -22,16 +22,16 @@ Add this to your pom.xml file com.google.cloud google-cloud-dataproc - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-dataproc:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-dataproc:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-dataproc/pom.xml b/google-cloud-clients/google-cloud-dataproc/pom.xml index 817dbf89451d..4cc4e4cbe237 100644 --- a/google-cloud-clients/google-cloud-dataproc/pom.xml +++ b/google-cloud-clients/google-cloud-dataproc/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-dataproc - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Dataproc https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-dataproc @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-dataproc diff --git a/google-cloud-clients/google-cloud-datastore/README.md b/google-cloud-clients/google-cloud-datastore/README.md index d9a7e545fcb4..e8c9a1aede29 100644 --- a/google-cloud-clients/google-cloud-datastore/README.md +++ b/google-cloud-clients/google-cloud-datastore/README.md @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-datastore - 1.56.0 + 1.58.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-datastore:1.56.0' +compile 'com.google.cloud:google-cloud-datastore:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "1.58.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-datastore/pom.xml b/google-cloud-clients/google-cloud-datastore/pom.xml index b7eb888a8b36..01658e6e3e87 100644 --- a/google-cloud-clients/google-cloud-datastore/pom.xml +++ b/google-cloud-clients/google-cloud-datastore/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-datastore - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Datastore https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-datastore @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-datastore diff --git a/google-cloud-clients/google-cloud-dialogflow/README.md b/google-cloud-clients/google-cloud-dialogflow/README.md index 8dd91a815afb..47bbd6d17c86 100644 --- a/google-cloud-clients/google-cloud-dialogflow/README.md +++ b/google-cloud-clients/google-cloud-dialogflow/README.md @@ -23,16 +23,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-dialogflow - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-dialogflow:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-dialogflow:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-dialogflow/pom.xml b/google-cloud-clients/google-cloud-dialogflow/pom.xml index c3e3f1e7b781..d5283899d46a 100644 --- a/google-cloud-clients/google-cloud-dialogflow/pom.xml +++ b/google-cloud-clients/google-cloud-dialogflow/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-dialogflow - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Dialog Flow API https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-dialogflow @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-dialogflow diff --git a/google-cloud-clients/google-cloud-dlp/README.md b/google-cloud-clients/google-cloud-dlp/README.md index 2576ecfc503d..5e967e48f6cf 100644 --- a/google-cloud-clients/google-cloud-dlp/README.md +++ b/google-cloud-clients/google-cloud-dlp/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-dlp - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-dlp:0.74.0-beta' +compile 'com.google.cloud:google-cloud-dlp:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dlp" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-dlp" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-dlp/pom.xml b/google-cloud-clients/google-cloud-dlp/pom.xml index 167ddede2e34..f9de9bebf95a 100644 --- a/google-cloud-clients/google-cloud-dlp/pom.xml +++ b/google-cloud-clients/google-cloud-dlp/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-dlp - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Data Loss Prevention API https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-dlp @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-dlp diff --git a/google-cloud-clients/google-cloud-dns/README.md b/google-cloud-clients/google-cloud-dns/README.md index 3719d08a03af..55ea1a7f58aa 100644 --- a/google-cloud-clients/google-cloud-dns/README.md +++ b/google-cloud-clients/google-cloud-dns/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-dns - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-dns:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-dns:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dns" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-dns" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-dns/pom.xml b/google-cloud-clients/google-cloud-dns/pom.xml index 6a0f73959dbb..d4ff902abdba 100644 --- a/google-cloud-clients/google-cloud-dns/pom.xml +++ b/google-cloud-clients/google-cloud-dns/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-dns - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud DNS https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-dns @@ -14,7 +14,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-dns diff --git a/google-cloud-clients/google-cloud-errorreporting/README.md b/google-cloud-clients/google-cloud-errorreporting/README.md index a6cd6b406fb5..16dfc7120b25 100644 --- a/google-cloud-clients/google-cloud-errorreporting/README.md +++ b/google-cloud-clients/google-cloud-errorreporting/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-errorreporting - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-errorreporting:0.74.0-beta' +compile 'com.google.cloud:google-cloud-errorreporting:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-errorreporting" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-errorreporting" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-errorreporting/pom.xml b/google-cloud-clients/google-cloud-errorreporting/pom.xml index 3e2a2ce61106..271039437710 100644 --- a/google-cloud-clients/google-cloud-errorreporting/pom.xml +++ b/google-cloud-clients/google-cloud-errorreporting/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-errorreporting - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Error Reporting https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-errorreporting @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-errorreporting diff --git a/google-cloud-clients/google-cloud-firestore/README.md b/google-cloud-clients/google-cloud-firestore/README.md index 67d9280f748a..8a4779c2e353 100644 --- a/google-cloud-clients/google-cloud-firestore/README.md +++ b/google-cloud-clients/google-cloud-firestore/README.md @@ -17,16 +17,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-firestore - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-firestore:0.74.0-beta' +compile 'com.google.cloud:google-cloud-firestore:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-firestore/pom.xml b/google-cloud-clients/google-cloud-firestore/pom.xml index 95db48d48dae..5bb95d70d5fc 100644 --- a/google-cloud-clients/google-cloud-firestore/pom.xml +++ b/google-cloud-clients/google-cloud-firestore/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-firestore - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Firestore https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-firestore @@ -15,7 +15,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-firestore diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/BasePath.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/BasePath.java index de76bd1d87e4..964f95003e33 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/BasePath.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/BasePath.java @@ -25,7 +25,7 @@ * BasePath represents a path sequence in the Firestore database. It is composed of an ordered * sequence of string segments. */ -abstract class BasePath> implements Comparable { +public abstract class BasePath> implements Comparable { /** * Returns the segments that make up this path. diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/UpdateBuilder.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/UpdateBuilder.java index 1e937e589b58..b5d0c0a7a6ce 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/UpdateBuilder.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/UpdateBuilder.java @@ -43,7 +43,7 @@ * Abstract class that collects and bundles all write operations for {@link Transaction} and {@link * WriteBatch}. */ -abstract class UpdateBuilder { +public abstract class UpdateBuilder { private static class Mutation { Write.Builder document; diff --git a/google-cloud-clients/google-cloud-iamcredentials/README.md b/google-cloud-clients/google-cloud-iamcredentials/README.md index 2d1d7d9390b0..d885aa5041ea 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/README.md +++ b/google-cloud-clients/google-cloud-iamcredentials/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-iamcredentials - 0.1.0-alpha + 0.3.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-iamcredentials:0.1.0-alpha' +compile 'com.google.cloud:google-cloud-iamcredentials:0.3.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-iamcredentials" % "0.1.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-iamcredentials" % "0.3.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-iamcredentials/pom.xml b/google-cloud-clients/google-cloud-iamcredentials/pom.xml index 16efaaa725fd..3cecd9e0936f 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/pom.xml +++ b/google-cloud-clients/google-cloud-iamcredentials/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-iamcredentials - 0.1.1-alpha-SNAPSHOT + 0.3.0-alpha jar Google Cloud Java Client for IAM Service Account Credentials API https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-iamcredentials @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-iamcredentials diff --git a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java index 9886cba6df55..318ad4fb44e5 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java +++ b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java @@ -550,6 +550,118 @@ public final UnaryCallable signJwtCallable() { return stub.signJwtCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exchange a JWT signed by third party identity provider to an OAuth 2.0 access token + * + *

Sample code: + * + *


+   * try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
+   *   String formattedName = IamCredentialsClient.formatServiceAccountName("[PROJECT]", "[SERVICE_ACCOUNT]");
+   *   List<String> scope = new ArrayList<>();
+   *   String jwt = "";
+   *   GenerateIdentityBindingAccessTokenResponse response = iamCredentialsClient.generateIdentityBindingAccessToken(formattedName, scope, jwt);
+   * }
+   * 
+ * + * @param name The resource name of the service account for which the credentials are requested, + * in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + * @param scope Code to identify the scopes to be included in the OAuth 2.0 access token. See + * https://developers.google.com/identity/protocols/googlescopes for more information. At + * least one value required. + * @param jwt Required. Input token. Must be in JWT format according to RFC7523 + * (https://tools.ietf.org/html/rfc7523) and must have 'kid' field in the header. Supported + * signing algorithms: RS256 (RS512, ES256, ES512 coming soon). Mandatory payload fields + * (along the lines of RFC 7523, section 3): - iss: issuer of the token. Must provide a + * discovery document at $iss/.well-known/openid-configuration . The document needs to be + * formatted according to section 4.2 of the OpenID Connect Discovery 1.0 specification. - + * iat: Issue time in seconds since epoch. Must be in the past. - exp: Expiration time in + * seconds since epoch. Must be less than 48 hours after iat. We recommend to create tokens + * that last shorter than 6 hours to improve security unless business reasons mandate longer + * expiration times. Shorter token lifetimes are generally more secure since tokens that have + * been exfiltrated by attackers can be used for a shorter time. you can configure the maximum + * lifetime of the incoming token in the configuration of the mapper. The resulting Google + * token will expire within an hour or at "exp", whichever is earlier. - sub: JWT subject, + * identity asserted in the JWT. - aud: Configured in the mapper policy. By default the + * service account email. + *

Claims from the incoming token can be transferred into the output token accoding to the + * mapper configuration. The outgoing claim size is limited. Outgoing claims size must be less + * than 4kB serialized as JSON without whitespace. + *

Example header: { "alg": "RS256", "kid": "92a4265e14ab04d4d228a48d10d4ca31610936f8" } + * Example payload: { "iss": "https://accounts.google.com", "iat": 1517963104, "exp": + * 1517966704, "aud": "https://iamcredentials.googleapis.com/", "sub": + * "113475438248934895348", "my_claims": { "additional_claim": "value" } } + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerateIdentityBindingAccessTokenResponse generateIdentityBindingAccessToken( + String name, List scope, String jwt) { + SERVICE_ACCOUNT_PATH_TEMPLATE.validate(name, "generateIdentityBindingAccessToken"); + GenerateIdentityBindingAccessTokenRequest request = + GenerateIdentityBindingAccessTokenRequest.newBuilder() + .setName(name) + .addAllScope(scope) + .setJwt(jwt) + .build(); + return generateIdentityBindingAccessToken(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exchange a JWT signed by third party identity provider to an OAuth 2.0 access token + * + *

Sample code: + * + *


+   * try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
+   *   String formattedName = IamCredentialsClient.formatServiceAccountName("[PROJECT]", "[SERVICE_ACCOUNT]");
+   *   List<String> scope = new ArrayList<>();
+   *   String jwt = "";
+   *   GenerateIdentityBindingAccessTokenRequest request = GenerateIdentityBindingAccessTokenRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .addAllScope(scope)
+   *     .setJwt(jwt)
+   *     .build();
+   *   GenerateIdentityBindingAccessTokenResponse response = iamCredentialsClient.generateIdentityBindingAccessToken(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerateIdentityBindingAccessTokenResponse generateIdentityBindingAccessToken( + GenerateIdentityBindingAccessTokenRequest request) { + return generateIdentityBindingAccessTokenCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exchange a JWT signed by third party identity provider to an OAuth 2.0 access token + * + *

Sample code: + * + *


+   * try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
+   *   String formattedName = IamCredentialsClient.formatServiceAccountName("[PROJECT]", "[SERVICE_ACCOUNT]");
+   *   List<String> scope = new ArrayList<>();
+   *   String jwt = "";
+   *   GenerateIdentityBindingAccessTokenRequest request = GenerateIdentityBindingAccessTokenRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .addAllScope(scope)
+   *     .setJwt(jwt)
+   *     .build();
+   *   ApiFuture<GenerateIdentityBindingAccessTokenResponse> future = iamCredentialsClient.generateIdentityBindingAccessTokenCallable().futureCall(request);
+   *   // Do something
+   *   GenerateIdentityBindingAccessTokenResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenCallable() { + return stub.generateIdentityBindingAccessTokenCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsSettings.java b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsSettings.java index 363a5a534f1c..8ddcd066b153 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsSettings.java +++ b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsSettings.java @@ -82,6 +82,14 @@ public UnaryCallSettings signJwtSettings() { return ((IamCredentialsStubSettings) getStubSettings()).signJwtSettings(); } + /** Returns the object with the settings used for calls to generateIdentityBindingAccessToken. */ + public UnaryCallSettings< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenSettings() { + return ((IamCredentialsStubSettings) getStubSettings()) + .generateIdentityBindingAccessTokenSettings(); + } + public static final IamCredentialsSettings create(IamCredentialsStubSettings stub) throws IOException { return new IamCredentialsSettings.Builder(stub.toBuilder()).build(); @@ -201,6 +209,15 @@ public UnaryCallSettings.Builder signJwtSetting return getStubSettingsBuilder().signJwtSettings(); } + /** + * Returns the builder for the settings used for calls to generateIdentityBindingAccessToken. + */ + public UnaryCallSettings.Builder< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenSettings() { + return getStubSettingsBuilder().generateIdentityBindingAccessTokenSettings(); + } + @Override public IamCredentialsSettings build() throws IOException { return new IamCredentialsSettings(this); diff --git a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/GrpcIamCredentialsStub.java b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/GrpcIamCredentialsStub.java index bed050b4a10e..7d633fa7386a 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/GrpcIamCredentialsStub.java +++ b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/GrpcIamCredentialsStub.java @@ -26,6 +26,8 @@ import com.google.cloud.iam.credentials.v1.GenerateAccessTokenResponse; import com.google.cloud.iam.credentials.v1.GenerateIdTokenRequest; import com.google.cloud.iam.credentials.v1.GenerateIdTokenResponse; +import com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest; +import com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse; import com.google.cloud.iam.credentials.v1.SignBlobRequest; import com.google.cloud.iam.credentials.v1.SignBlobResponse; import com.google.cloud.iam.credentials.v1.SignJwtRequest; @@ -81,6 +83,23 @@ public class GrpcIamCredentialsStub extends IamCredentialsStub { .setRequestMarshaller(ProtoUtils.marshaller(SignJwtRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SignJwtResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.iam.credentials.v1.IAMCredentials/GenerateIdentityBindingAccessToken") + .setRequestMarshaller( + ProtoUtils.marshaller( + GenerateIdentityBindingAccessTokenRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + GenerateIdentityBindingAccessTokenResponse.getDefaultInstance())) + .build(); private final BackgroundResource backgroundResources; @@ -90,6 +109,9 @@ public class GrpcIamCredentialsStub extends IamCredentialsStub { generateIdTokenCallable; private final UnaryCallable signBlobCallable; private final UnaryCallable signJwtCallable; + private final UnaryCallable< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenCallable; private final GrpcStubCallableFactory callableFactory; @@ -150,6 +172,15 @@ protected GrpcIamCredentialsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(signJwtMethodDescriptor) .build(); + GrpcCallSettings< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(generateIdentityBindingAccessTokenMethodDescriptor) + .build(); this.generateAccessTokenCallable = callableFactory.createUnaryCallable( @@ -165,6 +196,11 @@ protected GrpcIamCredentialsStub( this.signJwtCallable = callableFactory.createUnaryCallable( signJwtTransportSettings, settings.signJwtSettings(), clientContext); + this.generateIdentityBindingAccessTokenCallable = + callableFactory.createUnaryCallable( + generateIdentityBindingAccessTokenTransportSettings, + settings.generateIdentityBindingAccessTokenSettings(), + clientContext); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -186,6 +222,12 @@ public UnaryCallable signJwtCallable() { return signJwtCallable; } + public UnaryCallable< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenCallable() { + return generateIdentityBindingAccessTokenCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/IamCredentialsStub.java b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/IamCredentialsStub.java index b6c99ff4bb74..c8f06442cdb6 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/IamCredentialsStub.java +++ b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/IamCredentialsStub.java @@ -22,6 +22,8 @@ import com.google.cloud.iam.credentials.v1.GenerateAccessTokenResponse; import com.google.cloud.iam.credentials.v1.GenerateIdTokenRequest; import com.google.cloud.iam.credentials.v1.GenerateIdTokenResponse; +import com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest; +import com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse; import com.google.cloud.iam.credentials.v1.SignBlobRequest; import com.google.cloud.iam.credentials.v1.SignBlobResponse; import com.google.cloud.iam.credentials.v1.SignJwtRequest; @@ -55,6 +57,13 @@ public UnaryCallable signJwtCallable() { throw new UnsupportedOperationException("Not implemented: signJwtCallable()"); } + public UnaryCallable< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenCallable() { + throw new UnsupportedOperationException( + "Not implemented: generateIdentityBindingAccessTokenCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/IamCredentialsStubSettings.java b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/IamCredentialsStubSettings.java index e6b865af9447..e2b3a0656e90 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/IamCredentialsStubSettings.java +++ b/google-cloud-clients/google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/IamCredentialsStubSettings.java @@ -34,6 +34,8 @@ import com.google.cloud.iam.credentials.v1.GenerateAccessTokenResponse; import com.google.cloud.iam.credentials.v1.GenerateIdTokenRequest; import com.google.cloud.iam.credentials.v1.GenerateIdTokenResponse; +import com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenRequest; +import com.google.cloud.iam.credentials.v1.GenerateIdentityBindingAccessTokenResponse; import com.google.cloud.iam.credentials.v1.SignBlobRequest; import com.google.cloud.iam.credentials.v1.SignBlobResponse; import com.google.cloud.iam.credentials.v1.SignJwtRequest; @@ -87,6 +89,9 @@ public class IamCredentialsStubSettings extends StubSettings signBlobSettings; private final UnaryCallSettings signJwtSettings; + private final UnaryCallSettings< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenSettings; /** Returns the object with the settings used for calls to generateAccessToken. */ public UnaryCallSettings @@ -110,6 +115,13 @@ public UnaryCallSettings signJwtSettings() { return signJwtSettings; } + /** Returns the object with the settings used for calls to generateIdentityBindingAccessToken. */ + public UnaryCallSettings< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenSettings() { + return generateIdentityBindingAccessTokenSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public IamCredentialsStub createStub() throws IOException { if (getTransportChannelProvider() @@ -182,6 +194,8 @@ protected IamCredentialsStubSettings(Builder settingsBuilder) throws IOException generateIdTokenSettings = settingsBuilder.generateIdTokenSettings().build(); signBlobSettings = settingsBuilder.signBlobSettings().build(); signJwtSettings = settingsBuilder.signJwtSettings().build(); + generateIdentityBindingAccessTokenSettings = + settingsBuilder.generateIdentityBindingAccessTokenSettings().build(); } /** Builder for IamCredentialsStubSettings. */ @@ -194,6 +208,9 @@ public static class Builder extends StubSettings.Builder signBlobSettings; private final UnaryCallSettings.Builder signJwtSettings; + private final UnaryCallSettings.Builder< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -244,12 +261,15 @@ protected Builder(ClientContext clientContext) { signJwtSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + generateIdentityBindingAccessTokenSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + unaryMethodSettingsBuilders = ImmutableList.>of( generateAccessTokenSettings, generateIdTokenSettings, signBlobSettings, - signJwtSettings); + signJwtSettings, + generateIdentityBindingAccessTokenSettings); initDefaults(this); } @@ -285,6 +305,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .generateIdentityBindingAccessTokenSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + return builder; } @@ -295,13 +320,16 @@ protected Builder(IamCredentialsStubSettings settings) { generateIdTokenSettings = settings.generateIdTokenSettings.toBuilder(); signBlobSettings = settings.signBlobSettings.toBuilder(); signJwtSettings = settings.signJwtSettings.toBuilder(); + generateIdentityBindingAccessTokenSettings = + settings.generateIdentityBindingAccessTokenSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( generateAccessTokenSettings, generateIdTokenSettings, signBlobSettings, - signJwtSettings); + signJwtSettings, + generateIdentityBindingAccessTokenSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -342,6 +370,15 @@ public UnaryCallSettings.Builder signJwtSetting return signJwtSettings; } + /** + * Returns the builder for the settings used for calls to generateIdentityBindingAccessToken. + */ + public UnaryCallSettings.Builder< + GenerateIdentityBindingAccessTokenRequest, GenerateIdentityBindingAccessTokenResponse> + generateIdentityBindingAccessTokenSettings() { + return generateIdentityBindingAccessTokenSettings; + } + @Override public IamCredentialsStubSettings build() throws IOException { return new IamCredentialsStubSettings(this); diff --git a/google-cloud-clients/google-cloud-iamcredentials/src/test/java/com/google/cloud/iam/credentials/v1/IamCredentialsClientTest.java b/google-cloud-clients/google-cloud-iamcredentials/src/test/java/com/google/cloud/iam/credentials/v1/IamCredentialsClientTest.java index 8f275a594bfc..772298437149 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/src/test/java/com/google/cloud/iam/credentials/v1/IamCredentialsClientTest.java +++ b/google-cloud-clients/google-cloud-iamcredentials/src/test/java/com/google/cloud/iam/credentials/v1/IamCredentialsClientTest.java @@ -276,4 +276,54 @@ public void signJwtExceptionTest() throws Exception { // Expected exception } } + + @Test + @SuppressWarnings("all") + public void generateIdentityBindingAccessTokenTest() { + String accessToken = "accessToken-1938933922"; + GenerateIdentityBindingAccessTokenResponse expectedResponse = + GenerateIdentityBindingAccessTokenResponse.newBuilder().setAccessToken(accessToken).build(); + mockIAMCredentials.addResponse(expectedResponse); + + String formattedName = + IamCredentialsClient.formatServiceAccountName("[PROJECT]", "[SERVICE_ACCOUNT]"); + List scope = new ArrayList<>(); + String jwt = "jwt105671"; + + GenerateIdentityBindingAccessTokenResponse actualResponse = + client.generateIdentityBindingAccessToken(formattedName, scope, jwt); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMCredentials.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateIdentityBindingAccessTokenRequest actualRequest = + (GenerateIdentityBindingAccessTokenRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertEquals(scope, actualRequest.getScopeList()); + Assert.assertEquals(jwt, actualRequest.getJwt()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void generateIdentityBindingAccessTokenExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockIAMCredentials.addException(exception); + + try { + String formattedName = + IamCredentialsClient.formatServiceAccountName("[PROJECT]", "[SERVICE_ACCOUNT]"); + List scope = new ArrayList<>(); + String jwt = "jwt105671"; + + client.generateIdentityBindingAccessToken(formattedName, scope, jwt); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } } diff --git a/google-cloud-clients/google-cloud-iamcredentials/src/test/java/com/google/cloud/iam/credentials/v1/MockIAMCredentialsImpl.java b/google-cloud-clients/google-cloud-iamcredentials/src/test/java/com/google/cloud/iam/credentials/v1/MockIAMCredentialsImpl.java index b9f106d5d1c6..e44b8a4c179e 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/src/test/java/com/google/cloud/iam/credentials/v1/MockIAMCredentialsImpl.java +++ b/google-cloud-clients/google-cloud-iamcredentials/src/test/java/com/google/cloud/iam/credentials/v1/MockIAMCredentialsImpl.java @@ -114,4 +114,20 @@ public void signJwt(SignJwtRequest request, StreamObserver resp responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } } + + @Override + public void generateIdentityBindingAccessToken( + GenerateIdentityBindingAccessTokenRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof GenerateIdentityBindingAccessTokenResponse) { + requests.add(request); + responseObserver.onNext((GenerateIdentityBindingAccessTokenResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } } diff --git a/google-cloud-clients/google-cloud-iamcredentials/synth.metadata b/google-cloud-clients/google-cloud-iamcredentials/synth.metadata index 4541e1ba854a..0f4f16349096 100644 --- a/google-cloud-clients/google-cloud-iamcredentials/synth.metadata +++ b/google-cloud-clients/google-cloud-iamcredentials/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2018-12-12T22:58:16.947668Z", + "updateTime": "2019-01-03T17:46:37.271512Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.2", - "dockerImage": "googleapis/artman@sha256:2f6b261ee7fe1aedf238991c93a20b3820de37a343d0cacf3e3e9555c2aaf2ea" + "version": "0.16.4", + "dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "a207551d5190d2dc915ea261f19ce83eeee000d3", - "internalRef": "225249459" + "sha": "2a5caab4315cb5ab3d5c97c90c6d4e9441052b16", + "internalRef": "227195651" } } ], diff --git a/google-cloud-clients/google-cloud-iot/README.md b/google-cloud-clients/google-cloud-iot/README.md index d1c9ccacb0ab..c158c9d117e5 100644 --- a/google-cloud-clients/google-cloud-iot/README.md +++ b/google-cloud-clients/google-cloud-iot/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-iot - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-iot:0.74.0-beta' +compile 'com.google.cloud:google-cloud-iot:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-iot" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-iot" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-iot/pom.xml b/google-cloud-clients/google-cloud-iot/pom.xml index 30e817f7f309..dc2cb3c6f682 100644 --- a/google-cloud-clients/google-cloud-iot/pom.xml +++ b/google-cloud-clients/google-cloud-iot/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-iot - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud IoT https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-iot @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-iot diff --git a/google-cloud-clients/google-cloud-kms/README.md b/google-cloud-clients/google-cloud-kms/README.md index 7654de4009f3..fe904b88df17 100644 --- a/google-cloud-clients/google-cloud-kms/README.md +++ b/google-cloud-clients/google-cloud-kms/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-kms - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-kms:0.74.0-beta' +compile 'com.google.cloud:google-cloud-kms:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-kms" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-kms" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-kms/pom.xml b/google-cloud-clients/google-cloud-kms/pom.xml index d1cba238dee4..2b18a7461115 100644 --- a/google-cloud-clients/google-cloud-kms/pom.xml +++ b/google-cloud-clients/google-cloud-kms/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-kms - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud KMS https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-clients/google-cloud-kms @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-kms-v1 diff --git a/google-cloud-clients/google-cloud-language/README.md b/google-cloud-clients/google-cloud-language/README.md index 952b3d327259..8a2484788633 100644 --- a/google-cloud-clients/google-cloud-language/README.md +++ b/google-cloud-clients/google-cloud-language/README.md @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-language - 1.56.0 + 1.58.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-language:1.56.0' +compile 'com.google.cloud:google-cloud-language:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-language" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-language" % "1.58.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-language/pom.xml b/google-cloud-clients/google-cloud-language/pom.xml index 3f06ffeb4b8c..271cfb1e0c62 100644 --- a/google-cloud-clients/google-cloud-language/pom.xml +++ b/google-cloud-clients/google-cloud-language/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-language - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Natural Language https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-language @@ -15,7 +15,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-language diff --git a/google-cloud-clients/google-cloud-logging/README.md b/google-cloud-clients/google-cloud-logging/README.md index e9d1214ec829..c37cbf149cdb 100644 --- a/google-cloud-clients/google-cloud-logging/README.md +++ b/google-cloud-clients/google-cloud-logging/README.md @@ -19,16 +19,16 @@ Add this to your pom.xml file com.google.cloud google-cloud-logging - 1.56.0 + 1.58.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-logging:1.56.0' +compile 'com.google.cloud:google-cloud-logging:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "1.58.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-logging/pom.xml b/google-cloud-clients/google-cloud-logging/pom.xml index 482347aca948..25d4728f5292 100644 --- a/google-cloud-clients/google-cloud-logging/pom.xml +++ b/google-cloud-clients/google-cloud-logging/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-logging - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Logging https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-logging @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-logging diff --git a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/Logging.java b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/Logging.java index e8b39e3e06ec..c262fdedae26 100644 --- a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/Logging.java +++ b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/Logging.java @@ -186,8 +186,15 @@ public static EntryListOption filter(String filter) { Synchronicity getWriteSynchronicity(); /** - * Sets flush severity for asynchronous logging writes. Default is ERROR. Logs will be immediately - * written out for entries at or higher than flush severity. + * Sets flush severity for asynchronous logging writes. It is disabled by default, enabled when + * this method is called with not null value. Logs will be immediately written out for entries at + * or higher than flush severity. + * + *

Enabling this can cause the leaking and hanging threads, see BUG(2796) BUG(3880). However + * you can explicitly call {@link #flush}. + * + *

TODO: Enable this by default once functionality to trigger rpc is available in generated + * code. */ void setFlushSeverity(Severity flushSeverity); @@ -664,8 +671,8 @@ ApiFuture> listMonitoredResourceDescripto /** * Flushes any pending asynchronous logging writes. Logs are automatically flushed based on time * and message count that be configured via {@link com.google.api.gax.batching.BatchingSettings}, - * Logs are also flushed if at or above flush severity, see {@link #setFlushSeverity}. Logging - * frameworks require support for an explicit flush. See usage in the java.util.logging + * Logs are also flushed if enabled, at or above flush severity, see {@link #setFlushSeverity}. + * Logging frameworks require support for an explicit flush. See usage in the java.util.logging * handler{@link LoggingHandler}. */ void flush(); diff --git a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java index 07bb2cd70e69..7c572af069b5 100644 --- a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java +++ b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java @@ -75,16 +75,19 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; class LoggingImpl extends BaseService implements Logging { + private static final int FLUSH_WAIT_TIMEOUT_SECONDS = 6; private final LoggingRpc rpc; private final Object writeLock = new Object(); private final Set> pendingWrites = Collections.newSetFromMap(new IdentityHashMap, Boolean>()); private volatile Synchronicity writeSynchronicity = Synchronicity.ASYNC; - private volatile Severity flushSeverity = Severity.ERROR; + private volatile Severity flushSeverity = null; private boolean closed; private static final Function EMPTY_TO_BOOLEAN_FUNCTION = @@ -553,11 +556,13 @@ public void write(Iterable logEntries, WriteOption... options) { try { writeLogEntries(logEntries, options); - for (LogEntry logEntry : logEntries) { - // flush pending writes if log severity at or above flush severity - if (logEntry.getSeverity().compareTo(flushSeverity) >= 0) { - flush(); - break; + if (flushSeverity != null) { + for (LogEntry logEntry : logEntries) { + // flush pending writes if log severity at or above flush severity + if (logEntry.getSeverity().compareTo(flushSeverity) >= 0) { + flush(); + break; + } } } } finally { @@ -574,8 +579,8 @@ public void flush() { } try { - ApiFutures.allAsList(writesToFlush).get(); - } catch (InterruptedException | ExecutionException e) { + ApiFutures.allAsList(writesToFlush).get(FLUSH_WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS); + } catch (InterruptedException | ExecutionException | TimeoutException e) { throw new RuntimeException(e); } } diff --git a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java b/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java index 4360d6724ab5..d3f53cdd3bdf 100644 --- a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java +++ b/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/BaseSystemTest.java @@ -229,6 +229,7 @@ public void testWriteAndListLogEntries() throws InterruptedException { .build(); logging().write(ImmutableList.of(firstEntry)); logging().write(ImmutableList.of(secondEntry)); + logging().flush(); String filter = createEqualityFilter("logName", logName); EntryListOption[] options = {EntryListOption.filter(filter), EntryListOption.pageSize(1)}; Page page = logging().listLogEntries(options); diff --git a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java b/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java index fd1335486226..7c711cd44a78 100644 --- a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java +++ b/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java @@ -1188,6 +1188,41 @@ public void testWriteLogEntries() { logging.write(ImmutableList.of(LOG_ENTRY1, LOG_ENTRY2)); } + @Test + public void testWriteLogEntriesDoesnotEnableFlushByDefault() { + WriteLogEntriesRequest request = + WriteLogEntriesRequest.newBuilder() + .addAllEntries( + Iterables.transform( + ImmutableList.of( + LOG_ENTRY1, LOG_ENTRY2.toBuilder().setSeverity(Severity.EMERGENCY).build()), + LogEntry.toPbFunction(PROJECT))) + .build(); + ApiFuture apiFuture = SettableApiFuture.create(); + EasyMock.expect(loggingRpcMock.write(request)).andReturn(apiFuture); + EasyMock.replay(rpcFactoryMock, loggingRpcMock); + logging = options.getService(); + logging.write( + ImmutableList.of( + LOG_ENTRY1, LOG_ENTRY2.toBuilder().setSeverity(Severity.EMERGENCY).build())); + } + + @Test + public void testWriteLogEntriesWithSeverityFlushEnabled() { + WriteLogEntriesRequest request = + WriteLogEntriesRequest.newBuilder() + .addAllEntries( + Iterables.transform( + ImmutableList.of(LOG_ENTRY1, LOG_ENTRY2), LogEntry.toPbFunction(PROJECT))) + .build(); + WriteLogEntriesResponse response = WriteLogEntriesResponse.newBuilder().build(); + EasyMock.expect(loggingRpcMock.write(request)).andReturn(ApiFutures.immediateFuture(response)); + EasyMock.replay(rpcFactoryMock, loggingRpcMock); + logging = options.getService(); + logging.setFlushSeverity(Severity.DEFAULT); + logging.write(ImmutableList.of(LOG_ENTRY1, LOG_ENTRY2)); + } + @Test public void testWriteLogEntriesWithOptions() { Map labels = ImmutableMap.of("key", "value"); diff --git a/google-cloud-clients/google-cloud-monitoring/README.md b/google-cloud-clients/google-cloud-monitoring/README.md index 6972e489c07d..ab7211f4c101 100644 --- a/google-cloud-clients/google-cloud-monitoring/README.md +++ b/google-cloud-clients/google-cloud-monitoring/README.md @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-monitoring - 1.56.0 + 1.58.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-monitoring:1.56.0' +compile 'com.google.cloud:google-cloud-monitoring:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-monitoring" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-monitoring" % "1.58.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-monitoring/pom.xml b/google-cloud-clients/google-cloud-monitoring/pom.xml index 8d4a23811cf9..6f7dd158b4c7 100644 --- a/google-cloud-clients/google-cloud-monitoring/pom.xml +++ b/google-cloud-clients/google-cloud-monitoring/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-monitoring - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Monitoring https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-monitoring @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-monitoring diff --git a/google-cloud-clients/google-cloud-notification/README.md b/google-cloud-clients/google-cloud-notification/README.md index 97cd5410948a..7f051577ec31 100644 --- a/google-cloud-clients/google-cloud-notification/README.md +++ b/google-cloud-clients/google-cloud-notification/README.md @@ -17,16 +17,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-notification - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-notification:0.74.0-beta' +compile 'com.google.cloud:google-cloud-notification:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-notification" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-notification" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-notification/pom.xml b/google-cloud-clients/google-cloud-notification/pom.xml index fe54cf8f5451..63e2d30e1018 100644 --- a/google-cloud-clients/google-cloud-notification/pom.xml +++ b/google-cloud-clients/google-cloud-notification/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-notification - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Pub/Sub Notifications for GCS https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-notification @@ -15,7 +15,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-notification diff --git a/google-cloud-clients/google-cloud-os-login/README.md b/google-cloud-clients/google-cloud-os-login/README.md index b66ad10101d4..a1ec63a184a0 100644 --- a/google-cloud-clients/google-cloud-os-login/README.md +++ b/google-cloud-clients/google-cloud-os-login/README.md @@ -22,16 +22,16 @@ Add this to your pom.xml file com.google.cloud google-cloud-os-login - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-os-login:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-os-login:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-os-login" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-os-login" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-os-login/pom.xml b/google-cloud-clients/google-cloud-os-login/pom.xml index cccbcfb7cdb8..a40904954a56 100644 --- a/google-cloud-clients/google-cloud-os-login/pom.xml +++ b/google-cloud-clients/google-cloud-os-login/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-os-login - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud OS Login https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-os-login @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-os-login diff --git a/google-cloud-clients/google-cloud-pubsub/README.md b/google-cloud-clients/google-cloud-pubsub/README.md index ce4754e16275..c0550d5f0240 100644 --- a/google-cloud-clients/google-cloud-pubsub/README.md +++ b/google-cloud-clients/google-cloud-pubsub/README.md @@ -19,16 +19,16 @@ Add this to your pom.xml file com.google.cloud google-cloud-pubsub - 1.56.0 + 1.58.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-pubsub:1.56.0' +compile 'com.google.cloud:google-cloud-pubsub:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.58.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-pubsub/pom.xml b/google-cloud-clients/google-cloud-pubsub/pom.xml index 48515dd7e226..af186cc14c99 100644 --- a/google-cloud-clients/google-cloud-pubsub/pom.xml +++ b/google-cloud-clients/google-cloud-pubsub/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-pubsub - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Pub/Sub https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-pubsub @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-pubsub diff --git a/google-cloud-clients/google-cloud-redis/README.md b/google-cloud-clients/google-cloud-redis/README.md index bcbc83117dbd..42cd401072f4 100644 --- a/google-cloud-clients/google-cloud-redis/README.md +++ b/google-cloud-clients/google-cloud-redis/README.md @@ -22,16 +22,16 @@ Add this to your pom.xml file com.google.cloud google-cloud-redis - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-redis:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-redis:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-redis" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-redis" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-redis/pom.xml b/google-cloud-clients/google-cloud-redis/pom.xml index d1b579b70210..e5e33678cfc9 100644 --- a/google-cloud-clients/google-cloud-redis/pom.xml +++ b/google-cloud-clients/google-cloud-redis/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-redis - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Redis https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-redis @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-redis diff --git a/google-cloud-clients/google-cloud-resourcemanager/README.md b/google-cloud-clients/google-cloud-resourcemanager/README.md index 1964d833cf3f..660ac286860b 100644 --- a/google-cloud-clients/google-cloud-resourcemanager/README.md +++ b/google-cloud-clients/google-cloud-resourcemanager/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-resourcemanager - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-resourcemanager:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-resourcemanager:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-resourcemanager" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-resourcemanager" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-resourcemanager/pom.xml b/google-cloud-clients/google-cloud-resourcemanager/pom.xml index 7219feb091ff..758690c93d88 100644 --- a/google-cloud-clients/google-cloud-resourcemanager/pom.xml +++ b/google-cloud-clients/google-cloud-resourcemanager/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-resourcemanager - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Resource Manager https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-resourcemanager @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-resourcemanager diff --git a/google-cloud-clients/google-cloud-scheduler/README.md b/google-cloud-clients/google-cloud-scheduler/README.md index c10f4de04721..c27f64f0e2a8 100644 --- a/google-cloud-clients/google-cloud-scheduler/README.md +++ b/google-cloud-clients/google-cloud-scheduler/README.md @@ -22,16 +22,16 @@ Add this to your pom.xml file com.google.cloud google-cloud-scheduler - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-scheduler:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-scheduler:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-scheduler" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-scheduler" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-scheduler/pom.xml b/google-cloud-clients/google-cloud-scheduler/pom.xml index 1b2ce3b578bd..690cb244c071 100644 --- a/google-cloud-clients/google-cloud-scheduler/pom.xml +++ b/google-cloud-clients/google-cloud-scheduler/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-scheduler - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Scheduler https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-scheduler @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-scheduler diff --git a/google-cloud-clients/google-cloud-securitycenter/README.md b/google-cloud-clients/google-cloud-securitycenter/README.md index a54b099b2501..2502bc78a65d 100644 --- a/google-cloud-clients/google-cloud-securitycenter/README.md +++ b/google-cloud-clients/google-cloud-securitycenter/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-securitycenter - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-securitycenter:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-securitycenter:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-securitycenter/pom.xml b/google-cloud-clients/google-cloud-securitycenter/pom.xml index af9bd783d902..2fd6c4ed980a 100644 --- a/google-cloud-clients/google-cloud-securitycenter/pom.xml +++ b/google-cloud-clients/google-cloud-securitycenter/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-securitycenter - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Security Command Center https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-securitycenter @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-securitycenter diff --git a/google-cloud-clients/google-cloud-securitycenter/synth.metadata b/google-cloud-clients/google-cloud-securitycenter/synth.metadata index 2bd4f07a69a5..ab3fde98056b 100644 --- a/google-cloud-clients/google-cloud-securitycenter/synth.metadata +++ b/google-cloud-clients/google-cloud-securitycenter/synth.metadata @@ -1,27 +1,32 @@ { + "updateTime": "2019-01-04T08:46:44.268721Z", "sources": [ { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5a57f0c13a358b2b15452bf2d67453774a5f6d4f", - "internalRef": "221837528" + "generator": { + "name": "artman", + "version": "0.16.4", + "dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857" } }, { "git": { - "name": "googleapis-private", - "remote": "https://github.com/googleapis/googleapis-private.git", - "sha": "6aa8e1a447bb8d0367150356a28cb4d3f2332641", - "internalRef": "221340946" + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "4930597beb4d26be020513af985506b39d4b73cd", + "internalRef": "227765328" } - }, + } + ], + "destinations": [ { - "generator": { - "name": "artman", - "version": "0.16.0", - "dockerImage": "googleapis/artman@sha256:90f9d15e9bad675aeecd586725bce48f5667ffe7d5fc4d1e96d51ff34304815b" + "client": { + "source": "googleapis", + "apiName": "securitycenter", + "apiVersion": "v1beta1", + "language": "java", + "generator": "gapic", + "config": "google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml" } } ] -} +} \ No newline at end of file diff --git a/google-cloud-clients/google-cloud-spanner/README.md b/google-cloud-clients/google-cloud-spanner/README.md index a720643bdd96..bed834b61850 100644 --- a/google-cloud-clients/google-cloud-spanner/README.md +++ b/google-cloud-clients/google-cloud-spanner/README.md @@ -20,16 +20,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-spanner - 1.1.0 + 1.3.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-spanner:1.1.0' +compile 'com.google.cloud:google-cloud-spanner:1.3.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "1.1.0" +libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "1.3.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-spanner/pom.xml b/google-cloud-clients/google-cloud-spanner/pom.xml index 48e2a89c4645..8d27fef52ce3 100644 --- a/google-cloud-clients/google-cloud-spanner/pom.xml +++ b/google-cloud-clients/google-cloud-spanner/pom.xml @@ -4,7 +4,7 @@ http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 google-cloud-spanner - 1.1.1-SNAPSHOT + 1.3.0 jar Google Cloud Spanner https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-spanner @@ -14,7 +14,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-spanner diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java index 607f3fd3e41a..5469699abd63 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java @@ -107,6 +107,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; import java.util.concurrent.Future; +import java.util.concurrent.ScheduledExecutorService; import javax.annotation.Nullable; import org.threeten.bp.Duration; @@ -139,6 +140,8 @@ public class GapicSpannerRpc implements SpannerRpc { private final Duration checkInterval = systemProperty(PROPERTY_PERIOD_SECONDS, DEFAULT_PERIOD_SECONDS); + private final ScheduledExecutorService spannerWatchdog; + public static GapicSpannerRpc create(SpannerOptions options) { return new GapicSpannerRpc(options); } @@ -191,14 +194,15 @@ public GapicSpannerRpc(SpannerOptions options) { CredentialsProvider credentialsProvider = GrpcTransportOptions.setUpCredentialsProvider(options); + spannerWatchdog = + Executors.newSingleThreadScheduledExecutor( + new ThreadFactoryBuilder() + .setDaemon(true) + .setNameFormat("Cloud-Spanner-WatchdogProvider-%d") + .build()); WatchdogProvider watchdogProvider = InstantiatingWatchdogProvider.create() - .withExecutor( - Executors.newSingleThreadScheduledExecutor( - new ThreadFactoryBuilder() - .setDaemon(true) - .setNameFormat("Cloud-Spanner-WatchdogProvider-%d") - .build())) + .withExecutor(spannerWatchdog) .withCheckInterval(checkInterval) .withClock(NanoClock.getDefaultClock()); @@ -572,6 +576,7 @@ public void shutdown() { this.spannerStub.close(); this.instanceAdminStub.close(); this.databaseAdminStub.close(); + this.spannerWatchdog.shutdown(); } /** diff --git a/google-cloud-clients/google-cloud-speech/README.md b/google-cloud-clients/google-cloud-speech/README.md index b50968e2563f..344e9e3129e8 100644 --- a/google-cloud-clients/google-cloud-speech/README.md +++ b/google-cloud-clients/google-cloud-speech/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-speech - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-speech:0.74.0-beta' +compile 'com.google.cloud:google-cloud-speech:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-speech" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-speech" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-speech/pom.xml b/google-cloud-clients/google-cloud-speech/pom.xml index ca981a16b1d4..f04085ccaab8 100644 --- a/google-cloud-clients/google-cloud-speech/pom.xml +++ b/google-cloud-clients/google-cloud-speech/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-speech - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Speech https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-speech @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-speech diff --git a/google-cloud-clients/google-cloud-storage/README.md b/google-cloud-clients/google-cloud-storage/README.md index d2e73f1947bd..5ecba77c4410 100644 --- a/google-cloud-clients/google-cloud-storage/README.md +++ b/google-cloud-clients/google-cloud-storage/README.md @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-storage - 1.56.0 + 1.58.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-storage:1.56.0' +compile 'com.google.cloud:google-cloud-storage:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "1.58.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-storage/pom.xml b/google-cloud-clients/google-cloud-storage/pom.xml index 2fca3c789ae1..9906b84233e1 100644 --- a/google-cloud-clients/google-cloud-storage/pom.xml +++ b/google-cloud-clients/google-cloud-storage/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-storage - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Storage https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-storage @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-storage diff --git a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Option.java b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Option.java index 9ee22a5eb619..6bb872d1ef7b 100644 --- a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Option.java +++ b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Option.java @@ -24,7 +24,7 @@ import java.util.Objects; /** Base class for Storage operation option. */ -abstract class Option implements Serializable { +public abstract class Option implements Serializable { private static final long serialVersionUID = -73199088766477208L; diff --git a/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java b/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java index aba71eb7ddb9..3a97dab2800d 100644 --- a/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java +++ b/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java @@ -120,6 +120,7 @@ import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.junit.AfterClass; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; public class ITStorageTest { @@ -1271,7 +1272,8 @@ public void testRotateFromCustomerEncryptionToKmsKey() { } @Test - public void testRotateFromCustomerEncryptionToKmsKeyWithCustomerEncrytion() { + @Ignore + public void testRotateFromCustomerEncryptionToKmsKeyWithCustomerEncryption() { String sourceBlobName = "test-copy-blob-encryption-key-source"; BlobId source = BlobId.of(BUCKET, sourceBlobName); ImmutableMap metadata = ImmutableMap.of("k", "v"); diff --git a/google-cloud-clients/google-cloud-tasks/README.md b/google-cloud-clients/google-cloud-tasks/README.md index f1ba66f792f8..3ae839a2289a 100644 --- a/google-cloud-clients/google-cloud-tasks/README.md +++ b/google-cloud-clients/google-cloud-tasks/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-tasks - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-tasks:0.74.0-beta' +compile 'com.google.cloud:google-cloud-tasks:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-tasks" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-tasks" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-tasks/pom.xml b/google-cloud-clients/google-cloud-tasks/pom.xml index 49c9ef8a20fd..6c42f7827405 100644 --- a/google-cloud-clients/google-cloud-tasks/pom.xml +++ b/google-cloud-clients/google-cloud-tasks/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-tasks - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Tasks https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-clients/google-cloud-tasks @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-tasks-v2beta2 diff --git a/google-cloud-clients/google-cloud-texttospeech/README.md b/google-cloud-clients/google-cloud-texttospeech/README.md index a4b6a2be2a50..d45f46c45110 100644 --- a/google-cloud-clients/google-cloud-texttospeech/README.md +++ b/google-cloud-clients/google-cloud-texttospeech/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-texttospeech - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-texttospeech:0.74.0-beta' +compile 'com.google.cloud:google-cloud-texttospeech:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-texttospeech" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-texttospeech" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-texttospeech/pom.xml b/google-cloud-clients/google-cloud-texttospeech/pom.xml index c7e437d21bc6..d2919655b578 100644 --- a/google-cloud-clients/google-cloud-texttospeech/pom.xml +++ b/google-cloud-clients/google-cloud-texttospeech/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-texttospeech - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Text-to-Speech https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-texttospeech @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-texttospeech-v1beta1 diff --git a/google-cloud-clients/google-cloud-trace/README.md b/google-cloud-clients/google-cloud-trace/README.md index c44032253007..9d216da3356d 100644 --- a/google-cloud-clients/google-cloud-trace/README.md +++ b/google-cloud-clients/google-cloud-trace/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-trace - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-trace:0.74.0-beta' +compile 'com.google.cloud:google-cloud-trace:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-trace" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-trace" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-trace/pom.xml b/google-cloud-clients/google-cloud-trace/pom.xml index 1706e27a32bf..b60e37546492 100644 --- a/google-cloud-clients/google-cloud-trace/pom.xml +++ b/google-cloud-clients/google-cloud-trace/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-trace - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Trace https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-trace @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-trace diff --git a/google-cloud-clients/google-cloud-translate/README.md b/google-cloud-clients/google-cloud-translate/README.md index a8e1fdf255aa..5c447a66218d 100644 --- a/google-cloud-clients/google-cloud-translate/README.md +++ b/google-cloud-clients/google-cloud-translate/README.md @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-translate - 1.56.0 + 1.58.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-translate:1.56.0' +compile 'com.google.cloud:google-cloud-translate:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "1.58.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-translate/pom.xml b/google-cloud-clients/google-cloud-translate/pom.xml index 81082cfd22a5..f3f2c7f25e51 100644 --- a/google-cloud-clients/google-cloud-translate/pom.xml +++ b/google-cloud-clients/google-cloud-translate/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-translate - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Translation https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-translate @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-translate diff --git a/google-cloud-clients/google-cloud-video-intelligence/README.md b/google-cloud-clients/google-cloud-video-intelligence/README.md index 0ea96b04a420..a8765f810b58 100644 --- a/google-cloud-clients/google-cloud-video-intelligence/README.md +++ b/google-cloud-clients/google-cloud-video-intelligence/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-video-intelligence - 0.74.0-beta + 0.76.0-beta ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-video-intelligence:0.74.0-beta' +compile 'com.google.cloud:google-cloud-video-intelligence:0.76.0-beta' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-video-intelligence" % "0.74.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-video-intelligence" % "0.76.0-beta" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-video-intelligence/pom.xml b/google-cloud-clients/google-cloud-video-intelligence/pom.xml index 86fbad13efdb..a03091277fe4 100644 --- a/google-cloud-clients/google-cloud-video-intelligence/pom.xml +++ b/google-cloud-clients/google-cloud-video-intelligence/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-video-intelligence - 0.74.1-beta-SNAPSHOT + 0.76.0-beta jar Google Cloud Video Intelligence https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-video-intelligence @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-video-intelligence diff --git a/google-cloud-clients/google-cloud-vision/README.md b/google-cloud-clients/google-cloud-vision/README.md index 0ba7051614cf..c2f20d163bbf 100644 --- a/google-cloud-clients/google-cloud-vision/README.md +++ b/google-cloud-clients/google-cloud-vision/README.md @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-vision - 1.56.0 + 1.58.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-vision:1.56.0' +compile 'com.google.cloud:google-cloud-vision:1.58.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "1.56.0" +libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "1.58.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-vision/pom.xml b/google-cloud-clients/google-cloud-vision/pom.xml index ccba452f6851..ca06ecc2bbb6 100644 --- a/google-cloud-clients/google-cloud-vision/pom.xml +++ b/google-cloud-clients/google-cloud-vision/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-vision - 1.56.1-SNAPSHOT + 1.58.0 jar Google Cloud Vision https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-vision @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-vision diff --git a/google-cloud-clients/google-cloud-websecurityscanner/README.md b/google-cloud-clients/google-cloud-websecurityscanner/README.md index 2ccc55de1174..9b63eb44fc39 100644 --- a/google-cloud-clients/google-cloud-websecurityscanner/README.md +++ b/google-cloud-clients/google-cloud-websecurityscanner/README.md @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-websecurityscanner - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-websecurityscanner:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-websecurityscanner:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-websecurityscanner" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-websecurityscanner" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-clients/google-cloud-websecurityscanner/pom.xml b/google-cloud-clients/google-cloud-websecurityscanner/pom.xml index 2be2a193adae..51ebb79023ab 100644 --- a/google-cloud-clients/google-cloud-websecurityscanner/pom.xml +++ b/google-cloud-clients/google-cloud-websecurityscanner/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-websecurityscanner - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Web Security Scanner https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-websecurityscanner @@ -12,7 +12,7 @@ com.google.cloud google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-websecurityscanner diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index 9f1dd51d3b28..154e48396700 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-clients pom - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha Google Cloud https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients @@ -152,7 +152,7 @@ UTF-8 github google-cloud-clients - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha 1.27.0 1.35.1 1.7.0 @@ -238,7 +238,7 @@ com.google.cloud google-cloud-core - 1.56.1-SNAPSHOT + 1.58.0 test-jar @@ -700,90 +700,6 @@ 3.4 true - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.8.1 - - - - index - dependency-info - project-team - cim - issue-tracking - license - scm - dependency-management - distribution-management - summary - modules - - - - - true - true - true - true - ${site.installationModule} - jar - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.1 - - - html - - javadoc - - - - - none - true - protected - true - ${project.build.directory}/javadoc - - - API packages - com.google.cloud* - - - Test helpers packages - com.google.cloud.bigquery.testing:com.google.cloud.testing:com.google.cloud.datastore.testing:com.google.cloud.dns.testing:com.google.cloud.logging.testing:com.google.cloud.pubsub.testing:com.google.cloud.resourcemanager.testing:com.google.cloud.storage.testing:com.google.cloud.translate.testing:com.google.cloud.spanner.testing:com.google.cloud.storage.contrib.nio.testing - - - Example packages - com.google.cloud.examples.*:com.google.cloud.nio.examples - - - SPI packages - com.google.cloud.spi*:com.google.cloud.bigquery.spi*:com.google.cloud.datastore.spi*:com.google.cloud.dns.spi*:com.google.cloud.firestore.spi*:com.google.cloud.logging.spi*:com.google.cloud.resourcemanager.spi*:com.google.cloud.spanner.spi*:com.google.cloud.storage.spi*:com.google.cloud.translate.spi* - - - Stub packages - com.google.cloud.asset.v1beta1.stub:com.google.cloud.automl.v1beta1.stub:com.google.cloud.bigquerydatatransfer.v1.stub:com.google.cloud.bigquerystorage.v1beta1.stub:com.google.cloud.bigtable-admin.v2.stub:com.google.cloud.bigtable.v2.stub:com.google.cloud.container.v1.stub:com.google.cloud.containeranalysis.v1beta1.stub:com.google.cloud.dataproc.v1.stub:com.google.cloud.dataproc.v1beta2.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.error-reporting.v1beta1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.iamcredentials.v1.stub:com.google.cloud.iot.v1.stub:com.google.cloud.kms.v1.stub:com.google.cloud.language.v1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.os-login.v1.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.redis.v1.stub:com.google.cloud.redis.v1beta1.stub:com.google.cloud.scheduler.v1beta1.stub:com.google.cloud.securitycenter.v1beta1.stub:com.google.cloud.spanner-admin-database.v1.stub:com.google.cloud.spanner-admin-instance.v1.stub:com.google.cloud.spanner.v1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1p1beta1.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.tasks.v2beta3.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.video-intelligence.v1.stub:com.google.cloud.video-intelligence.v1beta1.stub:com.google.cloud.video-intelligence.v1beta2.stub:com.google.cloud.video-intelligence.v1p1beta1.stub:com.google.cloud.video-intelligence.v1p2beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub:com.google.cloud.vision.v1p3beta1.stub:com.google.cloud.websecurityscanner.v1alpha.stub - - - Deprecated packages - com.google.cloud.compute.deprecated* - - - - https://developers.google.com/protocol-buffers/docs/reference/java/ - http://google.github.io/google-auth-library-java/releases/latest/apidocs/ - http://googleapis.github.io/gax-java/${gax.version}/apidocs/ - https://googleapis.github.io/api-common-java/${api.common.java.version}/apidocs/ - - - - @@ -813,7 +729,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 2.8.1 @@ -832,8 +748,6 @@ - true - true true true ${site.installationModule} @@ -848,6 +762,7 @@ html + aggregate javadoc @@ -942,6 +857,12 @@ sign + + + --pinentry-mode + loopback + + diff --git a/google-cloud-examples/README.md b/google-cloud-examples/README.md index c68a44f6f429..18e30d1aca2c 100644 --- a/google-cloud-examples/README.md +++ b/google-cloud-examples/README.md @@ -21,16 +21,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-examples - 0.74.0-alpha + 0.76.0-alpha ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-examples:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-examples:0.76.0-alpha' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-examples" % "0.74.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-examples" % "0.76.0-alpha" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-examples/pom.xml b/google-cloud-examples/pom.xml index 4aded1d268bb..4da81f8d9040 100644 --- a/google-cloud-examples/pom.xml +++ b/google-cloud-examples/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-examples - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Examples https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-examples @@ -18,7 +18,7 @@ com.google.cloud google-cloud-bom - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha pom import @@ -29,6 +29,14 @@ com.google.cloud google-cloud-bigquery + + com.google.cloud + google-cloud-bigtable-admin + + + com.google.cloud + google-cloud-bigtable + com.google.cloud google-cloud-compute @@ -188,7 +196,7 @@ 2.19.1 - **/IT*Snippets.java + **/IT*.java diff --git a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java b/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java new file mode 100644 index 000000000000..7d4ebde8787b --- /dev/null +++ b/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java @@ -0,0 +1,167 @@ +/* + * Copyright 2018 Google LLC. All Rights Reserved. + * + * 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. + */ +package com.google.cloud.examples.bigtable; + +import com.google.api.gax.rpc.NotFoundException; +import com.google.api.gax.rpc.ServerStream; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings; +import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.models.InstanceName; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.RowCell; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import java.io.IOException; + +public class HelloWorld { + + private static final String COLUMN_FAMILY = "cf1"; + private static final String COLUMN_QUALIFIER = "greeting"; + private static final String ROW_KEY_PREFIX = "rowKey"; + private final String tableId; + private final BigtableDataClient dataClient; + private final BigtableTableAdminClient adminClient; + + public static void main(String[] args) throws Exception { + + if (args.length != 2) { + System.out.println("Missing required project id or instance id"); + return; + } + String projectId = args[0]; + String instanceId = args[1]; + + HelloWorld helloWorld = new HelloWorld(projectId, instanceId, "test-table"); + helloWorld.run(); + } + + public HelloWorld(String projectId, String instanceId, String tableId) throws IOException { + this.tableId = tableId; + + // [START connecting_to_bigtable] + // Create the settings to configure a bigtable data client + BigtableDataSettings settings = + BigtableDataSettings.newBuilder() + .setInstanceName(InstanceName.of(projectId, instanceId)) + .build(); + + // Create bigtable data client + dataClient = BigtableDataClient.create(settings); + + // Create the settings to configure a bigtable table admin client + BigtableTableAdminSettings adminSettings = + BigtableTableAdminSettings.newBuilder() + .setInstanceName(com.google.bigtable.admin.v2.InstanceName.of(projectId, instanceId)) + .build(); + + // Create bigtable table admin client + adminClient = BigtableTableAdminClient.create(adminSettings); + // [END connecting_to_bigtable] + } + + public void run() throws Exception { + createTable(); + writeToTable(); + readSingleRow(); + readTable(); + deleteTable(); + dataClient.close(); + adminClient.close(); + } + + public void createTable() { + // [START creating_a_table] + // Check if table exists, create table if does not exist + if (!adminClient.exists(tableId)) { + System.out.println("Creating table: " + tableId); + CreateTableRequest createTableRequest = + CreateTableRequest.of(tableId).addFamily(COLUMN_FAMILY); + adminClient.createTable(createTableRequest); + System.out.printf("Table %s created successfully%n", tableId); + } + // [END creating_a_table] + } + + public void writeToTable() { + // [START writing_rows] + try { + System.out.println("\nWriting some greetings to the table"); + String[] greetings = {"Hello World!", "Hello Bigtable!", "Hello Java!"}; + for (int i = 0; i < greetings.length; i++) { + RowMutation rowMutation = + RowMutation.create(tableId, ROW_KEY_PREFIX + i) + .setCell(COLUMN_FAMILY, COLUMN_QUALIFIER, greetings[i]); + dataClient.mutateRow(rowMutation); + System.out.println(greetings[i]); + } + } catch (NotFoundException e) { + System.err.println("Failed to write to non-existent table: " + e.getMessage()); + } + // [END writing_rows] + } + + public void readSingleRow() { + // [START reading_a_row] + try { + System.out.println("\nReading a single row by row key"); + Row row = dataClient.readRow(tableId, ROW_KEY_PREFIX + 0); + System.out.println("Row: " + row.getKey().toStringUtf8()); + for (RowCell cell : row.getCells()) { + System.out.printf( + "Family: %s Qualifier: %s Value: %s%n", + cell.getFamily(), cell.getQualifier().toStringUtf8(), cell.getValue().toStringUtf8()); + } + } catch (NotFoundException e) { + System.err.println("Failed to read from a non-existent table: " + e.getMessage()); + } + // [END reading_a_row] + } + + public void readTable() { + // [START scanning_all_rows] + try { + System.out.println("\nReading the entire table"); + Query query = Query.create(tableId); + ServerStream rowStream = dataClient.readRows(query); + for (Row r : rowStream) { + System.out.println("Row Key: " + r.getKey().toStringUtf8()); + for (RowCell cell : r.getCells()) { + System.out.printf( + "Family: %s Qualifier: %s Value: %s%n", + cell.getFamily(), cell.getQualifier().toStringUtf8(), cell.getValue().toStringUtf8()); + } + } + } catch (NotFoundException e) { + System.err.println("Failed to read a non-existent table: " + e.getMessage()); + } + // [END scanning_all_rows] + } + + public void deleteTable() { + // [START deleting_a_table] + System.out.println("\nDeleting table: " + tableId); + try { + adminClient.deleteTable(tableId); + System.out.printf("Table %s deleted successfully%n", tableId); + } catch (NotFoundException e) { + System.err.println("Failed to delete a non-existent table: " + e.getMessage()); + } + // [END deleting_a_table] + } +} diff --git a/google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/UsePubSubEmulatorSnippet.java b/google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/UsePubSubEmulatorSnippet.java index a9690c945a71..311261b4fe74 100644 --- a/google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/UsePubSubEmulatorSnippet.java +++ b/google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/UsePubSubEmulatorSnippet.java @@ -39,7 +39,7 @@ public class UsePubSubEmulatorSnippet { public static void main(String... args) throws IOException { // [START use_pubsub_emulator] String hostport = System.getenv("PUBSUB_EMULATOR_HOST"); - ManagedChannel channel = ManagedChannelBuilder.forTarget(hostport).usePlaintext(true).build(); + ManagedChannel channel = ManagedChannelBuilder.forTarget(hostport).usePlaintext().build(); try { TransportChannelProvider channelProvider = FixedTransportChannelProvider.create(GrpcTransportChannel.create(channel)); diff --git a/google-cloud-examples/src/test/java/com/google/cloud/examples/bigtable/ITHelloWorld.java b/google-cloud-examples/src/test/java/com/google/cloud/examples/bigtable/ITHelloWorld.java new file mode 100644 index 000000000000..ba8010046fc0 --- /dev/null +++ b/google-cloud-examples/src/test/java/com/google/cloud/examples/bigtable/ITHelloWorld.java @@ -0,0 +1,145 @@ +/* + * Copyright 2018 Google LLC. All Rights Reserved. + * + * 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. + */ +package com.google.cloud.examples.bigtable; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings; +import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.models.InstanceName; +import com.google.cloud.bigtable.data.v2.models.Row; +import java.io.IOException; +import java.util.Random; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.AssumptionViolatedException; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ITHelloWorld { + + private static final String INSTANCE_PROPERTY_NAME = "bigtable.instance"; + private static final String TABLE_PREFIX = "table"; + private static String tableId; + private static BigtableDataClient dataClient; + private static BigtableTableAdminClient adminClient; + private static InstanceName instanceName; + private HelloWorld helloWorld; + + @BeforeClass + public static void beforeClass() throws IOException { + String targetInstance = System.getProperty(INSTANCE_PROPERTY_NAME); + if (targetInstance == null) { + dataClient = null; + adminClient = null; + return; + } + instanceName = InstanceName.parse(targetInstance); + BigtableDataSettings settings = + BigtableDataSettings.newBuilder().setInstanceName(instanceName).build(); + dataClient = BigtableDataClient.create(settings); + BigtableTableAdminSettings adminSettings = + BigtableTableAdminSettings.newBuilder() + .setInstanceName(com.google.bigtable.admin.v2.InstanceName.parse(targetInstance)) + .build(); + adminClient = BigtableTableAdminClient.create(adminSettings); + } + + @AfterClass + public static void afterClass() throws Exception { + garbageCollect(); + dataClient.close(); + adminClient.close(); + } + + @Before + public void setup() throws IOException { + if (adminClient == null || dataClient == null) { + throw new AssumptionViolatedException( + INSTANCE_PROPERTY_NAME + " property is not set, skipping integration tests."); + } + tableId = generateTableId(); + helloWorld = new HelloWorld(instanceName.getProject(), instanceName.getInstance(), tableId); + adminClient.createTable(CreateTableRequest.of(tableId).addFamily("cf1")); + } + + @After + public void after() { + if (adminClient.exists(tableId)) { + adminClient.deleteTable(tableId); + } + } + + @Test + public void testCreateAndDeleteTable() throws IOException { + // Create table + String fakeTable = generateTableId(); + HelloWorld testHelloWorld = + new HelloWorld(instanceName.getProject(), instanceName.getInstance(), fakeTable); + testHelloWorld.createTable(); + assertTrue(adminClient.exists(fakeTable)); + + // Delete table + testHelloWorld.deleteTable(); + assertTrue(!adminClient.exists(fakeTable)); + } + + @Test + public void testWriteToTable() { + // Write to table + helloWorld.writeToTable(); + Row row = dataClient.readRow(tableId, "rowKey0"); + assertNotNull(row); + } + + // TODO: add test for helloWorld.readSingleRow() + // TODO: add test for helloWorld.readTable() + + @Test + public void testRunDoesNotFail() throws Exception { + helloWorld.run(); + } + + private String generateTableId() { + return String.format( + "%s-%016x-%x", TABLE_PREFIX, System.currentTimeMillis(), new Random().nextLong()); + } + + private static void garbageCollect() { + Pattern timestampPattern = Pattern.compile(TABLE_PREFIX + "-([0-9a-f]+)-([0-9a-f]+)"); + for (String tableId : adminClient.listTables()) { + Matcher matcher = timestampPattern.matcher(tableId); + if (!matcher.matches()) { + continue; + } + String timestampStr = matcher.group(1); + long timestamp = Long.parseLong(timestampStr, 16); + if (System.currentTimeMillis() - timestamp < TimeUnit.MINUTES.toMillis(15)) { + continue; + } + System.out.println("\nGarbage collecting orphaned table: " + tableId); + adminClient.deleteTable(tableId); + } + } +} diff --git a/google-cloud-testing/google-cloud-appengineflexcompat/pom.xml b/google-cloud-testing/google-cloud-appengineflexcompat/pom.xml index 1d9b7b2068cf..511eefec6618 100644 --- a/google-cloud-testing/google-cloud-appengineflexcompat/pom.xml +++ b/google-cloud-testing/google-cloud-appengineflexcompat/pom.xml @@ -4,13 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-appengineflexcompat - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha war google-cloud-testing com.google.cloud - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha diff --git a/google-cloud-testing/google-cloud-appengineflexcustom/pom.xml b/google-cloud-testing/google-cloud-appengineflexcustom/pom.xml index 2e49e8c4ec3e..98a87df5d849 100644 --- a/google-cloud-testing/google-cloud-appengineflexcustom/pom.xml +++ b/google-cloud-testing/google-cloud-appengineflexcustom/pom.xml @@ -4,13 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-appengineflexcustom - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha war google-cloud-testing com.google.cloud - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha diff --git a/google-cloud-testing/google-cloud-appengineflexjava/pom.xml b/google-cloud-testing/google-cloud-appengineflexjava/pom.xml index 742e6a9cf5b5..b742e0f83cb4 100644 --- a/google-cloud-testing/google-cloud-appengineflexjava/pom.xml +++ b/google-cloud-testing/google-cloud-appengineflexjava/pom.xml @@ -4,13 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-appengineflexjava - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha war google-cloud-testing com.google.cloud - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha diff --git a/google-cloud-testing/google-cloud-appenginejava8/pom.xml b/google-cloud-testing/google-cloud-appenginejava8/pom.xml index 87101588592b..f26b85537260 100644 --- a/google-cloud-testing/google-cloud-appenginejava8/pom.xml +++ b/google-cloud-testing/google-cloud-appenginejava8/pom.xml @@ -4,13 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-appenginejava8 - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha war google-cloud-testing com.google.cloud - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha diff --git a/google-cloud-testing/google-cloud-bigtable-emulator/README.md b/google-cloud-testing/google-cloud-bigtable-emulator/README.md index 5981b0c1ae63..bb8aa8c3d938 100644 --- a/google-cloud-testing/google-cloud-bigtable-emulator/README.md +++ b/google-cloud-testing/google-cloud-bigtable-emulator/README.md @@ -19,7 +19,7 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-bom - 0.74.0-alpha + 0.76.0-alpha pom import @@ -53,16 +53,16 @@ If you are using Maven, add this to your pom.xml file If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-bigtable:0.74.0-alpha' -compile 'com.google.cloud:google-cloud-bigtable-admin:0.74.0-alpha' -testCompile 'com.google.cloud:google-cloud-bigtable-emulator:0.74.0-alpha' +compile 'com.google.cloud:google-cloud-bigtable:0.76.0-alpha' +compile 'com.google.cloud:google-cloud-bigtable-admin:0.76.0-alpha' +testCompile 'com.google.cloud:google-cloud-bigtable-emulator:0.76.0-alpha' testCompile 'junit:junit:4.12' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "0.74.0-alpha" -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable-admin" % "0.74.0-alpha" -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable-emulator" % "0.74.0-alpha" % Test +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "0.76.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable-admin" % "0.76.0-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable-emulator" % "0.76.0-alpha" % Test libraryDependencies += "junit" % "junit" % "4.12" % Test ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-testing/google-cloud-bigtable-emulator/pom.xml b/google-cloud-testing/google-cloud-bigtable-emulator/pom.xml index 8c8d33cbbc23..07dc48ae899a 100644 --- a/google-cloud-testing/google-cloud-bigtable-emulator/pom.xml +++ b/google-cloud-testing/google-cloud-bigtable-emulator/pom.xml @@ -6,7 +6,7 @@ com.google.cloud google-cloud-bigtable-emulator - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha Google Cloud Java - Bigtable Emulator https://github.com/googleapis/google-cloud-java @@ -69,7 +69,7 @@ com.google.cloud google-cloud-gcloud-maven-plugin - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha @@ -121,7 +121,7 @@ com.google.cloud google-cloud-bom - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha pom import @@ -225,6 +225,12 @@ sign + + + --pinentry-mode + loopback + + diff --git a/google-cloud-testing/google-cloud-gcloud-maven-plugin/pom.xml b/google-cloud-testing/google-cloud-gcloud-maven-plugin/pom.xml index 706da7395f2a..6fcde259c525 100644 --- a/google-cloud-testing/google-cloud-gcloud-maven-plugin/pom.xml +++ b/google-cloud-testing/google-cloud-gcloud-maven-plugin/pom.xml @@ -7,11 +7,11 @@ google-cloud-testing com.google.cloud - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-gcloud-maven-plugin - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha maven-plugin Experimental Maven plugin to interact with the Google Cloud SDK (https://cloud.google.com/sdk/). Currently this plugin is meant to be an internal implementation diff --git a/google-cloud-testing/google-cloud-managedtest/pom.xml b/google-cloud-testing/google-cloud-managedtest/pom.xml index bda198cfb33a..8cca0cbf9515 100644 --- a/google-cloud-testing/google-cloud-managedtest/pom.xml +++ b/google-cloud-testing/google-cloud-managedtest/pom.xml @@ -4,13 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-managedtest - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar google-cloud-testing com.google.cloud - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha diff --git a/google-cloud-testing/pom.xml b/google-cloud-testing/pom.xml index c8b0585479d2..40916fdf4254 100644 --- a/google-cloud-testing/pom.xml +++ b/google-cloud-testing/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.google.cloud google-cloud-testing - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha pom Google Cloud Testing @@ -32,14 +32,14 @@ com.google.cloud google-cloud-bom - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha pom import com.google.cloud google-cloud-core - 1.56.1-SNAPSHOT + 1.58.0 test-jar diff --git a/google-cloud-util/google-cloud-compat-checker/pom.xml b/google-cloud-util/google-cloud-compat-checker/pom.xml index e103da694989..ba8d87f95a3c 100644 --- a/google-cloud-util/google-cloud-compat-checker/pom.xml +++ b/google-cloud-util/google-cloud-compat-checker/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-compat-checker - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha jar Google Cloud Java Compatibility Checker https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-util/google-cloud-compat-checker @@ -12,7 +12,7 @@ com.google.cloud google-cloud-util - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha google-cloud-compat-checker diff --git a/google-cloud-util/pom.xml b/google-cloud-util/pom.xml index 40ee7c51d028..389d5516b119 100644 --- a/google-cloud-util/pom.xml +++ b/google-cloud-util/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-util - 0.74.1-alpha-SNAPSHOT + 0.76.0-alpha pom Google Cloud Util https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-util diff --git a/utilities/new_client.py b/utilities/new_client.py index 9b3ddcb1ae9a..43fb4b776514 100644 --- a/utilities/new_client.py +++ b/utilities/new_client.py @@ -206,7 +206,7 @@ def update_stub_packages(ctx: Context) -> None: def write_readme(ctx: Context) -> None: """Creates a README.md from a template.""" - template = ctx.jinja_env.get_template("README.md") + template = ctx.jinja_env.get_template("README.md.tmpl") pom = template.stream( api_version=ctx.api_version, description=ctx.description, diff --git a/utilities/templates/README.md b/utilities/templates/README.md.tmpl similarity index 100% rename from utilities/templates/README.md rename to utilities/templates/README.md.tmpl diff --git a/versions.txt b/versions.txt index 66ea91b670b3..dc3a7cb1b4e2 100644 --- a/versions.txt +++ b/versions.txt @@ -1,166 +1,166 @@ # Format: # module:released-version:current-version -google-api-grpc:0.39.0:0.39.1-SNAPSHOT -google-cloud:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-appengineflexcompat:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-appengineflexcustom:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-appengineflexjava:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-appenginejava8:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-asset:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-automl:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-bigquery:1.56.0:1.56.1-SNAPSHOT -google-cloud-bigquerydatatransfer:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-bigquerystorage:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-bigtable:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-bigtable-admin:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-bigtable-emulator:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-bom:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-clients:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-compat-checker:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-compute:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-container:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-containeranalysis:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-contrib:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-core:1.56.0:1.56.1-SNAPSHOT -google-cloud-core-grpc:1.56.0:1.56.1-SNAPSHOT -google-cloud-core-http:1.56.0:1.56.1-SNAPSHOT -google-cloud-dataproc:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-datastore:1.56.0:1.56.1-SNAPSHOT -google-cloud-dialogflow:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-dlp:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-dns:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-errorreporting:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-examples:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-firestore:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-gcloud-maven-plugin:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-iamcredentials:0.1.0-alpha:0.1.1-alpha-SNAPSHOT -google-cloud-iot:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-kms:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-language:1.56.0:1.56.1-SNAPSHOT -google-cloud-logging:1.56.0:1.56.1-SNAPSHOT -google-cloud-logging-logback:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-managedtest:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-monitoring:1.56.0:1.56.1-SNAPSHOT -google-cloud-nio:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-nio-examples:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-notification:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-os-login:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-pubsub:1.56.0:1.56.1-SNAPSHOT -google-cloud-redis:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-resourcemanager:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-scheduler:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-securitycenter:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-spanner:1.1.0:1.1.1-SNAPSHOT -google-cloud-speech:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-storage:1.56.0:1.56.1-SNAPSHOT -google-cloud-tasks:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-testing:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-texttospeech:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-trace:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-translate:1.56.0:1.56.1-SNAPSHOT -google-cloud-util:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -google-cloud-video-intelligence:0.74.0-beta:0.74.1-beta-SNAPSHOT -google-cloud-vision:1.56.0:1.56.1-SNAPSHOT -google-cloud-websecurityscanner:0.74.0-alpha:0.74.1-alpha-SNAPSHOT -grpc-google-cloud-asset-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-automl-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-bigquerydatatransfer-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-bigquerystorage-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-bigtable-admin-v2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-bigtable-v2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-container-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-containeranalysis-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-dataproc-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-dataproc-v1beta2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-dialogflow-v2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-dialogflow-v2beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-dlp-v2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-error-reporting-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-firestore-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-iamcredentials-v1:0.1.0-alpha:0.1.1-alpha-SNAPSHOT -grpc-google-cloud-iot-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-kms-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-language-v1:1.38.0:1.38.1-SNAPSHOT -grpc-google-cloud-language-v1beta2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-logging-v2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-monitoring-v3:1.38.0:1.38.1-SNAPSHOT -grpc-google-cloud-os-login-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-pubsub-v1:1.38.0:1.38.1-SNAPSHOT -grpc-google-cloud-redis-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-redis-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-scheduler-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-securitycenter-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-spanner-admin-database-v1:1.1.0:1.1.1-SNAPSHOT -grpc-google-cloud-spanner-admin-instance-v1:1.1.0:1.1.1-SNAPSHOT -grpc-google-cloud-spanner-v1:1.1.0:1.1.1-SNAPSHOT -grpc-google-cloud-speech-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-speech-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-speech-v1p1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-tasks-v2beta2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-tasks-v2beta3:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-texttospeech-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-texttospeech-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-trace-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-trace-v2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-video-intelligence-v1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-video-intelligence-v1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-video-intelligence-v1beta2:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-video-intelligence-v1p1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-video-intelligence-v1p2beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-vision-v1:1.38.0:1.38.1-SNAPSHOT -grpc-google-cloud-vision-v1p1beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-vision-v1p2beta1:1.38.0:1.38.1-SNAPSHOT -grpc-google-cloud-vision-v1p3beta1:0.39.0:0.39.1-SNAPSHOT -grpc-google-cloud-websecurityscanner-v1alpha:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-asset-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-automl-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-bigquerydatatransfer-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-bigquerystorage-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-bigtable-admin-v2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-bigtable-v2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-container-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-containeranalysis-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-dataproc-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-dataproc-v1beta2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-datastore-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-dialogflow-v2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-dialogflow-v2beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-dlp-v2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-error-reporting-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-firestore-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-iamcredentials-v1:0.1.0-alpha:0.1.1-alpha-SNAPSHOT -proto-google-cloud-iot-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-kms-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-language-v1:1.38.0:1.38.1-SNAPSHOT -proto-google-cloud-language-v1beta2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-logging-v2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-monitoring-v3:1.38.0:1.38.1-SNAPSHOT -proto-google-cloud-os-login-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-pubsub-v1:1.38.0:1.38.1-SNAPSHOT -proto-google-cloud-redis-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-redis-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-scheduler-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-securitycenter-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-spanner-admin-database-v1:1.1.0:1.1.1-SNAPSHOT -proto-google-cloud-spanner-admin-instance-v1:1.1.0:1.1.1-SNAPSHOT -proto-google-cloud-spanner-v1:1.1.0:1.1.1-SNAPSHOT -proto-google-cloud-speech-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-speech-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-speech-v1p1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-tasks-v2beta2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-tasks-v2beta3:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-texttospeech-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-texttospeech-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-trace-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-trace-v2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-video-intelligence-v1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-video-intelligence-v1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-video-intelligence-v1beta2:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-video-intelligence-v1p1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-video-intelligence-v1p2beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-vision-v1:1.38.0:1.38.1-SNAPSHOT -proto-google-cloud-vision-v1p1beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-vision-v1p2beta1:1.38.0:1.38.1-SNAPSHOT -proto-google-cloud-vision-v1p3beta1:0.39.0:0.39.1-SNAPSHOT -proto-google-cloud-websecurityscanner-v1alpha:0.39.0:0.39.1-SNAPSHOT +google-api-grpc:0.41.0:0.41.0 +google-cloud:0.76.0-alpha:0.76.0-alpha +google-cloud-appengineflexcompat:0.76.0-alpha:0.76.0-alpha +google-cloud-appengineflexcustom:0.76.0-alpha:0.76.0-alpha +google-cloud-appengineflexjava:0.76.0-alpha:0.76.0-alpha +google-cloud-appenginejava8:0.76.0-alpha:0.76.0-alpha +google-cloud-asset:0.76.0-beta:0.76.0-beta +google-cloud-automl:0.76.0-beta:0.76.0-beta +google-cloud-bigquery:1.58.0:1.58.0 +google-cloud-bigquerydatatransfer:0.76.0-beta:0.76.0-beta +google-cloud-bigquerystorage:0.76.0-beta:0.76.0-beta +google-cloud-bigtable:0.76.0-alpha:0.76.0-alpha +google-cloud-bigtable-admin:0.76.0-alpha:0.76.0-alpha +google-cloud-bigtable-emulator:0.76.0-alpha:0.76.0-alpha +google-cloud-bom:0.76.0-alpha:0.76.0-alpha +google-cloud-clients:0.76.0-alpha:0.76.0-alpha +google-cloud-compat-checker:0.76.0-alpha:0.76.0-alpha +google-cloud-compute:0.76.0-alpha:0.76.0-alpha +google-cloud-container:0.76.0-beta:0.76.0-beta +google-cloud-containeranalysis:0.76.0-beta:0.76.0-beta +google-cloud-contrib:0.76.0-alpha:0.76.0-alpha +google-cloud-core:1.58.0:1.58.0 +google-cloud-core-grpc:1.58.0:1.58.0 +google-cloud-core-http:1.58.0:1.58.0 +google-cloud-dataproc:0.76.0-alpha:0.76.0-alpha +google-cloud-datastore:1.58.0:1.58.0 +google-cloud-dialogflow:0.76.0-alpha:0.76.0-alpha +google-cloud-dlp:0.76.0-beta:0.76.0-beta +google-cloud-dns:0.76.0-alpha:0.76.0-alpha +google-cloud-errorreporting:0.76.0-beta:0.76.0-beta +google-cloud-examples:0.76.0-alpha:0.76.0-alpha +google-cloud-firestore:0.76.0-beta:0.76.0-beta +google-cloud-gcloud-maven-plugin:0.76.0-alpha:0.76.0-alpha +google-cloud-iamcredentials:0.3.0-alpha:0.3.0-alpha +google-cloud-iot:0.76.0-beta:0.76.0-beta +google-cloud-kms:0.76.0-beta:0.76.0-beta +google-cloud-language:1.58.0:1.58.0 +google-cloud-logging:1.58.0:1.58.0 +google-cloud-logging-logback:0.76.0-alpha:0.76.0-alpha +google-cloud-managedtest:0.76.0-alpha:0.76.0-alpha +google-cloud-monitoring:1.58.0:1.58.0 +google-cloud-nio:0.76.0-alpha:0.76.0-alpha +google-cloud-nio-examples:0.76.0-alpha:0.76.0-alpha +google-cloud-notification:0.76.0-beta:0.76.0-beta +google-cloud-os-login:0.76.0-alpha:0.76.0-alpha +google-cloud-pubsub:1.58.0:1.58.0 +google-cloud-redis:0.76.0-alpha:0.76.0-alpha +google-cloud-resourcemanager:0.76.0-alpha:0.76.0-alpha +google-cloud-scheduler:0.76.0-alpha:0.76.0-alpha +google-cloud-securitycenter:0.76.0-alpha:0.76.0-alpha +google-cloud-spanner:1.3.0:1.3.0 +google-cloud-speech:0.76.0-beta:0.76.0-beta +google-cloud-storage:1.58.0:1.58.0 +google-cloud-tasks:0.76.0-beta:0.76.0-beta +google-cloud-testing:0.76.0-alpha:0.76.0-alpha +google-cloud-texttospeech:0.76.0-beta:0.76.0-beta +google-cloud-trace:0.76.0-beta:0.76.0-beta +google-cloud-translate:1.58.0:1.58.0 +google-cloud-util:0.76.0-alpha:0.76.0-alpha +google-cloud-video-intelligence:0.76.0-beta:0.76.0-beta +google-cloud-vision:1.58.0:1.58.0 +google-cloud-websecurityscanner:0.76.0-alpha:0.76.0-alpha +grpc-google-cloud-asset-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-automl-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-bigquerydatatransfer-v1:0.41.0:0.41.0 +grpc-google-cloud-bigquerystorage-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-bigtable-admin-v2:0.41.0:0.41.0 +grpc-google-cloud-bigtable-v2:0.41.0:0.41.0 +grpc-google-cloud-container-v1:0.41.0:0.41.0 +grpc-google-cloud-containeranalysis-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-dataproc-v1:0.41.0:0.41.0 +grpc-google-cloud-dataproc-v1beta2:0.41.0:0.41.0 +grpc-google-cloud-dialogflow-v2:0.41.0:0.41.0 +grpc-google-cloud-dialogflow-v2beta1:0.41.0:0.41.0 +grpc-google-cloud-dlp-v2:0.41.0:0.41.0 +grpc-google-cloud-error-reporting-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-firestore-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-iamcredentials-v1:0.3.0-alpha:0.3.0-alpha +grpc-google-cloud-iot-v1:0.41.0:0.41.0 +grpc-google-cloud-kms-v1:0.41.0:0.41.0 +grpc-google-cloud-language-v1:1.40.0:1.40.0 +grpc-google-cloud-language-v1beta2:0.41.0:0.41.0 +grpc-google-cloud-logging-v2:0.41.0:0.41.0 +grpc-google-cloud-monitoring-v3:1.40.0:1.40.0 +grpc-google-cloud-os-login-v1:0.41.0:0.41.0 +grpc-google-cloud-pubsub-v1:1.40.0:1.40.0 +grpc-google-cloud-redis-v1:0.41.0:0.41.0 +grpc-google-cloud-redis-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-scheduler-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-securitycenter-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-spanner-admin-database-v1:1.3.0:1.3.0 +grpc-google-cloud-spanner-admin-instance-v1:1.3.0:1.3.0 +grpc-google-cloud-spanner-v1:1.3.0:1.3.0 +grpc-google-cloud-speech-v1:0.41.0:0.41.0 +grpc-google-cloud-speech-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-speech-v1p1beta1:0.41.0:0.41.0 +grpc-google-cloud-tasks-v2beta2:0.41.0:0.41.0 +grpc-google-cloud-tasks-v2beta3:0.41.0:0.41.0 +grpc-google-cloud-texttospeech-v1:0.41.0:0.41.0 +grpc-google-cloud-texttospeech-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-trace-v1:0.41.0:0.41.0 +grpc-google-cloud-trace-v2:0.41.0:0.41.0 +grpc-google-cloud-video-intelligence-v1:0.41.0:0.41.0 +grpc-google-cloud-video-intelligence-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-video-intelligence-v1beta2:0.41.0:0.41.0 +grpc-google-cloud-video-intelligence-v1p1beta1:0.41.0:0.41.0 +grpc-google-cloud-video-intelligence-v1p2beta1:0.41.0:0.41.0 +grpc-google-cloud-vision-v1:1.40.0:1.40.0 +grpc-google-cloud-vision-v1p1beta1:0.41.0:0.41.0 +grpc-google-cloud-vision-v1p2beta1:1.40.0:1.40.0 +grpc-google-cloud-vision-v1p3beta1:0.41.0:0.41.0 +grpc-google-cloud-websecurityscanner-v1alpha:0.41.0:0.41.0 +proto-google-cloud-asset-v1beta1:0.41.0:0.41.0 +proto-google-cloud-automl-v1beta1:0.41.0:0.41.0 +proto-google-cloud-bigquerydatatransfer-v1:0.41.0:0.41.0 +proto-google-cloud-bigquerystorage-v1beta1:0.41.0:0.41.0 +proto-google-cloud-bigtable-admin-v2:0.41.0:0.41.0 +proto-google-cloud-bigtable-v2:0.41.0:0.41.0 +proto-google-cloud-container-v1:0.41.0:0.41.0 +proto-google-cloud-containeranalysis-v1beta1:0.41.0:0.41.0 +proto-google-cloud-dataproc-v1:0.41.0:0.41.0 +proto-google-cloud-dataproc-v1beta2:0.41.0:0.41.0 +proto-google-cloud-datastore-v1:0.41.0:0.41.0 +proto-google-cloud-dialogflow-v2:0.41.0:0.41.0 +proto-google-cloud-dialogflow-v2beta1:0.41.0:0.41.0 +proto-google-cloud-dlp-v2:0.41.0:0.41.0 +proto-google-cloud-error-reporting-v1beta1:0.41.0:0.41.0 +proto-google-cloud-firestore-v1beta1:0.41.0:0.41.0 +proto-google-cloud-iamcredentials-v1:0.3.0-alpha:0.3.0-alpha +proto-google-cloud-iot-v1:0.41.0:0.41.0 +proto-google-cloud-kms-v1:0.41.0:0.41.0 +proto-google-cloud-language-v1:1.40.0:1.40.0 +proto-google-cloud-language-v1beta2:0.41.0:0.41.0 +proto-google-cloud-logging-v2:0.41.0:0.41.0 +proto-google-cloud-monitoring-v3:1.40.0:1.40.0 +proto-google-cloud-os-login-v1:0.41.0:0.41.0 +proto-google-cloud-pubsub-v1:1.40.0:1.40.0 +proto-google-cloud-redis-v1:0.41.0:0.41.0 +proto-google-cloud-redis-v1beta1:0.41.0:0.41.0 +proto-google-cloud-scheduler-v1beta1:0.41.0:0.41.0 +proto-google-cloud-securitycenter-v1beta1:0.41.0:0.41.0 +proto-google-cloud-spanner-admin-database-v1:1.3.0:1.3.0 +proto-google-cloud-spanner-admin-instance-v1:1.3.0:1.3.0 +proto-google-cloud-spanner-v1:1.3.0:1.3.0 +proto-google-cloud-speech-v1:0.41.0:0.41.0 +proto-google-cloud-speech-v1beta1:0.41.0:0.41.0 +proto-google-cloud-speech-v1p1beta1:0.41.0:0.41.0 +proto-google-cloud-tasks-v2beta2:0.41.0:0.41.0 +proto-google-cloud-tasks-v2beta3:0.41.0:0.41.0 +proto-google-cloud-texttospeech-v1:0.41.0:0.41.0 +proto-google-cloud-texttospeech-v1beta1:0.41.0:0.41.0 +proto-google-cloud-trace-v1:0.41.0:0.41.0 +proto-google-cloud-trace-v2:0.41.0:0.41.0 +proto-google-cloud-video-intelligence-v1:0.41.0:0.41.0 +proto-google-cloud-video-intelligence-v1beta1:0.41.0:0.41.0 +proto-google-cloud-video-intelligence-v1beta2:0.41.0:0.41.0 +proto-google-cloud-video-intelligence-v1p1beta1:0.41.0:0.41.0 +proto-google-cloud-video-intelligence-v1p2beta1:0.41.0:0.41.0 +proto-google-cloud-vision-v1:1.40.0:1.40.0 +proto-google-cloud-vision-v1p1beta1:0.41.0:0.41.0 +proto-google-cloud-vision-v1p2beta1:1.40.0:1.40.0 +proto-google-cloud-vision-v1p3beta1:0.41.0:0.41.0 +proto-google-cloud-websecurityscanner-v1alpha:0.41.0:0.41.0