Repository: googleapis/google-api-java-client
Pull request #1822 (2021-06-02 09:01:36)

chore: add a Code of Conduct
chore: add a Code of Conduct


Patch:
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
new file mode 100644
index 00000000..284c8b69
--- /dev/null
+++ b/.github/.OwlBot.lock.yaml
@@ -0,0 +1,3 @@
+docker:
+  image: gcr.io/repo-automation-bots/owlbot-java:latest
+  digest: sha256:13b7387edb404234610d30473ac48210ae7fe42a136335ee2b2f8a07c4c7f6a5
diff --git a/.github/readme/synth.py b/.github/.OwlBot.yaml
similarity index 73%
rename from .github/readme/synth.py
rename to .github/.OwlBot.yaml
index 7b48cc28..8c5f03b4 100644
--- a/.github/readme/synth.py
+++ b/.github/.OwlBot.yaml
@@ -1,4 +1,4 @@
-# Copyright 2020 Google LLC
+# Copyright 2021 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,8 +12,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-"""This script is used to synthesize generated the README for this library."""
-
-from synthtool.languages import java
-
-java.custom_templates(["java_library/README.md"])
+docker:
+  image: "gcr.io/repo-automation-bots/owlbot-java:latest"
diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml
index 1a23ea42..2176b054 100644
--- a/.github/blunderbuss.yml
+++ b/.github/blunderbuss.yml
@@ -1,5 +1,5 @@
 # Configuration for the Blunderbuss GitHub app. For more info see
-# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
+# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss
 assign_prs_by:
 - labels:
   - samples
diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml
new file mode 100644
index 00000000..d4ca9418
--- /dev/null
+++ b/.github/release-trigger.yml
@@ -0,0 +1,1 @@
+enabled: true
diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml
index a8c5b3ed..64903237 100644
--- a/.github/sync-repo-settings.yaml
+++ b/.github/sync-repo-settings.yaml
@@ -2,19 +2,17 @@ rebaseMergeAllowed: false
 squashMergeAllowed: true
 mergeCommitAllowed: false
 branchProtectionRules:
-  - pattern: master
+  - pattern: main
     isAdminEnforced: true
     requiredApprovingReviewCount: 1
     requiresCodeOwnerReviews: true
     requiresStrictStatusChecks: false
     requiredStatusCheckContexts:
-      - units (7)
       - units (8)
       - units (11)
       - windows
       - dependencies (8)
       - dependencies (11)
-      - linkage-monitor
       - lint
       - clirr
       - cla/google
@@ -30,7 +28,6 @@ branchProtectionRules:
       - windows
       - dependencies (8)
       - dependencies (11)
-      - linkage-monitor
       - lint
       - clirr
       - cla/google
diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml
index f247d5c7..a0ba1f7d 100644
--- a/.github/trusted-contribution.yml
+++ b/.github/trusted-contribution.yml
@@ -1,2 +1,3 @@
 trustedContributors:
-- renovate-bot
\ No newline at end of file
+- renovate-bot
+- gcf-owl-bot[bot]
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index cc337f60..ab6ba39e 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -1,7 +1,7 @@
 on:
   push:
     branches:
-    - master
+    - main
   pull_request:
 name: ci
 jobs:
@@ -9,7 +9,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        java: [7, 8, 11]
+        java: [8, 11]
     steps:
     - uses: actions/checkout@v2
     - uses: actions/setup-java@v1
@@ -99,4 +99,4 @@ jobs:
     - run: .kokoro/install_dependencies.sh
     - run: .kokoro/build.sh
       env:
-        JOB_TYPE: clirr
\ No newline at end of file
+        JOB_TYPE: clirr
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index b615ef98..5bcd551c 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -115,7 +115,7 @@ fi
 # fix output location of logs
 bash .kokoro/coerce_logs.sh
 
-if [[ "${ENABLE_BUILD_COP}" == "true" ]]
+if [[ "${ENABLE_FLAKYBOT}" == "true" ]]
 then
     chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot
     ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/google-api-java-client
diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh
index 5cf7ba49..46edbf7f 100755
--- a/.kokoro/coerce_logs.sh
+++ b/.kokoro/coerce_logs.sh
@@ -28,7 +28,6 @@ job=$(basename ${KOKORO_JOB_NAME})
 echo "coercing sponge logs..."
 for xml in `find . -name *-sponge_log.xml`
 do
-  echo "processing ${xml}"
   class=$(basename ${xml} | cut -d- -f2)
   dir=$(dirname ${xml})/${job}/${class}
   text=$(dirname ${xml})/${class}-sponge_log.txt
diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg
deleted file mode 100644
index aa35f0b8..00000000
--- a/.kokoro/continuous/readme.cfg
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://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.
-
-# Format: //devtools/kokoro/config/proto/build.proto
-
-env_vars: {
-  key: "TRAMPOLINE_IMAGE"
-  value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
-}
-
-env_vars: {
-  key: "TRAMPOLINE_BUILD_FILE"
-  value: "github/google-api-java-client/.kokoro/readme.sh"
-}
-
-# Build logs will be here
-action {
-  define_artifacts {
-    regex: "**/*sponge_log.xml"
-    regex: "**/*sponge_log.log"
-  }
-}
-
-# The github token is stored here.
-before_action {
-  fetch_keystore {
-    keystore_resource {
-      keystore_config_id: 73713
-      keyname: "yoshi-automation-github-key"
-      # TODO(theacodes): remove this after secrets have globally propagated
-      backend_type: FASTCONFIGPUSH
-    }
-  }
-}
-
-# Common env vars for all repositories and builds.
-env_vars: {
-    key: "GITHUB_USER"
-    value: "yoshi-automation"
-}
-env_vars: {
-    key: "GITHUB_EMAIL"
-    value: "yoshi-automation@google.com"
-}
diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh
index 59d2aafc..9a5105d7 100755
--- a/.kokoro/dependencies.sh
+++ b/.kokoro/dependencies.sh
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 set -eo pipefail
+shopt -s nullglob
 
 ## Get the directory of the build script
 scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
@@ -27,7 +28,28 @@ source ${scriptDir}/common.sh
 java -version
 echo $JOB_TYPE
 
-export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
+function determineMavenOpts() {
+  local javaVersion=$(
+    # filter down to the version line, then pull out the version between quotes,
+    # then trim the version number down to its minimal number (removing any
+    # update or suffix number).
+    java -version 2>&1 | grep "version" \
+      | sed -E 's/^.*"(.*?)".*$/\1/g' \
+      | sed -E 's/^(1\.[0-9]\.0).*$/\1/g'
+  )
+
+  case $javaVersion in
+    "17")
+      # MaxPermSize is no longer supported as of jdk 17
+      echo -n "-Xmx1024m"
+      ;;
+    *)
+      echo -n "-Xmx1024m -XX:MaxPermSize=128m"
+      ;;
+  esac
+}
+
+export MAVEN_OPTS=$(determineMavenOpts)
 
 # this should run maven enforcer
 retry_with_backoff 3 10 \
@@ -46,7 +68,7 @@ function completenessCheck() {
   # This is stripped from the output as it is not present in the flattened pom.
   # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list.
   msg "Generating dependency list using original pom..."
-  mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO]    .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// >.org-list.txt
+  mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO]    .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt
 
   # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes)
   msg "Generating dependency list using flattened pom..."
@@ -70,7 +92,7 @@ function completenessCheck() {
 set +e
 
 error_count=0
-for path in $(find -name ".flattened-pom.xml")
+for path in **/.flattened-pom.xml
 do
   # Check flattened pom in each dir that contains it for completeness
   dir=$(dirname "$path")
diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg
index 0048c8ec..e51c7b4c 100644
--- a/.kokoro/nightly/integration.cfg
+++ b/.kokoro/nightly/integration.cfg
@@ -22,7 +22,7 @@ env_vars: {
 }
 
 env_vars: {
-  key: "ENABLE_BUILD_COP"
+  key: "ENABLE_FLAKYBOT"
   value: "true"
 }
 
diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg
index f2542931..9761fd86 100644
--- a/.kokoro/nightly/samples.cfg
+++ b/.kokoro/nightly/samples.cfg
@@ -33,6 +33,6 @@ env_vars: {
 }
 
 env_vars: {
-  key: "ENABLE_BUILD_COP"
+  key: "ENABLE_FLAKYBOT"
   value: "true"
 }
diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh
index 6e3f6599..7f78ee41 100755
--- a/.kokoro/release/common.sh
+++ b/.kokoro/release/common.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# 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.
diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh
index 5c4551ef..742ec1a8 100755
--- a/.kokoro/release/drop.sh
+++ b/.kokoro/release/drop.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# 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.
diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh
index 1fa95fa5..3cac3d8a 100755
--- a/.kokoro/release/promote.sh
+++ b/.kokoro/release/promote.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# 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.
diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh
index dd4d56ad..ac6b4d64 100755
--- a/.kokoro/release/publish_javadoc.sh
+++ b/.kokoro/release/publish_javadoc.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2019 Google Inc.
+# 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.
diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh
index 74608833..19d42a7b 100755
--- a/.kokoro/release/publish_javadoc11.sh
+++ b/.kokoro/release/publish_javadoc11.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2021 Google Inc.
+# Copyright 2021 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh
index 8a103384..77dc4e8f 100755
--- a/.kokoro/release/stage.sh
+++ b/.kokoro/release/stage.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# 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.
diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh
index 9da0f839..8b69b793 100644
--- a/.kokoro/trampoline.sh
+++ b/.kokoro/trampoline.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# 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.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7a1a2295..c08c119e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,30 @@
 # Changelog
 
+### [1.32.1](https://www.github.com/googleapis/google-api-java-client/compare/v1.32.0...v1.32.1) (2021-06-24)
+
+
+### Bug Fixes
+
+* bring comment up to date with code ([#1838](https://www.github.com/googleapis/google-api-java-client/issues/1838)) ([f150c5a](https://www.github.com/googleapis/google-api-java-client/commit/f150c5aa6e2de0c6cbad7461f4b76be8e0027567))
+* Update dependencies.sh to not break on mac ([#1830](https://www.github.com/googleapis/google-api-java-client/issues/1830)) ([97940b3](https://www.github.com/googleapis/google-api-java-client/commit/97940b3fd96e343df3985630398811f3c417afcc))
+
+
+### Dependencies
+
+* don't use sp versions in the regular release ([#1840](https://www.github.com/googleapis/google-api-java-client/issues/1840)) ([94cde71](https://www.github.com/googleapis/google-api-java-client/commit/94cde719e9ad845bcd186595e06279e2b7c19096))
+
+## [1.32.0](https://www.github.com/googleapis/google-api-java-client/compare/v1.31.5...v1.32.0) (2021-06-22)
+
+
+### Features
+
+* add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#1813](https://www.github.com/googleapis/google-api-java-client/issues/1813)) ([56f5b8b](https://www.github.com/googleapis/google-api-java-client/commit/56f5b8be0a60cb1cf0b279743d85ef57d9aa46b6))
+
+
+### Bug Fixes
+
+* add reason field to Details in GoogleJsonErrorObject ([#1831](https://www.github.com/googleapis/google-api-java-client/issues/1831)) ([5e92b4c](https://www.github.com/googleapis/google-api-java-client/commit/5e92b4c22e0d45686a58de58977d20c96593e901))
+
 ### [1.31.5](https://www.github.com/googleapis/google-api-java-client/compare/v1.31.4...v1.31.5) (2021-05-10)
 
 
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 2add2547..46b2a08e 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,94 +1,43 @@
-<!-- # Generated by synthtool. DO NOT EDIT! !-->
-# Code of Conduct
+# Contributor Code of Conduct
 
-## Our Pledge
+As contributors and maintainers of this project,
+and in the interest of fostering an open and welcoming community,
+we pledge to respect all people who contribute through reporting issues,
+posting feature requests, updating documentation,
+submitting pull requests or patches, and other activities.
 
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of
-experience, education, socio-economic status, nationality, personal appearance,
-race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-*   Using welcoming and inclusive language
-*   Being respectful of differing viewpoints and experiences
-*   Gracefully accepting constructive criticism
-*   Focusing on what is best for the community
-*   Showing empathy towards other community members
+We are committed to making participation in this project
+a harassment-free experience for everyone,
+regardless of level of experience, gender, gender identity and expression,
+sexual orientation, disability, personal appearance,
+body size, race, ethnicity, age, religion, or nationality.
 
 Examples of unacceptable behavior by participants include:
 
-*   The use of sexualized language or imagery and unwelcome sexual attention or
-    advances
-*   Trolling, insulting/derogatory comments, and personal or political attacks
-*   Public or private harassment
-*   Publishing others' private information, such as a physical or electronic
-    address, without explicit permission
-*   Other conduct which could reasonably be considered inappropriate in a
-    professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
+* The use of sexualized language or imagery
+* Personal attacks
+* Trolling or insulting/derogatory comments
+* Public or private harassment
+* Publishing other's private information,
+such as physical or electronic
+addresses, without explicit permission
+* Other unethical or unprofessional conduct.
 
 Project maintainers have the right and responsibility to remove, edit, or reject
-comments, commits, code, wiki edits, issues, and other contributions that are
-not aligned to this Code of Conduct, or to ban temporarily or permanently any
-contributor for other behaviors that they deem inappropriate, threatening,
-offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-This Code of Conduct also applies outside the project spaces when the Project
-Steward has a reasonable belief that an individual's behavior may have a
-negative impact on the project or its community.
-
-## Conflict Resolution
-
-We do not believe that all conflict is bad; healthy debate and disagreement
-often yield positive results. However, it is never okay to be disrespectful or
-to engage in behavior that violates the project’s code of conduct.
-
-If you see someone violating the code of conduct, you are encouraged to address
-the behavior directly with those involved. Many issues can be resolved quickly
-and easily, and this gives people more control over the outcome of their
-dispute. If you are unable to resolve the matter for any reason, or if the
-behavior is threatening or harassing, report it. We are dedicated to providing
-an environment where participants feel welcome and safe.
-
-Reports should be directed to *googleapis-stewards@google.com*, the
-Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
-receive and address reported violations of the code of conduct. They will then
-work with a committee consisting of representatives from the Open Source
-Programs Office and the Google Open Source Strategy team. If for any reason you
-are uncomfortable reaching out to the Project Steward, please email
-opensource@google.com.
-
-We will investigate every complaint, but you may not receive a direct response.
-We will use our discretion in determining when and how to follow up on reported
-incidents, which may range from not taking action to permanent expulsion from
-the project and project-sponsored spaces. We will notify the accused of the
-report and provide them an opportunity to discuss it before any action is taken.
-The identity of the reporter will be omitted from the details of the report
-supplied to the accused. In potentially harmful situations, such as ongoing
-harassment or threats to anyone's safety, we may take action without notice.
-
-## Attribution
-
-This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
-available at
-https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
\ No newline at end of file
+comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct.
+By adopting this Code of Conduct,
+project maintainers commit themselves to fairly and consistently
+applying these principles to every aspect of managing this project.
+Project maintainers who do not follow or enforce the Code of Conduct
+may be permanently removed from the project team.
+
+This code of conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior
+may be reported by opening an issue
+or contacting one or more of the project maintainers.
+
+This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
+available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
diff --git a/README.md b/README.md
index b664fc2a..b29c854a 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ To use Maven, add the following lines to your pom.xml file:
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client</artifactId>
-        <version>1.31.5</version>
+        <version>1.32.1</version>
       </dependency>
     </dependencies>
   </project>
@@ -48,7 +48,7 @@ repositories {
     google()
 }
 dependencies {
-    compile 'com.google.api-client:google-api-client:1.31.5'
+    compile 'com.google.api-client:google-api-client:1.32.1'
 }
 ```
 [//]: # ({x-version-update-end})
diff --git a/google-api-client-android/pom.xml b/google-api-client-android/pom.xml
index bfca0562..77804524 100644
--- a/google-api-client-android/pom.xml
+++ b/google-api-client-android/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>google-api-client-android</artifactId>
diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml
index 018731e3..c4b82847 100644
--- a/google-api-client-appengine/pom.xml
+++ b/google-api-client-appengine/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>google-api-client-appengine</artifactId>
@@ -71,7 +71,7 @@
           </execution>
         </executions>
       </plugin>
-      <!--App Engine uses Java 6 and above-->
+      <!--App Engine uses Java 7 and above-->
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>animal-sniffer-maven-plugin</artifactId>
diff --git a/google-api-client-assembly/pom.xml b/google-api-client-assembly/pom.xml
index 4a637399..c77188c7 100644
--- a/google-api-client-assembly/pom.xml
+++ b/google-api-client-assembly/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <groupId>com.google.api-client</groupId>
diff --git a/google-api-client-bom/pom.xml b/google-api-client-bom/pom.xml
index 2f5f8c84..6a3f6eb8 100644
--- a/google-api-client-bom/pom.xml
+++ b/google-api-client-bom/pom.xml
@@ -3,7 +3,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.google.api-client</groupId>
   <artifactId>google-api-client-bom</artifactId>
-  <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+  <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
   <packaging>pom</packaging>
 
   <name>Google API Client Library for Java BOM</name>
@@ -63,53 +63,53 @@
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client-android</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client-appengine</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client-assembly</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
         <type>pom</type>
       </dependency>
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client-gson</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client-jackson2</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client-java6</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client-protobuf</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client-servlet</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client-xml</artifactId>
-        <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+        <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
       </dependency>
     </dependencies>
   </dependencyManagement>
@@ -122,14 +122,14 @@
         <extensions>true</extensions>
         <configuration>
           <serverId>sonatype-nexus-staging</serverId>
-          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
+          <nexusUrl>https://google.oss.sonatype.org/</nexusUrl>
           <autoReleaseAfterClose>false</autoReleaseAfterClose>
         </configuration>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
-        <version>3.2.0</version>
+        <version>3.3.1</version>
         <configuration>
           <skip>true</skip>
         </configuration>
@@ -145,7 +145,7 @@
       <plugin>
         <groupId>com.coveo</groupId>
         <artifactId>fmt-maven-plugin</artifactId>
-        <version>2.10</version>
+        <version>2.12</version>
         <configuration>
           <style>google</style>
           <verbose>true</verbose>
@@ -154,7 +154,7 @@
           <dependency>
             <groupId>com.google.googlejavaformat</groupId>
             <artifactId>google-java-format</artifactId>
-            <version>1.10.0</version>
+            <version>1.11.0</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml
index 36b36448..d6e557cf 100644
--- a/google-api-client-gson/pom.xml
+++ b/google-api-client-gson/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>google-api-client-gson</artifactId>
diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml
index e594182b..d8cf6146 100644
--- a/google-api-client-jackson2/pom.xml
+++ b/google-api-client-jackson2/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>google-api-client-jackson2</artifactId>
diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml
index a8fff0d2..2c7cf31b 100644
--- a/google-api-client-java6/pom.xml
+++ b/google-api-client-java6/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>google-api-client-java6</artifactId>
diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml
index b3dca2fb..06fa8ffb 100644
--- a/google-api-client-protobuf/pom.xml
+++ b/google-api-client-protobuf/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>google-api-client-protobuf</artifactId>
diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml
index a84311b0..983ea69f 100644
--- a/google-api-client-servlet/pom.xml
+++ b/google-api-client-servlet/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>google-api-client-servlet</artifactId>
diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml
index 7625ed93..e8a06eaa 100644
--- a/google-api-client-xml/pom.xml
+++ b/google-api-client-xml/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>google-api-client-xml</artifactId>
diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml
index 89c14b47..940d2c64 100644
--- a/google-api-client/pom.xml
+++ b/google-api-client/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.google.api-client</groupId>
     <artifactId>google-api-client-parent</artifactId>
-    <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+    <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
     <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>google-api-client</artifactId>
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonError.java b/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonError.java
index 1a530145..246c3fd1 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonError.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonError.java
@@ -189,6 +189,7 @@ public class GoogleJsonError extends GenericJson {
     private String type;
 
     @Key private String detail;
+    @Key private String reason;
     @Key private List<ParameterViolations> parameterViolations;
 
     public String getType() {
@@ -207,6 +208,14 @@ public class GoogleJsonError extends GenericJson {
       this.detail = detail;
     }
 
+    public String getReason() {
+      return reason;
+    }
+
+    public void setReason(String reason) {
+      this.reason = reason;
+    }
+
     public List<ParameterViolations> getParameterViolations() {
       return parameterViolations;
     }
diff --git a/owlbot.py b/owlbot.py
new file mode 100644
index 00000000..75a64988
--- /dev/null
+++ b/owlbot.py
@@ -0,0 +1,34 @@
+# Copyright 2021 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.
+
+import synthtool as s
+from synthtool.languages import java
+
+
+for library in s.get_staging_dirs():
+    # put any special-case replacements here
+    s.move(library)
+
+s.remove_staging_dirs()
+java.common_templates(
+    excludes=[
+        "README.md",
+        "java.header",
+        "checkstyle.xml",
+        "renovate.json",
+        "license-checks.xml",
+        ".github/workflows/ci.yaml",
+        ".github/workflows/samples.yaml",
+    ]
+)
diff --git a/pom.xml b/pom.xml
index 77631386..af63db34 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,11 +4,11 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.google.api-client</groupId>
   <artifactId>google-api-client-parent</artifactId>
-  <version>1.31.6-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
+  <version>1.32.2-SNAPSHOT</version><!-- {x-version-update:google-api-client:current} -->
   <packaging>pom</packaging>
   <name>Parent for the Google API Client Library for Java</name>
   <description>The Google APIs Client Library for Java is a Java client library
-               for accessing any HTTP-based API on the web</description>
+    for accessing any HTTP-based API on the web</description>
   <url>https://github.com/googleapis/google-api-java-client</url>
 
   <issueManagement>
@@ -17,7 +17,7 @@
   </issueManagement>
 
   <inceptionYear>2010</inceptionYear>
-  
+
   <developers>
     <developer>
       <id>chingor</id>
@@ -264,7 +264,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-javadoc-plugin</artifactId>
-          <version>3.2.0</version>
+          <version>3.3.1</version>
           <executions>
             <execution>
               <id>attach-javadocs</id>
@@ -312,7 +312,7 @@
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>animal-sniffer-maven-plugin</artifactId>
-          <version>1.16</version>
+          <version>1.20</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
@@ -340,7 +340,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>
-        <version>3.0.0-M3</version><executions>
+        <version>3.0.0</version><executions>
         <execution>
           <id>enforce-maven</id>
           <goals>
@@ -476,7 +476,7 @@
       <plugin>
         <groupId>com.coveo</groupId>
         <artifactId>fmt-maven-plugin</artifactId>
-        <version>2.10</version>
+        <version>2.12</version>
         <configuration>
           <style>google</style>
           <verbose>true</verbose>
@@ -485,7 +485,7 @@
           <dependency>
             <groupId>com.google.googlejavaformat</groupId>
             <artifactId>google-java-format</artifactId>
-            <version>1.10.0</version>
+            <version>1.11.0</version>
           </dependency>
         </dependencies>
       </plugin>
@@ -493,15 +493,15 @@
   </build>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <project.http.version>1.39.2-sp.1</project.http.version>
+    <project.http.version>1.40.0</project.http.version>
     <project.httpcore.version>4.4.14</project.httpcore.version>
     <project.httpclient.version>4.5.13</project.httpclient.version>
-    <project.oauth.version>1.31.5</project.oauth.version>
+    <project.oauth.version>1.32.1</project.oauth.version>
     <project.jsr305.version>3.0.2</project.jsr305.version>
     <project.gson.version>2.8.6</project.gson.version>
-    <project.protobuf-java.version>3.17.1</project.protobuf-java.version>
+    <project.protobuf-java.version>3.18.1</project.protobuf-java.version>
     <project.guava.version>30.1.1-android</project.guava.version>
-    <project.appengine.version>1.9.89</project.appengine.version>
+    <project.appengine.version>1.9.91</project.appengine.version>
     <project.xpp3.version>1.1.4c</project.xpp3.version>
     <project.jdo2-api.version>2.3-eb</project.jdo2-api.version>
     <project.datanucleus-core.version>3.2.2</project.datanucleus-core.version>
@@ -607,7 +607,7 @@
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-javadoc-plugin</artifactId>
-            <version>3.2.0</version>
+            <version>3.3.1</version>
             <reportSets>
               <reportSet>
                 <id>docFX</id>
@@ -621,7 +621,7 @@
             <configuration>
               <doclet>com.microsoft.doclet.DocFxDoclet</doclet>
               <useStandardDocletOptions>false</useStandardDocletOptions>
-              <docletPath>${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.0.jar</docletPath>
+              <docletPath>${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.2.1.jar</docletPath>
               <additionalOptions>-outputpath ${project.build.directory}/docfx-yml -projectname ${artifactId}</additionalOptions>
               <doclint>none</doclint>
               <show>protected</show>
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 4b06a5aa..bc9522a1 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <groupId>com.google.cloud.samples</groupId>
     <artifactId>shared-configuration</artifactId>
-    <version>1.0.22</version>
+    <version>1.0.23</version>
   </parent>
 
   <properties>
@@ -29,7 +29,7 @@
     <dependency>
       <groupId>com.google.api-client</groupId>
       <artifactId>google-api-client</artifactId>
-      <version>1.31.5</version>
+      <version>1.32.1</version>
     </dependency>
     <!-- [END google-api-client_install_without_bom] -->
 
diff --git a/samples/pom.xml b/samples/pom.xml
index 609633ce..27ea9d9c 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -18,7 +18,7 @@
   <parent>
     <groupId>com.google.cloud.samples</groupId>
     <artifactId>shared-configuration</artifactId>
-    <version>1.0.22</version>
+    <version>1.0.23</version>
   </parent>
 
   <properties>
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index fac894f9..da7d5c67 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <groupId>com.google.cloud.samples</groupId>
     <artifactId>shared-configuration</artifactId>
-    <version>1.0.22</version>
+    <version>1.0.23</version>
   </parent>
 
   <properties>
@@ -28,7 +28,7 @@
     <dependency>
       <groupId>com.google.api-client</groupId>
       <artifactId>google-api-client</artifactId>
-      <version>1.31.5</version>
+      <version>1.32.1</version>
     </dependency>
   <!-- {x-version-update-end} -->
 
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 58427beb..3778e5bb 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <groupId>com.google.cloud.samples</groupId>
     <artifactId>shared-configuration</artifactId>
-    <version>1.0.22</version>
+    <version>1.0.23</version>
   </parent>
 
   <properties>
@@ -30,7 +30,7 @@
       <dependency>
         <groupId>com.google.cloud</groupId>
         <artifactId>libraries-bom</artifactId>
-        <version>20.5.0</version>
+        <version>23.1.0</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
diff --git a/synth.metadata b/synth.metadata
index f7f4fdae..08cf7b8b 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,14 +4,14 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/google-api-java-client.git",
-        "sha": "56f5b8be0a60cb1cf0b279743d85ef57d9aa46b6"
+        "sha": "f7e7a675b8ac2ca32d891e2219b27203bf128e2e"
       }
     },
     {
       "git": {
         "name": "synthtool",
         "remote": "https://github.com/googleapis/synthtool.git",
-        "sha": "8eae0234a16b26c2ff616d305dbd9786c8b10a47"
+        "sha": "396d9b84a1e93880f5bf88b59ecd38a0a6dffc5e"
       }
     }
   ],
@@ -23,8 +23,8 @@
     ".github/PULL_REQUEST_TEMPLATE.md",
     ".github/blunderbuss.yml",
     ".github/generated-files-bot.yml",
-    ".github/readme/synth.py",
     ".github/release-please.yml",
+    ".github/release-trigger.yml",
     ".github/snippet-bot.yml",
     ".github/sync-repo-settings.yaml",
     ".github/trusted-contribution.yml",
@@ -37,7 +37,6 @@
     ".kokoro/common.sh",
     ".kokoro/continuous/common.cfg",
     ".kokoro/continuous/java8.cfg",
-    ".kokoro/continuous/readme.cfg",
     ".kokoro/dependencies.sh",
     ".kokoro/nightly/common.cfg",
     ".kokoro/nightly/integration.cfg",
@@ -80,6 +79,7 @@
     "CODE_OF_CONDUCT.md",
     "CONTRIBUTING.md",
     "LICENSE",
+    "SECURITY.md",
     "codecov.yaml",
     "samples/install-without-bom/pom.xml",
     "samples/pom.xml",
diff --git a/synth.py b/synth.py
deleted file mode 100644
index 26c4d5bf..00000000
--- a/synth.py
+++ /dev/null
@@ -1,27 +0,0 @@
-
-# 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
-#
-#     http://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.
-"""This script is used to synthesize generated parts of this library."""
-
-import synthtool.languages.java as java
-
-java.common_templates(excludes=[
-    "README.md",
-    "java.header",
-    "checkstyle.xml",
-    "renovate.json",
-    "license-checks.xml",
-    ".github/workflows/ci.yaml",
-    ".github/workflows/samples.yaml",
-])
diff --git a/versions.txt b/versions.txt
index 0b5cffb4..d8a9ca9c 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,4 +1,4 @@
 # Format:
 # module:released-version:current-version
 
-google-api-client:1.31.5:1.31.6-SNAPSHOT
+google-api-client:1.32.1:1.32.2-SNAPSHOT


Test patch:
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java
index 99cc3b1d..c988804a 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java
@@ -125,4 +125,48 @@ public class GoogleJsonErrorTest extends TestCase {
     assertEquals(DETAILS_ERROR, FACTORY.toString(errorResponse));
     assertNotNull(errorResponse.getDetails());
   }
+
+  public void testParse_withReasonInDetails() throws Exception {
+    String DETAILS_ERROR =
+        "{"
+            + "\"code\":400,"
+            + "\"details\":"
+            + "[{"
+            + "\"@type\":\"type.googleapis.com/google.dataflow.v1beta3.InvalidTemplateParameters\","
+            + "\"parameterViolations\":[{"
+            + "\"description\":\"Parameter didn't match regex '^[0-9a-zA-Z_]+$'\","
+            + "\"parameter\":\"safeBrowsingApiKey\""
+            + "}],"
+            + "\"reason\":\"TEST REASON 1\""
+            + "},{"
+            + "\"@type\":\"type.googleapis.com/google.rpc.DebugInfo\","
+            + "\"detail\":\"test detail\""
+            + "},{"
+            + "\"@type\":\"type.googleapis.com/google.rpc.DebugInfo\","
+            + "\"reason\":\"test reason 2\""
+            + "},{"
+            + "\"@type\":\"type.googleapis.com/google.rpc.DebugInfo\""
+            + "}],"
+            + "\"message\":\"The template parameters are invalid.\","
+            + "\"status\":\"INVALID_ARGUMENT\""
+            + "}";
+    InputStream errorContent =
+        GoogleJsonErrorTest.class.getResourceAsStream("errorWithReasonInDetails.json");
+
+    HttpTransport transport =
+        new ErrorTransport(
+            new MockLowLevelHttpResponse()
+                .setContent(errorContent)
+                .setContentType(Json.MEDIA_TYPE)
+                .setStatusCode(HttpStatusCodes.STATUS_CODE_FORBIDDEN));
+    HttpRequest request =
+        transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL);
+    request.setThrowExceptionOnExecuteError(false);
+    HttpResponse response = request.execute();
+    com.google.api.client.googleapis.json.GoogleJsonError errorResponse =
+        com.google.api.client.googleapis.json.GoogleJsonError.parse(FACTORY, response);
+
+    assertEquals(DETAILS_ERROR, FACTORY.toString(errorResponse));
+    assertNotNull(errorResponse.getDetails().get(2).getReason());
+  }
 }
diff --git a/google-api-client/src/test/resources/com/google/api/client/googleapis/json/errorWithReasonInDetails.json b/google-api-client/src/test/resources/com/google/api/client/googleapis/json/errorWithReasonInDetails.json
new file mode 100644
index 00000000..cd1b85ad
--- /dev/null
+++ b/google-api-client/src/test/resources/com/google/api/client/googleapis/json/errorWithReasonInDetails.json
@@ -0,0 +1,31 @@
+{
+  "error": {
+    "code": 400,
+    "message": "The template parameters are invalid.",
+    "status": "INVALID_ARGUMENT",
+    "details": [
+      {
+        "@type": "type.googleapis.com/google.dataflow.v1beta3.InvalidTemplateParameters",
+        "reason": "TEST REASON 1",
+        "parameterViolations": [
+          {
+            "parameter": "safeBrowsingApiKey",
+            "description": "Parameter didn't match regex '^[0-9a-zA-Z_]+$'"
+          }
+        ]
+      },
+      {
+        "@type": "type.googleapis.com/google.rpc.DebugInfo",
+        "detail": "test detail"
+      },
+      {
+        "@type": "type.googleapis.com/google.rpc.DebugInfo",
+        "reason": "test reason 2"
+      },
+      {
+        "@type": "type.googleapis.com/google.rpc.DebugInfo"
+      }
+    ]
+  }
+}
+