diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0bd0ee06..d4764f60 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1 +1,7 @@ -Fixes # (it's a good idea to open an issue first for context and/or discussion) \ No newline at end of file +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-talent/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 00000000..f247d5c7 --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,2 @@ +trustedContributors: +- renovate-bot \ No newline at end of file diff --git a/.kokoro/build.sh b/.kokoro/build.sh index f1ae5840..42c91422 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -20,36 +20,45 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) ## cd to the parent directory, i.e. the root of the git repo cd ${scriptDir}/.. +# include common functions +source ${scriptDir}/common.sh + # Print out Java version java -version echo ${JOB_TYPE} -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true \ - -T 1C +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C # if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}) fi +RETURN_CODE=0 +set +e + case ${JOB_TYPE} in test) mvn test -B -Dclirr.skip=true -Denforcer.skip=true - bash ${KOKORO_GFILE_DIR}/codecov.sh - bash .kokoro/coerce_logs.sh + RETURN_CODE=$? ;; lint) mvn \ -Penable-samples \ com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? ;; javadoc) mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ @@ -59,21 +68,46 @@ integration) -Denforcer.skip=true \ -fae \ verify - bash .kokoro/coerce_logs.sh + RETURN_CODE=$? ;; samples) - mvn -B \ - -Penable-samples \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - bash .kokoro/coerce_logs.sh + if [[ -f samples/pom.xml ]] + then + pushd samples + mvn -B \ + -Penable-samples \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + popd + else + echo "no sample pom.xml found - skipping sample tests" + fi ;; clirr) mvn -B -Denforcer.skip=true clirr:check + RETURN_CODE=$? ;; *) ;; esac + +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi + +# fix output location of logs +bash .kokoro/coerce_logs.sh + +if [[ "${ENABLE_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop + ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-talent +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 00000000..a3bbc5f6 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# 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. + +# set -eo pipefail + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + echo "${command}" + ${command} + exit_code=$? + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg index 3b017fc8..495cc7ba 100644 --- a/.kokoro/continuous/java8.cfg +++ b/.kokoro/continuous/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 223e3168..0aade871 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -15,7 +15,13 @@ set -eo pipefail -cd github/java-talent/ +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java java -version @@ -24,8 +30,9 @@ echo $JOB_TYPE export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh index c96c3d25..759ab4e2 100755 --- a/.kokoro/linkage-monitor.sh +++ b/.kokoro/linkage-monitor.sh @@ -17,18 +17,26 @@ set -eo pipefail # Display commands being run. set -x -cd github/java-talent/ +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java version java -version echo ${JOB_TYPE} -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true # Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR JAR=linkage-monitor-latest-all-deps.jar diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index 3b017fc8..8bf59c02 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -5,3 +5,17 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg index 3b017fc8..495cc7ba 100644 --- a/.kokoro/nightly/java8.cfg +++ b/.kokoro/nightly/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg index 9a910249..b4b051cd 100644 --- a/.kokoro/nightly/samples.cfg +++ b/.kokoro/nightly/samples.cfg @@ -2,23 +2,28 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { - key: "JOB_TYPE" - value: "samples" + key: "JOB_TYPE" + value: "samples" } env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" + key: "GCLOUD_PROJECT" + value: "gcloud-devel" } env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" } before_action { diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg index 3b017fc8..495cc7ba 100644 --- a/.kokoro/presubmit/java8.cfg +++ b/.kokoro/presubmit/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.repo-metadata.json b/.repo-metadata.json index 3826ee56..871bbff0 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,6 +1,6 @@ { "name": "talent", - "name_pretty": "Google Cloud Talent Solution", + "name_pretty": "Talent Solution", "product_documentation": "https://cloud.google.com/solutions/talent-solution/", "client_documentation": "https://googleapis.dev/java/google-cloud-talent/latest/", "issue_tracker": "https://issuetracker.google.com/savedsearches/559664", @@ -13,4 +13,4 @@ "transport": "grpc", "requires_billing": true, "api_description": "allows you to transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search (Beta) to provide candidates and employers with an enhanced talent acquisition experience. Learn more about Cloud Talent Solution from the product overview page." -} \ No newline at end of file +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c61051e..ec7bf8b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ # Changelog +## [0.36.0](https://www.github.com/googleapis/java-talent/compare/v0.35.2...v0.36.0) (2020-03-27) + + +### ⚠ BREAKING CHANGES + +* use `TenantName` for resources in place of `TenantOrProjectName` +* adopt the new multi-pattern resource names (#88) + +### Features + +* adopt the new multi-pattern resource names ([#88](https://www.github.com/googleapis/java-talent/issues/88)) ([0a8a4c9](https://www.github.com/googleapis/java-talent/commit/0a8a4c9141e5b024ab4106975690f6b3f1c91bf3)) +* resource name change ([#106](https://www.github.com/googleapis/java-talent/issues/106)) ([2c44fa8](https://www.github.com/googleapis/java-talent/commit/2c44fa85b84cb8b64715a784b9c960a0ac23065c)) + + +### Bug Fixes + +* undeprecate resource name classes until multi-pattern resources are available ([#83](https://www.github.com/googleapis/java-talent/issues/83)) ([c6ac9f8](https://www.github.com/googleapis/java-talent/commit/c6ac9f825e122cd4805f51ae5ef3fc9e2185ca1b)) + + +### Dependencies + +* update core dependencies ([#84](https://www.github.com/googleapis/java-talent/issues/84)) ([2824acd](https://www.github.com/googleapis/java-talent/commit/2824acd3d725f7a2b2c246dad5140e248ceb318c)) +* update dependency com.google.api:api-common to v1.9.0 ([#108](https://www.github.com/googleapis/java-talent/issues/108)) ([3e9cd1f](https://www.github.com/googleapis/java-talent/commit/3e9cd1fbd46f00d83dd5cedcce487644ba7eb465)) +* update dependency com.google.cloud:google-cloud-core to v1.92.5 ([bd15e46](https://www.github.com/googleapis/java-talent/commit/bd15e4646a653e0951999a35336c472bc3c1661c)) +* update dependency com.google.protobuf:protobuf-java to v3.11.4 ([e6ca466](https://www.github.com/googleapis/java-talent/commit/e6ca46662f9f78760fde934e23deaa1d4582d604)) +* update dependency io.grpc:grpc-bom to v1.27.1 ([b9a488d](https://www.github.com/googleapis/java-talent/commit/b9a488d3356e772131a427934011d5f4543fac2c)) + + +### Documentation + +* **regen:** update generate proto documentation ([#86](https://www.github.com/googleapis/java-talent/issues/86)) ([3e2a860](https://www.github.com/googleapis/java-talent/commit/3e2a860d3d10cb46dcbe97582afc0b283d591f01)) +* **regen:** update sample code to set total timeout, add API client header test ([10922f4](https://www.github.com/googleapis/java-talent/commit/10922f4c050ea3a54e57c30d5963d95e749228dd)) + ### [0.35.2](https://www.github.com/googleapis/java-talent/compare/v0.35.1...v0.35.2) (2020-02-04) diff --git a/README.md b/README.md index 83c5bbbb..441f3cf8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Google Google Cloud Talent Solution Client for Java +# Google Talent Solution Client for Java -Java idiomatic client for [Google Cloud Talent Solution][product-docs]. +Java idiomatic client for [Talent Solution][product-docs]. [![Maven][maven-version-image]][maven-version-link] ![Stability][stability-image] @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 3.5.0 + 4.3.0 pom import @@ -32,7 +32,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud google-cloud-talent - + ``` [//]: # ({x-version-update-start:google-cloud-talent:released}) @@ -43,17 +43,18 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-talent - 0.35.2-beta + 0.36.0 + ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-talent:0.35.2-beta' +compile 'com.google.cloud:google-cloud-talent:0.36.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-talent" % "0.35.2-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-talent" % "0.36.0" ``` [//]: # ({x-version-update-end}) @@ -65,8 +66,8 @@ See the [Authentication][authentication] section in the base directory's README. ### Prerequisites -You will need a [Google Cloud Platform Console][developer-console] project with the Google Cloud Talent Solution [API enabled][enable-api]. -You will need to [enable billing][enable-billing] to use Google Google Cloud Talent Solution. +You will need a [Google Cloud Platform Console][developer-console] project with the Talent Solution [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Talent Solution. [Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. @@ -76,14 +77,46 @@ You will need to [enable billing][enable-billing] to use Google Google Cloud Tal You'll need to obtain the `google-cloud-talent` library. See the [Quickstart](#quickstart) section to add `google-cloud-talent` as a dependency in your code. -## About Google Cloud Talent Solution +## About Talent Solution + + +[Talent Solution][product-docs] allows you to transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search (Beta) to provide candidates and employers with an enhanced talent acquisition experience. Learn more about Cloud Talent Solution from the product overview page. + +See the [Talent Solution client library docs][javadocs] to learn how to +use this Talent Solution Client Library. + + + -[Google Cloud Talent Solution][product-docs] allows you to transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search (Beta) to provide candidates and employers with an enhanced talent acquisition experience. Learn more about Cloud Talent Solution from the product overview page. +## Samples -See the [Google Cloud Talent Solution client library docs][javadocs] to learn how to -use this Google Cloud Talent Solution Client Library. +Samples are in the [`samples/`](https://github.com/googleapis/java-talent/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchAutocompleteJobTitle.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchAutocompleteJobTitle.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchCreateJobs.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchCreateJobs.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchDeleteJob.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchDeleteJob.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchUpdateJobs.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchUpdateJobs.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCommuteSearch.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCommuteSearch.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateClientEvent.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateClientEvent.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateCompany.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateCompany.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJob.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJob.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJobCustomAttributes.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJobCustomAttributes.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateTenant.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateTenant.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCustomRankingSearch.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCustomRankingSearch.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteCompany.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteCompany.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteJob.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteJob.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteTenant.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteTenant.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetCompany.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetCompany.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetJob.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetJob.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetTenant.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetTenant.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchHistogramSearch.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchHistogramSearch.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListCompanies.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListCompanies.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListJobs.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListJobs.java) | +| None | [source code](https://github.com/googleapis/java-talent/blob/master/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListTenants.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-talent&page=editor&open_in_editor=samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListTenants.java) | @@ -93,7 +126,7 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr ## Transport -Google Cloud Talent Solution uses gRPC for the transport layer. +Talent Solution uses gRPC for the transport layer. ## Java Versions @@ -158,4 +191,5 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] [license]: https://github.com/googleapis/java-talent/blob/master/LICENSE [enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing [enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=jobs.googleapis.com -[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM \ No newline at end of file +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png diff --git a/google-cloud-talent-bom/pom.xml b/google-cloud-talent-bom/pom.xml index fd5778ce..8dcb50ab 100644 --- a/google-cloud-talent-bom/pom.xml +++ b/google-cloud-talent-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-talent-bom - 0.35.2-beta + 0.36.0 pom com.google.cloud @@ -11,7 +11,7 @@ 0.4.0 - Google Cloud talent BOM + Google Cloud Talent BOM https://github.com/googleapis/java-talent BOM for Google Cloud Talent Solution @@ -64,17 +64,17 @@ com.google.api.grpc proto-google-cloud-talent-v4beta1 - 0.35.2-beta + 0.36.0 com.google.cloud google-cloud-talent - 0.35.2-beta + 0.36.0 com.google.api.grpc grpc-google-cloud-talent-v4beta1 - 0.35.2-beta + 0.36.0 diff --git a/google-cloud-talent/clirr-ignored-differences.xml b/google-cloud-talent/clirr-ignored-differences.xml new file mode 100644 index 00000000..f6bec6aa --- /dev/null +++ b/google-cloud-talent/clirr-ignored-differences.xml @@ -0,0 +1,11 @@ + + + + + + 7005 + com/google/cloud/talent/v4beta1/*ServiceClient + * *(com.google.cloud.talent.v4beta1.TenantOrProjectName*) + * *(com.google.cloud.talent.v4beta1.TenantName*) + + \ No newline at end of file diff --git a/google-cloud-talent/pom.xml b/google-cloud-talent/pom.xml index 032aabf8..0f1084fe 100644 --- a/google-cloud-talent/pom.xml +++ b/google-cloud-talent/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-talent - 0.35.2-beta + 0.36.0 jar Google Cloud Talent Solution https://github.com/googleapis/java-talent @@ -11,7 +11,7 @@ com.google.cloud google-cloud-talent-parent - 0.35.2-beta + 0.36.0 google-cloud-talent diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceClient.java index f101d854..2e95fae0 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceClient.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceClient.java @@ -45,9 +45,8 @@ *
  * 
  * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
- *   ProfileName parent = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
- *   Application application = Application.newBuilder().build();
- *   Application response = applicationServiceClient.createApplication(parent, application);
+ *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
+ *   applicationServiceClient.deleteApplication(name);
  * }
  * 
  * 
@@ -157,6 +156,102 @@ public ApplicationServiceStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified application. + * + *

Sample code: + * + *


+   * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
+   *   applicationServiceClient.deleteApplication(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the application to be deleted. + *

The format is + * "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}". + * For example, "projects/foo/tenants/bar/profiles/baz/applications/qux". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApplication(ApplicationName name) { + DeleteApplicationRequest request = + DeleteApplicationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteApplication(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified application. + * + *

Sample code: + * + *


+   * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
+   *   applicationServiceClient.deleteApplication(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the application to be deleted. + *

The format is + * "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}". + * For example, "projects/foo/tenants/bar/profiles/baz/applications/qux". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApplication(String name) { + DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder().setName(name).build(); + deleteApplication(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified application. + * + *

Sample code: + * + *


+   * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
+   *   DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   applicationServiceClient.deleteApplication(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 void deleteApplication(DeleteApplicationRequest request) { + deleteApplicationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified application. + * + *

Sample code: + * + *


+   * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
+   *   DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = applicationServiceClient.deleteApplicationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteApplicationCallable() { + return stub.deleteApplicationCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a new application entity. @@ -423,102 +518,6 @@ public final UnaryCallable updateApplicat return stub.updateApplicationCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified application. - * - *

Sample code: - * - *


-   * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
-   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
-   *   applicationServiceClient.deleteApplication(name);
-   * }
-   * 
- * - * @param name Required. The resource name of the application to be deleted. - *

The format is - * "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}". - * For example, "projects/foo/tenants/bar/profiles/baz/applications/qux". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApplication(ApplicationName name) { - DeleteApplicationRequest request = - DeleteApplicationRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteApplication(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified application. - * - *

Sample code: - * - *


-   * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
-   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
-   *   applicationServiceClient.deleteApplication(name.toString());
-   * }
-   * 
- * - * @param name Required. The resource name of the application to be deleted. - *

The format is - * "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}". - * For example, "projects/foo/tenants/bar/profiles/baz/applications/qux". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteApplication(String name) { - DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder().setName(name).build(); - deleteApplication(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified application. - * - *

Sample code: - * - *


-   * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
-   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
-   *   DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   applicationServiceClient.deleteApplication(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 void deleteApplication(DeleteApplicationRequest request) { - deleteApplicationCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified application. - * - *

Sample code: - * - *


-   * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
-   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
-   *   DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = applicationServiceClient.deleteApplicationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteApplicationCallable() { - return stub.deleteApplicationCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists all applications associated with the profile. diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceSettings.java index 4a29e8b6..53e393c1 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceSettings.java @@ -49,14 +49,18 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createApplication to 30 seconds: + *

For example, to set the total timeout of deleteApplication to 30 seconds: * *

  * 
  * ApplicationServiceSettings.Builder applicationServiceSettingsBuilder =
  *     ApplicationServiceSettings.newBuilder();
- * applicationServiceSettingsBuilder.createApplicationSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * applicationServiceSettingsBuilder
+ *     .deleteApplicationSettings()
+ *     .setRetrySettings(
+ *         applicationServiceSettingsBuilder.deleteApplicationSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * ApplicationServiceSettings applicationServiceSettings = applicationServiceSettingsBuilder.build();
  * 
  * 
@@ -64,6 +68,11 @@ @Generated("by gapic-generator") @BetaApi public class ApplicationServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to deleteApplication. */ + public UnaryCallSettings deleteApplicationSettings() { + return ((ApplicationServiceStubSettings) getStubSettings()).deleteApplicationSettings(); + } + /** Returns the object with the settings used for calls to createApplication. */ public UnaryCallSettings createApplicationSettings() { return ((ApplicationServiceStubSettings) getStubSettings()).createApplicationSettings(); @@ -79,11 +88,6 @@ public UnaryCallSettings updateApplicatio return ((ApplicationServiceStubSettings) getStubSettings()).updateApplicationSettings(); } - /** Returns the object with the settings used for calls to deleteApplication. */ - public UnaryCallSettings deleteApplicationSettings() { - return ((ApplicationServiceStubSettings) getStubSettings()).deleteApplicationSettings(); - } - /** Returns the object with the settings used for calls to listApplications. */ public PagedCallSettings< ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> @@ -188,6 +192,11 @@ public Builder applyToAllUnaryMethods( return this; } + /** Returns the builder for the settings used for calls to deleteApplication. */ + public UnaryCallSettings.Builder deleteApplicationSettings() { + return getStubSettingsBuilder().deleteApplicationSettings(); + } + /** Returns the builder for the settings used for calls to createApplication. */ public UnaryCallSettings.Builder createApplicationSettings() { @@ -205,11 +214,6 @@ public UnaryCallSettings.Builder getApplicat return getStubSettingsBuilder().updateApplicationSettings(); } - /** Returns the builder for the settings used for calls to deleteApplication. */ - public UnaryCallSettings.Builder deleteApplicationSettings() { - return getStubSettingsBuilder().deleteApplicationSettings(); - } - /** Returns the builder for the settings used for calls to listApplications. */ public PagedCallSettings.Builder< ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceClient.java index 4a46d770..c2604630 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceClient.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceClient.java @@ -44,9 +44,8 @@ *
  * 
  * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
- *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
- *   Company company = Company.newBuilder().build();
- *   Company response = companyServiceClient.createCompany(parent, company);
+ *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
+ *   companyServiceClient.deleteCompany(name);
  * }
  * 
  * 
@@ -155,6 +154,132 @@ public CompanyServiceStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified company. Prerequisite: The company has no jobs associated with it. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
+   *   companyServiceClient.deleteCompany(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the company to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + *

If tenant id is unspecified, the default tenant is used, for example, + * "projects/foo/companies/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCompany(CompanyName name) { + DeleteCompanyRequest request = + DeleteCompanyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified company. Prerequisite: The company has no jobs associated with it. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
+   *   companyServiceClient.deleteCompany(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the company to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + *

If tenant id is unspecified, the default tenant is used, for example, + * "projects/foo/companies/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCompany(String name) { + DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder().setName(name).build(); + deleteCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified company. Prerequisite: The company has no jobs associated with it. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
+   *   DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   companyServiceClient.deleteCompany(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 void deleteCompany(DeleteCompanyRequest request) { + deleteCompanyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified company. Prerequisite: The company has no jobs associated with it. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
+   *   DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = companyServiceClient.deleteCompanyCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteCompanyCallable() { + return stub.deleteCompanyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new company entity. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Company company = Company.newBuilder().build();
+   *   Company response = companyServiceClient.createCompany(parent, company);
+   * }
+   * 
+ * + * @param parent Required. Resource name of the tenant under which the company is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created, for + * example, "projects/foo". + * @param company Required. The company to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Company createCompany(TenantName parent, Company company) { + CreateCompanyRequest request = + CreateCompanyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCompany(company) + .build(); + return createCompany(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a new company entity. @@ -163,7 +288,7 @@ public CompanyServiceStub getStub() { * *


    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   Company company = Company.newBuilder().build();
    *   Company response = companyServiceClient.createCompany(parent, company);
    * }
@@ -176,7 +301,7 @@ public CompanyServiceStub getStub() {
    * @param company Required. The company to be created.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final Company createCompany(TenantOrProjectName parent, Company company) {
+  public final Company createCompany(ProjectName parent, Company company) {
     CreateCompanyRequest request =
         CreateCompanyRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -193,7 +318,7 @@ public final Company createCompany(TenantOrProjectName parent, Company company)
    *
    * 

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   Company company = Company.newBuilder().build();
    *   Company response = companyServiceClient.createCompany(parent.toString(), company);
    * }
@@ -220,7 +345,7 @@ public final Company createCompany(String parent, Company company) {
    *
    * 

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   Company company = Company.newBuilder().build();
    *   CreateCompanyRequest request = CreateCompanyRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -245,7 +370,7 @@ public final Company createCompany(CreateCompanyRequest request) {
    *
    * 

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   Company company = Company.newBuilder().build();
    *   CreateCompanyRequest request = CreateCompanyRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -269,7 +394,7 @@ public final UnaryCallable createCompanyCallable(
    *
    * 

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
    *   Company response = companyServiceClient.getCompany(name);
    * }
    * 
@@ -295,7 +420,7 @@ public final Company getCompany(CompanyName name) { * *

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
    *   Company response = companyServiceClient.getCompany(name.toString());
    * }
    * 
@@ -320,7 +445,7 @@ public final Company getCompany(String name) { * *

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
    *   GetCompanyRequest request = GetCompanyRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -343,7 +468,7 @@ public final Company getCompany(GetCompanyRequest request) {
    *
    * 

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
    *   GetCompanyRequest request = GetCompanyRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -425,98 +550,32 @@ public final UnaryCallable updateCompanyCallable(
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Deletes specified company. Prerequisite: The company has no jobs associated with it.
-   *
-   * 

Sample code: - * - *


-   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
-   *   companyServiceClient.deleteCompany(name);
-   * }
-   * 
- * - * @param name Required. The resource name of the company to be deleted. - *

The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - *

If tenant id is unspecified, the default tenant is used, for example, - * "projects/foo/companies/bar". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteCompany(CompanyName name) { - DeleteCompanyRequest request = - DeleteCompanyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteCompany(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified company. Prerequisite: The company has no jobs associated with it. - * - *

Sample code: - * - *


-   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
-   *   companyServiceClient.deleteCompany(name.toString());
-   * }
-   * 
- * - * @param name Required. The resource name of the company to be deleted. - *

The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - *

If tenant id is unspecified, the default tenant is used, for example, - * "projects/foo/companies/bar". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteCompany(String name) { - DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder().setName(name).build(); - deleteCompany(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified company. Prerequisite: The company has no jobs associated with it. + * Lists all companies associated with the project. * *

Sample code: * *


    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
-   *   DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   companyServiceClient.deleteCompany(request);
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   for (Company element : companyServiceClient.listCompanies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Resource name of the tenant under which the company is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenant/bar". + *

If tenant id is unspecified, the default tenant will be used, for example, + * "projects/foo". * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteCompany(DeleteCompanyRequest request) { - deleteCompanyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified company. Prerequisite: The company has no jobs associated with it. - * - *

Sample code: - * - *


-   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
-   *   DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = companyServiceClient.deleteCompanyCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteCompanyCallable() { - return stub.deleteCompanyCallable(); + public final ListCompaniesPagedResponse listCompanies(TenantName parent) { + ListCompaniesRequest request = + ListCompaniesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCompanies(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -527,7 +586,7 @@ public final UnaryCallable deleteCompanyCallable() * *

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   for (Company element : companyServiceClient.listCompanies(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -541,7 +600,7 @@ public final UnaryCallable deleteCompanyCallable()
    *     "projects/foo".
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListCompaniesPagedResponse listCompanies(TenantOrProjectName parent) {
+  public final ListCompaniesPagedResponse listCompanies(ProjectName parent) {
     ListCompaniesRequest request =
         ListCompaniesRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -557,7 +616,7 @@ public final ListCompaniesPagedResponse listCompanies(TenantOrProjectName parent
    *
    * 

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   for (Company element : companyServiceClient.listCompanies(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -584,7 +643,7 @@ public final ListCompaniesPagedResponse listCompanies(String parent) {
    *
    * 

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   ListCompaniesRequest request = ListCompaniesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -609,7 +668,7 @@ public final ListCompaniesPagedResponse listCompanies(ListCompaniesRequest reque
    *
    * 

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   ListCompaniesRequest request = ListCompaniesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -634,7 +693,7 @@ public final ListCompaniesPagedResponse listCompanies(ListCompaniesRequest reque
    *
    * 

    * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   ListCompaniesRequest request = ListCompaniesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceSettings.java
index 9648c31f..57ca428f 100644
--- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceSettings.java
+++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceSettings.java
@@ -49,14 +49,18 @@
  * 

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createCompany to 30 seconds: + *

For example, to set the total timeout of deleteCompany to 30 seconds: * *

  * 
  * CompanyServiceSettings.Builder companyServiceSettingsBuilder =
  *     CompanyServiceSettings.newBuilder();
- * companyServiceSettingsBuilder.createCompanySettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * companyServiceSettingsBuilder
+ *     .deleteCompanySettings()
+ *     .setRetrySettings(
+ *         companyServiceSettingsBuilder.deleteCompanySettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * CompanyServiceSettings companyServiceSettings = companyServiceSettingsBuilder.build();
  * 
  * 
@@ -64,6 +68,11 @@ @Generated("by gapic-generator") @BetaApi public class CompanyServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to deleteCompany. */ + public UnaryCallSettings deleteCompanySettings() { + return ((CompanyServiceStubSettings) getStubSettings()).deleteCompanySettings(); + } + /** Returns the object with the settings used for calls to createCompany. */ public UnaryCallSettings createCompanySettings() { return ((CompanyServiceStubSettings) getStubSettings()).createCompanySettings(); @@ -79,11 +88,6 @@ public UnaryCallSettings updateCompanySettings() return ((CompanyServiceStubSettings) getStubSettings()).updateCompanySettings(); } - /** Returns the object with the settings used for calls to deleteCompany. */ - public UnaryCallSettings deleteCompanySettings() { - return ((CompanyServiceStubSettings) getStubSettings()).deleteCompanySettings(); - } - /** Returns the object with the settings used for calls to listCompanies. */ public PagedCallSettings listCompaniesSettings() { @@ -187,6 +191,11 @@ public Builder applyToAllUnaryMethods( return this; } + /** Returns the builder for the settings used for calls to deleteCompany. */ + public UnaryCallSettings.Builder deleteCompanySettings() { + return getStubSettingsBuilder().deleteCompanySettings(); + } + /** Returns the builder for the settings used for calls to createCompany. */ public UnaryCallSettings.Builder createCompanySettings() { return getStubSettingsBuilder().createCompanySettings(); @@ -202,11 +211,6 @@ public UnaryCallSettings.Builder updateCompanySet return getStubSettingsBuilder().updateCompanySettings(); } - /** Returns the builder for the settings used for calls to deleteCompany. */ - public UnaryCallSettings.Builder deleteCompanySettings() { - return getStubSettingsBuilder().deleteCompanySettings(); - } - /** Returns the builder for the settings used for calls to listCompanies. */ public PagedCallSettings.Builder< ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse> diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompletionClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompletionClient.java index ff60a9dc..f0072675 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompletionClient.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompletionClient.java @@ -34,7 +34,7 @@ *
  * 
  * try (CompletionClient completionClient = CompletionClient.create()) {
- *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
  *   String query = "";
  *   int pageSize = 0;
  *   CompleteQueryRequest request = CompleteQueryRequest.newBuilder()
@@ -158,7 +158,7 @@ public CompletionStub getStub() {
    *
    * 

    * try (CompletionClient completionClient = CompletionClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   String query = "";
    *   int pageSize = 0;
    *   CompleteQueryRequest request = CompleteQueryRequest.newBuilder()
@@ -186,7 +186,7 @@ public final CompleteQueryResponse completeQuery(CompleteQueryRequest request) {
    *
    * 

    * try (CompletionClient completionClient = CompletionClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   String query = "";
    *   int pageSize = 0;
    *   CompleteQueryRequest request = CompleteQueryRequest.newBuilder()
diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompletionSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompletionSettings.java
index 510d1133..f39cf742 100644
--- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompletionSettings.java
+++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompletionSettings.java
@@ -51,8 +51,12 @@
  * 
  * CompletionSettings.Builder completionSettingsBuilder =
  *     CompletionSettings.newBuilder();
- * completionSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * completionSettingsBuilder
+ *     .completeQuerySettings()
+ *     .setRetrySettings(
+ *         completionSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * CompletionSettings completionSettings = completionSettingsBuilder.build();
  * 
  * 
diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/EventServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/EventServiceClient.java index 175d0f88..393b5307 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/EventServiceClient.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/EventServiceClient.java @@ -34,7 +34,7 @@ *
  * 
  * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
- *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
  *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
  *   ClientEvent response = eventServiceClient.createClientEvent(parent, clientEvent);
  * }
@@ -155,7 +155,7 @@ public EventServiceStub getStub() {
    *
    * 

    * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
    *   ClientEvent response = eventServiceClient.createClientEvent(parent, clientEvent);
    * }
@@ -169,7 +169,7 @@ public EventServiceStub getStub() {
    *     that uses Cloud Talent Solution.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ClientEvent createClientEvent(TenantOrProjectName parent, ClientEvent clientEvent) {
+  public final ClientEvent createClientEvent(TenantName parent, ClientEvent clientEvent) {
     CreateClientEventRequest request =
         CreateClientEventRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -189,7 +189,41 @@ public final ClientEvent createClientEvent(TenantOrProjectName parent, ClientEve
    *
    * 

    * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
+   *   ClientEvent response = eventServiceClient.createClientEvent(parent, clientEvent);
+   * }
+   * 
+ * + * @param parent Required. Resource name of the tenant under which the event is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created, for + * example, "projects/foo". + * @param clientEvent Required. Events issued when end user interacts with customer's application + * that uses Cloud Talent Solution. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ClientEvent createClientEvent(ProjectName parent, ClientEvent clientEvent) { + CreateClientEventRequest request = + CreateClientEventRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setClientEvent(clientEvent) + .build(); + return createClientEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Report events issued when end user interacts with customer's application that uses Cloud Talent + * Solution. You may inspect the created events in [self service + * tools](https://console.cloud.google.com/talent-solution/overview). [Learn + * more](https://cloud.google.com/talent-solution/docs/management-tools) about self service tools. + * + *

Sample code: + * + *


+   * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
    *   ClientEvent response = eventServiceClient.createClientEvent(parent.toString(), clientEvent);
    * }
@@ -220,7 +254,7 @@ public final ClientEvent createClientEvent(String parent, ClientEvent clientEven
    *
    * 

    * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
    *   CreateClientEventRequest request = CreateClientEventRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -248,7 +282,7 @@ public final ClientEvent createClientEvent(CreateClientEventRequest request) {
    *
    * 

    * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
    *   CreateClientEventRequest request = CreateClientEventRequest.newBuilder()
    *     .setParent(parent.toString())
diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/EventServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/EventServiceSettings.java
index 88d6d3b9..9ceb3f2f 100644
--- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/EventServiceSettings.java
+++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/EventServiceSettings.java
@@ -51,8 +51,12 @@
  * 
  * EventServiceSettings.Builder eventServiceSettingsBuilder =
  *     EventServiceSettings.newBuilder();
- * eventServiceSettingsBuilder.createClientEventSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * eventServiceSettingsBuilder
+ *     .createClientEventSettings()
+ *     .setRetrySettings(
+ *         eventServiceSettingsBuilder.createClientEventSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * EventServiceSettings eventServiceSettings = eventServiceSettingsBuilder.build();
  * 
  * 
diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java index ca7609d5..ef958c01 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java @@ -49,9 +49,8 @@ *
  * 
  * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
- *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
- *   Job job = Job.newBuilder().build();
- *   Job response = jobServiceClient.createJob(parent, job);
+ *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
+ *   jobServiceClient.deleteJob(name);
  * }
  * 
  * 
@@ -171,6 +170,142 @@ public final OperationsClient getOperationsClient() { return operationsClient; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified job. + * + *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
+   *   jobServiceClient.deleteJob(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the job to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, + * "projects/foo/tenants/bar/jobs/baz". + *

If tenant id is unspecified, the default tenant is used. For example, + * "projects/foo/jobs/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteJob(JobName name) { + DeleteJobRequest request = + DeleteJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified job. + * + *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
+   *   jobServiceClient.deleteJob(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the job to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, + * "projects/foo/tenants/bar/jobs/baz". + *

If tenant id is unspecified, the default tenant is used. For example, + * "projects/foo/jobs/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteJob(String name) { + DeleteJobRequest request = DeleteJobRequest.newBuilder().setName(name).build(); + deleteJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified job. + * + *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
+   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   jobServiceClient.deleteJob(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 void deleteJob(DeleteJobRequest request) { + deleteJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified job. + * + *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
+   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = jobServiceClient.deleteJobCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteJobCallable() { + return stub.deleteJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new job. + * + *

Typically, the job becomes searchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Job job = Job.newBuilder().build();
+   *   Job response = jobServiceClient.createJob(parent, job);
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified a default tenant is created. For + * example, "projects/foo". + * @param job Required. The Job to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Job createJob(TenantName parent, Job job) { + CreateJobRequest request = + CreateJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setJob(job) + .build(); + return createJob(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a new job. @@ -181,7 +316,7 @@ public final OperationsClient getOperationsClient() { * *


    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   Job job = Job.newBuilder().build();
    *   Job response = jobServiceClient.createJob(parent, job);
    * }
@@ -194,7 +329,7 @@ public final OperationsClient getOperationsClient() {
    * @param job Required. The Job to be created.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final Job createJob(TenantOrProjectName parent, Job job) {
+  public final Job createJob(ProjectName parent, Job job) {
     CreateJobRequest request =
         CreateJobRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -213,7 +348,7 @@ public final Job createJob(TenantOrProjectName parent, Job job) {
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   Job job = Job.newBuilder().build();
    *   Job response = jobServiceClient.createJob(parent.toString(), job);
    * }
@@ -241,7 +376,7 @@ public final Job createJob(String parent, Job job) {
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   Job job = Job.newBuilder().build();
    *   CreateJobRequest request = CreateJobRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -268,7 +403,7 @@ public final Job createJob(CreateJobRequest request) {
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   Job job = Job.newBuilder().build();
    *   CreateJobRequest request = CreateJobRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -284,6 +419,180 @@ public final UnaryCallable createJobCallable() {
     return stub.createJobCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Begins executing a batch create jobs operation.
+   *
+   * 

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   JobOperationResult response = jobServiceClient.batchCreateJobsAsync(parent, jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param jobs Required. The jobs to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchCreateJobsAsync( + TenantName parent, List jobs) { + BatchCreateJobsRequest request = + BatchCreateJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllJobs(jobs) + .build(); + return batchCreateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   JobOperationResult response = jobServiceClient.batchCreateJobsAsync(parent, jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param jobs Required. The jobs to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchCreateJobsAsync( + ProjectName parent, List jobs) { + BatchCreateJobsRequest request = + BatchCreateJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllJobs(jobs) + .build(); + return batchCreateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   JobOperationResult response = jobServiceClient.batchCreateJobsAsync(parent.toString(), jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param jobs Required. The jobs to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchCreateJobsAsync( + String parent, List jobs) { + BatchCreateJobsRequest request = + BatchCreateJobsRequest.newBuilder().setParent(parent).addAllJobs(jobs).build(); + return batchCreateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchCreateJobsRequest request = BatchCreateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   JobOperationResult response = jobServiceClient.batchCreateJobsAsync(request).get();
+   * }
+   * 
+ * + * @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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchCreateJobsAsync( + BatchCreateJobsRequest request) { + return batchCreateJobsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchCreateJobsRequest request = BatchCreateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   OperationFuture<JobOperationResult, BatchOperationMetadata> future = jobServiceClient.batchCreateJobsOperationCallable().futureCall(request);
+   *   // Do something
+   *   JobOperationResult response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + batchCreateJobsOperationCallable() { + return stub.batchCreateJobsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchCreateJobsRequest request = BatchCreateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   ApiFuture<Operation> future = jobServiceClient.batchCreateJobsCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable batchCreateJobsCallable() { + return stub.batchCreateJobsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days. @@ -292,7 +601,7 @@ public final UnaryCallable createJobCallable() { * *

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]");
+   *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
    *   Job response = jobServiceClient.getJob(name);
    * }
    * 
@@ -318,7 +627,7 @@ public final Job getJob(JobName name) { * *

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]");
+   *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
    *   Job response = jobServiceClient.getJob(name.toString());
    * }
    * 
@@ -343,7 +652,7 @@ public final Job getJob(String name) { * *

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]");
+   *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
    *   GetJobRequest request = GetJobRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -366,7 +675,7 @@ public final Job getJob(GetJobRequest request) {
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]");
+   *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
    *   GetJobRequest request = GetJobRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -419,144 +728,362 @@ public final Job updateJob(Job job) {
    *   UpdateJobRequest request = UpdateJobRequest.newBuilder()
    *     .setJob(job)
    *     .build();
-   *   Job response = jobServiceClient.updateJob(request);
+   *   Job response = jobServiceClient.updateJob(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 Job updateJob(UpdateJobRequest request) { + return updateJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified job. + * + *

Typically, updated contents become visible in search results within 10 seconds, but it may + * take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   Job job = Job.newBuilder().build();
+   *   UpdateJobRequest request = UpdateJobRequest.newBuilder()
+   *     .setJob(job)
+   *     .build();
+   *   ApiFuture<Job> future = jobServiceClient.updateJobCallable().futureCall(request);
+   *   // Do something
+   *   Job response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateJobCallable() { + return stub.updateJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   JobOperationResult response = jobServiceClient.batchUpdateJobsAsync(parent, jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param jobs Required. The jobs to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchUpdateJobsAsync( + TenantName parent, List jobs) { + BatchUpdateJobsRequest request = + BatchUpdateJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllJobs(jobs) + .build(); + return batchUpdateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   JobOperationResult response = jobServiceClient.batchUpdateJobsAsync(parent, jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param jobs Required. The jobs to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchUpdateJobsAsync( + ProjectName parent, List jobs) { + BatchUpdateJobsRequest request = + BatchUpdateJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllJobs(jobs) + .build(); + return batchUpdateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   JobOperationResult response = jobServiceClient.batchUpdateJobsAsync(parent.toString(), jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param jobs Required. The jobs to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchUpdateJobsAsync( + String parent, List jobs) { + BatchUpdateJobsRequest request = + BatchUpdateJobsRequest.newBuilder().setParent(parent).addAllJobs(jobs).build(); + return batchUpdateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchUpdateJobsRequest request = BatchUpdateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   JobOperationResult response = jobServiceClient.batchUpdateJobsAsync(request).get();
+   * }
+   * 
+ * + * @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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchUpdateJobsAsync( + BatchUpdateJobsRequest request) { + return batchUpdateJobsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchUpdateJobsRequest request = BatchUpdateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   OperationFuture<JobOperationResult, BatchOperationMetadata> future = jobServiceClient.batchUpdateJobsOperationCallable().futureCall(request);
+   *   // Do something
+   *   JobOperationResult response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + batchUpdateJobsOperationCallable() { + return stub.batchUpdateJobsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchUpdateJobsRequest request = BatchUpdateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   ApiFuture<Operation> future = jobServiceClient.batchUpdateJobsCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
    * }
    * 
- * - * @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 Job updateJob(UpdateJobRequest request) { - return updateJobCallable().call(request); + public final UnaryCallable batchUpdateJobsCallable() { + return stub.batchUpdateJobsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates specified job. - * - *

Typically, updated contents become visible in search results within 10 seconds, but it may - * take up to 5 minutes. + * Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. * *

Sample code: * *


    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   Job job = Job.newBuilder().build();
-   *   UpdateJobRequest request = UpdateJobRequest.newBuilder()
-   *     .setJob(job)
-   *     .build();
-   *   ApiFuture<Job> future = jobServiceClient.updateJobCallable().futureCall(request);
-   *   // Do something
-   *   Job response = future.get();
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String filter = "";
+   *   jobServiceClient.batchDeleteJobs(parent, filter);
    * }
    * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param filter Required. The filter string specifies the jobs to be deleted. + *

Supported operator: =, AND + *

The fields eligible for filtering are: + *

* `companyName` (Required) * `requisitionId` (Required) + *

Sample Query: companyName = "projects/foo/companies/bar" AND requisitionId = "req-1" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable updateJobCallable() { - return stub.updateJobCallable(); + public final void batchDeleteJobs(TenantName parent, String filter) { + BatchDeleteJobsRequest request = + BatchDeleteJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFilter(filter) + .build(); + batchDeleteJobs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified job. - * - *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. * *

Sample code: * *


    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]");
-   *   jobServiceClient.deleteJob(name);
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String filter = "";
+   *   jobServiceClient.batchDeleteJobs(parent, filter);
    * }
    * 
* - * @param name Required. The resource name of the job to be deleted. - *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, - * "projects/foo/tenants/bar/jobs/baz". - *

If tenant id is unspecified, the default tenant is used. For example, - * "projects/foo/jobs/bar". + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param filter Required. The filter string specifies the jobs to be deleted. + *

Supported operator: =, AND + *

The fields eligible for filtering are: + *

* `companyName` (Required) * `requisitionId` (Required) + *

Sample Query: companyName = "projects/foo/companies/bar" AND requisitionId = "req-1" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteJob(JobName name) { - DeleteJobRequest request = - DeleteJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteJob(request); + public final void batchDeleteJobs(ProjectName parent, String filter) { + BatchDeleteJobsRequest request = + BatchDeleteJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFilter(filter) + .build(); + batchDeleteJobs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified job. - * - *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. * *

Sample code: * *


    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]");
-   *   jobServiceClient.deleteJob(name.toString());
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String filter = "";
+   *   jobServiceClient.batchDeleteJobs(parent.toString(), filter);
    * }
    * 
* - * @param name Required. The resource name of the job to be deleted. - *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, - * "projects/foo/tenants/bar/jobs/baz". - *

If tenant id is unspecified, the default tenant is used. For example, - * "projects/foo/jobs/bar". + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param filter Required. The filter string specifies the jobs to be deleted. + *

Supported operator: =, AND + *

The fields eligible for filtering are: + *

* `companyName` (Required) * `requisitionId` (Required) + *

Sample Query: companyName = "projects/foo/companies/bar" AND requisitionId = "req-1" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteJob(String name) { - DeleteJobRequest request = DeleteJobRequest.newBuilder().setName(name).build(); - deleteJob(request); + public final void batchDeleteJobs(String parent, String filter) { + BatchDeleteJobsRequest request = + BatchDeleteJobsRequest.newBuilder().setParent(parent).setFilter(filter).build(); + batchDeleteJobs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified job. - * - *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. * *

Sample code: * *


    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]");
-   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
-   *     .setName(name.toString())
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String filter = "";
+   *   BatchDeleteJobsRequest request = BatchDeleteJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFilter(filter)
    *     .build();
-   *   jobServiceClient.deleteJob(request);
+   *   jobServiceClient.batchDeleteJobs(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 void deleteJob(DeleteJobRequest request) { - deleteJobCallable().call(request); + public final void batchDeleteJobs(BatchDeleteJobsRequest request) { + batchDeleteJobsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified job. - * - *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. * *

Sample code: * *


    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]");
-   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
-   *     .setName(name.toString())
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String filter = "";
+   *   BatchDeleteJobsRequest request = BatchDeleteJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFilter(filter)
    *     .build();
-   *   ApiFuture<Void> future = jobServiceClient.deleteJobCallable().futureCall(request);
+   *   ApiFuture<Void> future = jobServiceClient.batchDeleteJobsCallable().futureCall(request);
    *   // Do something
    *   future.get();
    * }
    * 
*/ - public final UnaryCallable deleteJobCallable() { - return stub.deleteJobCallable(); + public final UnaryCallable batchDeleteJobsCallable() { + return stub.batchDeleteJobsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -567,7 +1094,7 @@ public final UnaryCallable deleteJobCallable() { * *

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   String filter = "";
    *   for (Job element : jobServiceClient.listJobs(parent, filter).iterateAll()) {
    *     // doThingsWith(element);
@@ -590,7 +1117,7 @@ public final UnaryCallable deleteJobCallable() {
    *     "projects/foo/tenants/bar/companies/baz" AND status = "EXPIRED"
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListJobsPagedResponse listJobs(TenantOrProjectName parent, String filter) {
+  public final ListJobsPagedResponse listJobs(TenantName parent, String filter) {
     ListJobsRequest request =
         ListJobsRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -607,9 +1134,9 @@ public final ListJobsPagedResponse listJobs(TenantOrProjectName parent, String f
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   String filter = "";
-   *   for (Job element : jobServiceClient.listJobs(parent.toString(), filter).iterateAll()) {
+   *   for (Job element : jobServiceClient.listJobs(parent, filter).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
@@ -630,9 +1157,12 @@ public final ListJobsPagedResponse listJobs(TenantOrProjectName parent, String f
    *     "projects/foo/tenants/bar/companies/baz" AND status = "EXPIRED"
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListJobsPagedResponse listJobs(String parent, String filter) {
+  public final ListJobsPagedResponse listJobs(ProjectName parent, String filter) {
     ListJobsRequest request =
-        ListJobsRequest.newBuilder().setParent(parent).setFilter(filter).build();
+        ListJobsRequest.newBuilder()
+            .setParent(parent == null ? null : parent.toString())
+            .setFilter(filter)
+            .build();
     return listJobs(request);
   }
 
@@ -644,23 +1174,33 @@ public final ListJobsPagedResponse listJobs(String parent, String filter) {
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   String filter = "";
-   *   ListJobsRequest request = ListJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setFilter(filter)
-   *     .build();
-   *   for (Job element : jobServiceClient.listJobs(request).iterateAll()) {
+   *   for (Job element : jobServiceClient.listJobs(parent.toString(), filter).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For + * example, "projects/foo". + * @param filter Required. The filter string specifies the jobs to be enumerated. + *

Supported operator: =, AND + *

The fields eligible for filtering are: + *

* `companyName` (Required) * `requisitionId` * `status` Available values: + * OPEN, EXPIRED, ALL. Defaults to OPEN if no value is specified. + *

Sample Query: + *

* companyName = "projects/foo/tenants/bar/companies/baz" * companyName = + * "projects/foo/tenants/bar/companies/baz" AND requisitionId = "req-1" * companyName = + * "projects/foo/tenants/bar/companies/baz" AND status = "EXPIRED" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListJobsPagedResponse listJobs(ListJobsRequest request) { - return listJobsPagedCallable().call(request); + public final ListJobsPagedResponse listJobs(String parent, String filter) { + ListJobsRequest request = + ListJobsRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listJobs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -671,169 +1211,82 @@ public final ListJobsPagedResponse listJobs(ListJobsRequest request) { * *


    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   String filter = "";
    *   ListJobsRequest request = ListJobsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .setFilter(filter)
    *     .build();
-   *   ApiFuture<ListJobsPagedResponse> future = jobServiceClient.listJobsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (Job element : future.get().iterateAll()) {
+   *   for (Job element : jobServiceClient.listJobs(request).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
- */ - public final UnaryCallable listJobsPagedCallable() { - return stub.listJobsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists jobs by filter. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
-   *   String filter = "";
-   *   ListJobsRequest request = ListJobsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setFilter(filter)
-   *     .build();
-   *   while (true) {
-   *     ListJobsResponse response = jobServiceClient.listJobsCallable().call(request);
-   *     for (Job element : response.getJobsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable listJobsCallable() { - return stub.listJobsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
-   *   String filter = "";
-   *   jobServiceClient.batchDeleteJobs(parent, filter);
-   * }
-   * 
- * - * @param parent Required. The resource name of the tenant under which the job is created. - *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For - * example, "projects/foo". - * @param filter Required. The filter string specifies the jobs to be deleted. - *

Supported operator: =, AND - *

The fields eligible for filtering are: - *

* `companyName` (Required) * `requisitionId` (Required) - *

Sample Query: companyName = "projects/foo/companies/bar" AND requisitionId = "req-1" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void batchDeleteJobs(TenantOrProjectName parent, String filter) { - BatchDeleteJobsRequest request = - BatchDeleteJobsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setFilter(filter) - .build(); - batchDeleteJobs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
-   *   String filter = "";
-   *   jobServiceClient.batchDeleteJobs(parent.toString(), filter);
-   * }
-   * 
* - * @param parent Required. The resource name of the tenant under which the job is created. - *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For - * example, "projects/foo". - * @param filter Required. The filter string specifies the jobs to be deleted. - *

Supported operator: =, AND - *

The fields eligible for filtering are: - *

* `companyName` (Required) * `requisitionId` (Required) - *

Sample Query: companyName = "projects/foo/companies/bar" AND requisitionId = "req-1" + * @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 void batchDeleteJobs(String parent, String filter) { - BatchDeleteJobsRequest request = - BatchDeleteJobsRequest.newBuilder().setParent(parent).setFilter(filter).build(); - batchDeleteJobs(request); + public final ListJobsPagedResponse listJobs(ListJobsRequest request) { + return listJobsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. + * Lists jobs by filter. * *

Sample code: * *


    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   String filter = "";
-   *   BatchDeleteJobsRequest request = BatchDeleteJobsRequest.newBuilder()
+   *   ListJobsRequest request = ListJobsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .setFilter(filter)
    *     .build();
-   *   jobServiceClient.batchDeleteJobs(request);
+   *   ApiFuture<ListJobsPagedResponse> future = jobServiceClient.listJobsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Job element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
- * - * @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 void batchDeleteJobs(BatchDeleteJobsRequest request) { - batchDeleteJobsCallable().call(request); + public final UnaryCallable listJobsPagedCallable() { + return stub.listJobsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. + * Lists jobs by filter. * *

Sample code: * *


    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   String filter = "";
-   *   BatchDeleteJobsRequest request = BatchDeleteJobsRequest.newBuilder()
+   *   ListJobsRequest request = ListJobsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .setFilter(filter)
    *     .build();
-   *   ApiFuture<Void> future = jobServiceClient.batchDeleteJobsCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
+   *   while (true) {
+   *     ListJobsResponse response = jobServiceClient.listJobsCallable().call(request);
+   *     for (Job element : response.getJobsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
    * }
    * 
*/ - public final UnaryCallable batchDeleteJobsCallable() { - return stub.batchDeleteJobsCallable(); + public final UnaryCallable listJobsCallable() { + return stub.listJobsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -849,7 +1302,7 @@ public final UnaryCallable batchDeleteJobsCallabl * *

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
    *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -881,7 +1334,7 @@ public final SearchJobsPagedResponse searchJobs(SearchJobsRequest request) {
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
    *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -912,7 +1365,7 @@ public final UnaryCallable searchJob
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
    *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -953,7 +1406,7 @@ public final UnaryCallable searchJobsCall
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
    *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -988,7 +1441,7 @@ public final SearchJobsForAlertPagedResponse searchJobsForAlert(SearchJobsReques
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
    *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -1023,7 +1476,7 @@ public final SearchJobsForAlertPagedResponse searchJobsForAlert(SearchJobsReques
    *
    * 

    * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
    *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
    *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -1048,222 +1501,6 @@ public final UnaryCallable searchJobsForA
     return stub.searchJobsForAlertCallable();
   }
 
-  // AUTO-GENERATED DOCUMENTATION AND METHOD
-  /**
-   * Begins executing a batch create jobs operation.
-   *
-   * 

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   String formattedParent = TenantName.format("[PROJECT]", "[TENANT]");
-   *   List<Job> jobs = new ArrayList<>();
-   *   JobOperationResult response = jobServiceClient.batchCreateJobsAsync(formattedParent, jobs).get();
-   * }
-   * 
- * - * @param parent Required. The resource name of the tenant under which the job is created. - *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For - * example, "projects/foo". - * @param jobs Required. The jobs to be created. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchCreateJobsAsync( - String parent, List jobs) { - BatchCreateJobsRequest request = - BatchCreateJobsRequest.newBuilder().setParent(parent).addAllJobs(jobs).build(); - return batchCreateJobsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Begins executing a batch create jobs operation. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   String formattedParent = TenantName.format("[PROJECT]", "[TENANT]");
-   *   List<Job> jobs = new ArrayList<>();
-   *   BatchCreateJobsRequest request = BatchCreateJobsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .addAllJobs(jobs)
-   *     .build();
-   *   JobOperationResult response = jobServiceClient.batchCreateJobsAsync(request).get();
-   * }
-   * 
- * - * @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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchCreateJobsAsync( - BatchCreateJobsRequest request) { - return batchCreateJobsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Begins executing a batch create jobs operation. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   String formattedParent = TenantName.format("[PROJECT]", "[TENANT]");
-   *   List<Job> jobs = new ArrayList<>();
-   *   BatchCreateJobsRequest request = BatchCreateJobsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .addAllJobs(jobs)
-   *     .build();
-   *   OperationFuture<JobOperationResult, BatchOperationMetadata> future = jobServiceClient.batchCreateJobsOperationCallable().futureCall(request);
-   *   // Do something
-   *   JobOperationResult response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - batchCreateJobsOperationCallable() { - return stub.batchCreateJobsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Begins executing a batch create jobs operation. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   String formattedParent = TenantName.format("[PROJECT]", "[TENANT]");
-   *   List<Job> jobs = new ArrayList<>();
-   *   BatchCreateJobsRequest request = BatchCreateJobsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .addAllJobs(jobs)
-   *     .build();
-   *   ApiFuture<Operation> future = jobServiceClient.batchCreateJobsCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable batchCreateJobsCallable() { - return stub.batchCreateJobsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Begins executing a batch update jobs operation. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   String formattedParent = TenantName.format("[PROJECT]", "[TENANT]");
-   *   List<Job> jobs = new ArrayList<>();
-   *   JobOperationResult response = jobServiceClient.batchUpdateJobsAsync(formattedParent, jobs).get();
-   * }
-   * 
- * - * @param parent Required. The resource name of the tenant under which the job is created. - *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For - * example, "projects/foo". - * @param jobs Required. The jobs to be updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchUpdateJobsAsync( - String parent, List jobs) { - BatchUpdateJobsRequest request = - BatchUpdateJobsRequest.newBuilder().setParent(parent).addAllJobs(jobs).build(); - return batchUpdateJobsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Begins executing a batch update jobs operation. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   String formattedParent = TenantName.format("[PROJECT]", "[TENANT]");
-   *   List<Job> jobs = new ArrayList<>();
-   *   BatchUpdateJobsRequest request = BatchUpdateJobsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .addAllJobs(jobs)
-   *     .build();
-   *   JobOperationResult response = jobServiceClient.batchUpdateJobsAsync(request).get();
-   * }
-   * 
- * - * @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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchUpdateJobsAsync( - BatchUpdateJobsRequest request) { - return batchUpdateJobsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Begins executing a batch update jobs operation. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   String formattedParent = TenantName.format("[PROJECT]", "[TENANT]");
-   *   List<Job> jobs = new ArrayList<>();
-   *   BatchUpdateJobsRequest request = BatchUpdateJobsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .addAllJobs(jobs)
-   *     .build();
-   *   OperationFuture<JobOperationResult, BatchOperationMetadata> future = jobServiceClient.batchUpdateJobsOperationCallable().futureCall(request);
-   *   // Do something
-   *   JobOperationResult response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - batchUpdateJobsOperationCallable() { - return stub.batchUpdateJobsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Begins executing a batch update jobs operation. - * - *

Sample code: - * - *


-   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
-   *   String formattedParent = TenantName.format("[PROJECT]", "[TENANT]");
-   *   List<Job> jobs = new ArrayList<>();
-   *   BatchUpdateJobsRequest request = BatchUpdateJobsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .addAllJobs(jobs)
-   *     .build();
-   *   ApiFuture<Operation> future = jobServiceClient.batchUpdateJobsCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable batchUpdateJobsCallable() { - return stub.batchUpdateJobsCallable(); - } - @Override public final void close() { stub.close(); diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceSettings.java index 01d4cbf7..19cd20a0 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceSettings.java @@ -53,14 +53,18 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createJob to 30 seconds: + *

For example, to set the total timeout of deleteJob to 30 seconds: * *

  * 
  * JobServiceSettings.Builder jobServiceSettingsBuilder =
  *     JobServiceSettings.newBuilder();
- * jobServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * jobServiceSettingsBuilder
+ *     .deleteJobSettings()
+ *     .setRetrySettings(
+ *         jobServiceSettingsBuilder.deleteJobSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * JobServiceSettings jobServiceSettings = jobServiceSettingsBuilder.build();
  * 
  * 
@@ -68,11 +72,29 @@ @Generated("by gapic-generator") @BetaApi public class JobServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to deleteJob. */ + public UnaryCallSettings deleteJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteJobSettings(); + } + /** Returns the object with the settings used for calls to createJob. */ public UnaryCallSettings createJobSettings() { return ((JobServiceStubSettings) getStubSettings()).createJobSettings(); } + /** Returns the object with the settings used for calls to batchCreateJobs. */ + public UnaryCallSettings batchCreateJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchCreateJobsSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + batchCreateJobsOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchCreateJobsOperationSettings(); + } + /** Returns the object with the settings used for calls to getJob. */ public UnaryCallSettings getJobSettings() { return ((JobServiceStubSettings) getStubSettings()).getJobSettings(); @@ -83,15 +105,17 @@ public UnaryCallSettings updateJobSettings() { return ((JobServiceStubSettings) getStubSettings()).updateJobSettings(); } - /** Returns the object with the settings used for calls to deleteJob. */ - public UnaryCallSettings deleteJobSettings() { - return ((JobServiceStubSettings) getStubSettings()).deleteJobSettings(); + /** Returns the object with the settings used for calls to batchUpdateJobs. */ + public UnaryCallSettings batchUpdateJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchUpdateJobsSettings(); } - /** Returns the object with the settings used for calls to listJobs. */ - public PagedCallSettings - listJobsSettings() { - return ((JobServiceStubSettings) getStubSettings()).listJobsSettings(); + /** Returns the object with the settings used for calls to batchUpdateJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + batchUpdateJobsOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchUpdateJobsOperationSettings(); } /** Returns the object with the settings used for calls to batchDeleteJobs. */ @@ -99,6 +123,12 @@ public UnaryCallSettings batchDeleteJobsSettings( return ((JobServiceStubSettings) getStubSettings()).batchDeleteJobsSettings(); } + /** Returns the object with the settings used for calls to listJobs. */ + public PagedCallSettings + listJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listJobsSettings(); + } + /** Returns the object with the settings used for calls to searchJobs. */ public PagedCallSettings searchJobsSettings() { @@ -111,32 +141,6 @@ public UnaryCallSettings batchDeleteJobsSettings( return ((JobServiceStubSettings) getStubSettings()).searchJobsForAlertSettings(); } - /** Returns the object with the settings used for calls to batchCreateJobs. */ - public UnaryCallSettings batchCreateJobsSettings() { - return ((JobServiceStubSettings) getStubSettings()).batchCreateJobsSettings(); - } - - /** Returns the object with the settings used for calls to batchCreateJobs. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - batchCreateJobsOperationSettings() { - return ((JobServiceStubSettings) getStubSettings()).batchCreateJobsOperationSettings(); - } - - /** Returns the object with the settings used for calls to batchUpdateJobs. */ - public UnaryCallSettings batchUpdateJobsSettings() { - return ((JobServiceStubSettings) getStubSettings()).batchUpdateJobsSettings(); - } - - /** Returns the object with the settings used for calls to batchUpdateJobs. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - batchUpdateJobsOperationSettings() { - return ((JobServiceStubSettings) getStubSettings()).batchUpdateJobsOperationSettings(); - } - public static final JobServiceSettings create(JobServiceStubSettings stub) throws IOException { return new JobServiceSettings.Builder(stub.toBuilder()).build(); } @@ -233,11 +237,30 @@ public Builder applyToAllUnaryMethods( return this; } + /** Returns the builder for the settings used for calls to deleteJob. */ + public UnaryCallSettings.Builder deleteJobSettings() { + return getStubSettingsBuilder().deleteJobSettings(); + } + /** Returns the builder for the settings used for calls to createJob. */ public UnaryCallSettings.Builder createJobSettings() { return getStubSettingsBuilder().createJobSettings(); } + /** Returns the builder for the settings used for calls to batchCreateJobs. */ + public UnaryCallSettings.Builder batchCreateJobsSettings() { + return getStubSettingsBuilder().batchCreateJobsSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchCreateJobsOperationSettings() { + return getStubSettingsBuilder().batchCreateJobsOperationSettings(); + } + /** Returns the builder for the settings used for calls to getJob. */ public UnaryCallSettings.Builder getJobSettings() { return getStubSettingsBuilder().getJobSettings(); @@ -248,15 +271,18 @@ public UnaryCallSettings.Builder updateJobSettings() { return getStubSettingsBuilder().updateJobSettings(); } - /** Returns the builder for the settings used for calls to deleteJob. */ - public UnaryCallSettings.Builder deleteJobSettings() { - return getStubSettingsBuilder().deleteJobSettings(); + /** Returns the builder for the settings used for calls to batchUpdateJobs. */ + public UnaryCallSettings.Builder batchUpdateJobsSettings() { + return getStubSettingsBuilder().batchUpdateJobsSettings(); } - /** Returns the builder for the settings used for calls to listJobs. */ - public PagedCallSettings.Builder - listJobsSettings() { - return getStubSettingsBuilder().listJobsSettings(); + /** Returns the builder for the settings used for calls to batchUpdateJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchUpdateJobsOperationSettings() { + return getStubSettingsBuilder().batchUpdateJobsOperationSettings(); } /** Returns the builder for the settings used for calls to batchDeleteJobs. */ @@ -264,6 +290,12 @@ public UnaryCallSettings.Builder batchDeleteJobsS return getStubSettingsBuilder().batchDeleteJobsSettings(); } + /** Returns the builder for the settings used for calls to listJobs. */ + public PagedCallSettings.Builder + listJobsSettings() { + return getStubSettingsBuilder().listJobsSettings(); + } + /** Returns the builder for the settings used for calls to searchJobs. */ public PagedCallSettings.Builder searchJobsSettings() { @@ -277,34 +309,6 @@ public UnaryCallSettings.Builder batchDeleteJobsS return getStubSettingsBuilder().searchJobsForAlertSettings(); } - /** Returns the builder for the settings used for calls to batchCreateJobs. */ - public UnaryCallSettings.Builder batchCreateJobsSettings() { - return getStubSettingsBuilder().batchCreateJobsSettings(); - } - - /** Returns the builder for the settings used for calls to batchCreateJobs. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchCreateJobsOperationSettings() { - return getStubSettingsBuilder().batchCreateJobsOperationSettings(); - } - - /** Returns the builder for the settings used for calls to batchUpdateJobs. */ - public UnaryCallSettings.Builder batchUpdateJobsSettings() { - return getStubSettingsBuilder().batchUpdateJobsSettings(); - } - - /** Returns the builder for the settings used for calls to batchUpdateJobs. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchUpdateJobsOperationSettings() { - return getStubSettingsBuilder().batchUpdateJobsOperationSettings(); - } - @Override public JobServiceSettings build() throws IOException { return new JobServiceSettings(this); diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceClient.java index 962047c3..e8525094 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceClient.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceClient.java @@ -45,9 +45,8 @@ *
  * 
  * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
- *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
- *   Profile profile = Profile.newBuilder().build();
- *   Profile response = profileServiceClient.createProfile(parent, profile);
+ *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
+ *   profileServiceClient.deleteProfile(name);
  * }
  * 
  * 
@@ -156,6 +155,208 @@ public ProfileServiceStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified profile. Prerequisite: The profile has no associated applications or + * assignments associated. + * + *

Sample code: + * + *


+   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
+   *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
+   *   profileServiceClient.deleteProfile(name);
+   * }
+   * 
+ * + * @param name Required. Resource name of the profile to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For + * example, "projects/foo/tenants/bar/profiles/baz". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProfile(ProfileName name) { + DeleteProfileRequest request = + DeleteProfileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified profile. Prerequisite: The profile has no associated applications or + * assignments associated. + * + *

Sample code: + * + *


+   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
+   *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
+   *   profileServiceClient.deleteProfile(name.toString());
+   * }
+   * 
+ * + * @param name Required. Resource name of the profile to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For + * example, "projects/foo/tenants/bar/profiles/baz". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProfile(String name) { + DeleteProfileRequest request = DeleteProfileRequest.newBuilder().setName(name).build(); + deleteProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified profile. Prerequisite: The profile has no associated applications or + * assignments associated. + * + *

Sample code: + * + *


+   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
+   *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
+   *   DeleteProfileRequest request = DeleteProfileRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   profileServiceClient.deleteProfile(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 void deleteProfile(DeleteProfileRequest request) { + deleteProfileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified profile. Prerequisite: The profile has no associated applications or + * assignments associated. + * + *

Sample code: + * + *


+   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
+   *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
+   *   DeleteProfileRequest request = DeleteProfileRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = profileServiceClient.deleteProfileCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteProfileCallable() { + return stub.deleteProfileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches for profiles within a tenant. + * + *

For example, search by raw queries "software engineer in Mountain View" or search by + * structured filters (location filter, education filter, etc.). + * + *

See [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] for more + * information. + * + *

Sample code: + * + *


+   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
+   *   SearchProfilesRequest request = SearchProfilesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setRequestMetadata(requestMetadata)
+   *     .build();
+   *   for (SummarizedProfile element : profileServiceClient.searchProfiles(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @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 SearchProfilesPagedResponse searchProfiles(SearchProfilesRequest request) { + return searchProfilesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches for profiles within a tenant. + * + *

For example, search by raw queries "software engineer in Mountain View" or search by + * structured filters (location filter, education filter, etc.). + * + *

See [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] for more + * information. + * + *

Sample code: + * + *


+   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
+   *   SearchProfilesRequest request = SearchProfilesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setRequestMetadata(requestMetadata)
+   *     .build();
+   *   ApiFuture<SearchProfilesPagedResponse> future = profileServiceClient.searchProfilesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (SummarizedProfile element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + searchProfilesPagedCallable() { + return stub.searchProfilesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches for profiles within a tenant. + * + *

For example, search by raw queries "software engineer in Mountain View" or search by + * structured filters (location filter, education filter, etc.). + * + *

See [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] for more + * information. + * + *

Sample code: + * + *


+   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
+   *   SearchProfilesRequest request = SearchProfilesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setRequestMetadata(requestMetadata)
+   *     .build();
+   *   while (true) {
+   *     SearchProfilesResponse response = profileServiceClient.searchProfilesCallable().call(request);
+   *     for (SummarizedProfile element : response.getSummarizedProfilesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + searchProfilesCallable() { + return stub.searchProfilesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists profiles by filter. The order is unspecified. @@ -552,216 +753,14 @@ public final UnaryCallable updateProfileCallable( return stub.updateProfileCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified profile. Prerequisite: The profile has no associated applications or - * assignments associated. - * - *

Sample code: - * - *


-   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
-   *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
-   *   profileServiceClient.deleteProfile(name);
-   * }
-   * 
- * - * @param name Required. Resource name of the profile to be deleted. - *

The format is "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For - * example, "projects/foo/tenants/bar/profiles/baz". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProfile(ProfileName name) { - DeleteProfileRequest request = - DeleteProfileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteProfile(request); + @Override + public final void close() { + stub.close(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified profile. Prerequisite: The profile has no associated applications or - * assignments associated. - * - *

Sample code: - * - *


-   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
-   *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
-   *   profileServiceClient.deleteProfile(name.toString());
-   * }
-   * 
- * - * @param name Required. Resource name of the profile to be deleted. - *

The format is "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For - * example, "projects/foo/tenants/bar/profiles/baz". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProfile(String name) { - DeleteProfileRequest request = DeleteProfileRequest.newBuilder().setName(name).build(); - deleteProfile(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified profile. Prerequisite: The profile has no associated applications or - * assignments associated. - * - *

Sample code: - * - *


-   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
-   *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
-   *   DeleteProfileRequest request = DeleteProfileRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   profileServiceClient.deleteProfile(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 void deleteProfile(DeleteProfileRequest request) { - deleteProfileCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified profile. Prerequisite: The profile has no associated applications or - * assignments associated. - * - *

Sample code: - * - *


-   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
-   *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
-   *   DeleteProfileRequest request = DeleteProfileRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = profileServiceClient.deleteProfileCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteProfileCallable() { - return stub.deleteProfileCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Searches for profiles within a tenant. - * - *

For example, search by raw queries "software engineer in Mountain View" or search by - * structured filters (location filter, education filter, etc.). - * - *

See [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] for more - * information. - * - *

Sample code: - * - *


-   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
-   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
-   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
-   *   SearchProfilesRequest request = SearchProfilesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setRequestMetadata(requestMetadata)
-   *     .build();
-   *   for (SummarizedProfile element : profileServiceClient.searchProfiles(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @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 SearchProfilesPagedResponse searchProfiles(SearchProfilesRequest request) { - return searchProfilesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Searches for profiles within a tenant. - * - *

For example, search by raw queries "software engineer in Mountain View" or search by - * structured filters (location filter, education filter, etc.). - * - *

See [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] for more - * information. - * - *

Sample code: - * - *


-   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
-   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
-   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
-   *   SearchProfilesRequest request = SearchProfilesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setRequestMetadata(requestMetadata)
-   *     .build();
-   *   ApiFuture<SearchProfilesPagedResponse> future = profileServiceClient.searchProfilesPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (SummarizedProfile element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - searchProfilesPagedCallable() { - return stub.searchProfilesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Searches for profiles within a tenant. - * - *

For example, search by raw queries "software engineer in Mountain View" or search by - * structured filters (location filter, education filter, etc.). - * - *

See [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest] for more - * information. - * - *

Sample code: - * - *


-   * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
-   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
-   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
-   *   SearchProfilesRequest request = SearchProfilesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setRequestMetadata(requestMetadata)
-   *     .build();
-   *   while (true) {
-   *     SearchProfilesResponse response = profileServiceClient.searchProfilesCallable().call(request);
-   *     for (SummarizedProfile element : response.getSummarizedProfilesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - searchProfilesCallable() { - return stub.searchProfilesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); + @Override + public void shutdown() { + stub.shutdown(); } @Override @@ -784,86 +783,6 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted return stub.awaitTermination(duration, unit); } - public static class ListProfilesPagedResponse - extends AbstractPagedListResponse< - ListProfilesRequest, - ListProfilesResponse, - Profile, - ListProfilesPage, - ListProfilesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProfilesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListProfilesPagedResponse apply(ListProfilesPage input) { - return new ListProfilesPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); - } - - private ListProfilesPagedResponse(ListProfilesPage page) { - super(page, ListProfilesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProfilesPage - extends AbstractPage { - - private ListProfilesPage( - PageContext context, - ListProfilesResponse response) { - super(context, response); - } - - private static ListProfilesPage createEmptyPage() { - return new ListProfilesPage(null, null); - } - - @Override - protected ListProfilesPage createPage( - PageContext context, - ListProfilesResponse response) { - return new ListProfilesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProfilesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProfilesRequest, - ListProfilesResponse, - Profile, - ListProfilesPage, - ListProfilesFixedSizeCollection> { - - private ListProfilesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProfilesFixedSizeCollection createEmptyCollection() { - return new ListProfilesFixedSizeCollection(null, 0); - } - - @Override - protected ListProfilesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProfilesFixedSizeCollection(pages, collectionSize); - } - } - public static class SearchProfilesPagedResponse extends AbstractPagedListResponse< SearchProfilesRequest, @@ -944,4 +863,84 @@ protected SearchProfilesFixedSizeCollection createCollection( return new SearchProfilesFixedSizeCollection(pages, collectionSize); } } + + public static class ListProfilesPagedResponse + extends AbstractPagedListResponse< + ListProfilesRequest, + ListProfilesResponse, + Profile, + ListProfilesPage, + ListProfilesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProfilesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListProfilesPagedResponse apply(ListProfilesPage input) { + return new ListProfilesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListProfilesPagedResponse(ListProfilesPage page) { + super(page, ListProfilesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProfilesPage + extends AbstractPage { + + private ListProfilesPage( + PageContext context, + ListProfilesResponse response) { + super(context, response); + } + + private static ListProfilesPage createEmptyPage() { + return new ListProfilesPage(null, null); + } + + @Override + protected ListProfilesPage createPage( + PageContext context, + ListProfilesResponse response) { + return new ListProfilesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProfilesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProfilesRequest, + ListProfilesResponse, + Profile, + ListProfilesPage, + ListProfilesFixedSizeCollection> { + + private ListProfilesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProfilesFixedSizeCollection createEmptyCollection() { + return new ListProfilesFixedSizeCollection(null, 0); + } + + @Override + protected ListProfilesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProfilesFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceSettings.java index 0db5a66e..2c67fb44 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceSettings.java @@ -50,14 +50,18 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createProfile to 30 seconds: + *

For example, to set the total timeout of deleteProfile to 30 seconds: * *

  * 
  * ProfileServiceSettings.Builder profileServiceSettingsBuilder =
  *     ProfileServiceSettings.newBuilder();
- * profileServiceSettingsBuilder.createProfileSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * profileServiceSettingsBuilder
+ *     .deleteProfileSettings()
+ *     .setRetrySettings(
+ *         profileServiceSettingsBuilder.deleteProfileSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * ProfileServiceSettings profileServiceSettings = profileServiceSettingsBuilder.build();
  * 
  * 
@@ -65,6 +69,18 @@ @Generated("by gapic-generator") @BetaApi public class ProfileServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to deleteProfile. */ + public UnaryCallSettings deleteProfileSettings() { + return ((ProfileServiceStubSettings) getStubSettings()).deleteProfileSettings(); + } + + /** Returns the object with the settings used for calls to searchProfiles. */ + public PagedCallSettings< + SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> + searchProfilesSettings() { + return ((ProfileServiceStubSettings) getStubSettings()).searchProfilesSettings(); + } + /** Returns the object with the settings used for calls to listProfiles. */ public PagedCallSettings listProfilesSettings() { @@ -86,18 +102,6 @@ public UnaryCallSettings updateProfileSettings() return ((ProfileServiceStubSettings) getStubSettings()).updateProfileSettings(); } - /** Returns the object with the settings used for calls to deleteProfile. */ - public UnaryCallSettings deleteProfileSettings() { - return ((ProfileServiceStubSettings) getStubSettings()).deleteProfileSettings(); - } - - /** Returns the object with the settings used for calls to searchProfiles. */ - public PagedCallSettings< - SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> - searchProfilesSettings() { - return ((ProfileServiceStubSettings) getStubSettings()).searchProfilesSettings(); - } - public static final ProfileServiceSettings create(ProfileServiceStubSettings stub) throws IOException { return new ProfileServiceSettings.Builder(stub.toBuilder()).build(); @@ -195,6 +199,18 @@ public Builder applyToAllUnaryMethods( return this; } + /** Returns the builder for the settings used for calls to deleteProfile. */ + public UnaryCallSettings.Builder deleteProfileSettings() { + return getStubSettingsBuilder().deleteProfileSettings(); + } + + /** Returns the builder for the settings used for calls to searchProfiles. */ + public PagedCallSettings.Builder< + SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> + searchProfilesSettings() { + return getStubSettingsBuilder().searchProfilesSettings(); + } + /** Returns the builder for the settings used for calls to listProfiles. */ public PagedCallSettings.Builder< ListProfilesRequest, ListProfilesResponse, ListProfilesPagedResponse> @@ -217,18 +233,6 @@ public UnaryCallSettings.Builder updateProfileSet return getStubSettingsBuilder().updateProfileSettings(); } - /** Returns the builder for the settings used for calls to deleteProfile. */ - public UnaryCallSettings.Builder deleteProfileSettings() { - return getStubSettingsBuilder().deleteProfileSettings(); - } - - /** Returns the builder for the settings used for calls to searchProfiles. */ - public PagedCallSettings.Builder< - SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> - searchProfilesSettings() { - return getStubSettingsBuilder().searchProfilesSettings(); - } - @Override public ProfileServiceSettings build() throws IOException { return new ProfileServiceSettings(this); diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java index cbd5dccb..423df444 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java @@ -44,9 +44,8 @@ *
  * 
  * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
- *   ProjectName parent = ProjectName.of("[PROJECT]");
- *   Tenant tenant = Tenant.newBuilder().build();
- *   Tenant response = tenantServiceClient.createTenant(parent, tenant);
+ *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+ *   tenantServiceClient.deleteTenant(name);
  * }
  * 
  * 
@@ -155,6 +154,98 @@ public TenantServiceStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   tenantServiceClient.deleteTenant(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the tenant to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTenant(TenantName name) { + DeleteTenantRequest request = + DeleteTenantRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   tenantServiceClient.deleteTenant(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the tenant to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTenant(String name) { + DeleteTenantRequest request = DeleteTenantRequest.newBuilder().setName(name).build(); + deleteTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   DeleteTenantRequest request = DeleteTenantRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   tenantServiceClient.deleteTenant(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 void deleteTenant(DeleteTenantRequest request) { + deleteTenantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   DeleteTenantRequest request = DeleteTenantRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = tenantServiceClient.deleteTenantCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteTenantCallable() { + return stub.deleteTenantCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a new tenant entity. @@ -415,98 +506,6 @@ public final UnaryCallable updateTenantCallable() { return stub.updateTenantCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified tenant. - * - *

Sample code: - * - *


-   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
-   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
-   *   tenantServiceClient.deleteTenant(name);
-   * }
-   * 
- * - * @param name Required. The resource name of the tenant to be deleted. - *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteTenant(TenantName name) { - DeleteTenantRequest request = - DeleteTenantRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteTenant(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified tenant. - * - *

Sample code: - * - *


-   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
-   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
-   *   tenantServiceClient.deleteTenant(name.toString());
-   * }
-   * 
- * - * @param name Required. The resource name of the tenant to be deleted. - *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteTenant(String name) { - DeleteTenantRequest request = DeleteTenantRequest.newBuilder().setName(name).build(); - deleteTenant(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified tenant. - * - *

Sample code: - * - *


-   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
-   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
-   *   DeleteTenantRequest request = DeleteTenantRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   tenantServiceClient.deleteTenant(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 void deleteTenant(DeleteTenantRequest request) { - deleteTenantCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes specified tenant. - * - *

Sample code: - * - *


-   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
-   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
-   *   DeleteTenantRequest request = DeleteTenantRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = tenantServiceClient.deleteTenantCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteTenantCallable() { - return stub.deleteTenantCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists all tenants associated with the project. diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceSettings.java index a5e2af01..cc6eba9d 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceSettings.java @@ -49,14 +49,18 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createTenant to 30 seconds: + *

For example, to set the total timeout of deleteTenant to 30 seconds: * *

  * 
  * TenantServiceSettings.Builder tenantServiceSettingsBuilder =
  *     TenantServiceSettings.newBuilder();
- * tenantServiceSettingsBuilder.createTenantSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * tenantServiceSettingsBuilder
+ *     .deleteTenantSettings()
+ *     .setRetrySettings(
+ *         tenantServiceSettingsBuilder.deleteTenantSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * TenantServiceSettings tenantServiceSettings = tenantServiceSettingsBuilder.build();
  * 
  * 
@@ -64,6 +68,11 @@ @Generated("by gapic-generator") @BetaApi public class TenantServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to deleteTenant. */ + public UnaryCallSettings deleteTenantSettings() { + return ((TenantServiceStubSettings) getStubSettings()).deleteTenantSettings(); + } + /** Returns the object with the settings used for calls to createTenant. */ public UnaryCallSettings createTenantSettings() { return ((TenantServiceStubSettings) getStubSettings()).createTenantSettings(); @@ -79,11 +88,6 @@ public UnaryCallSettings updateTenantSettings() { return ((TenantServiceStubSettings) getStubSettings()).updateTenantSettings(); } - /** Returns the object with the settings used for calls to deleteTenant. */ - public UnaryCallSettings deleteTenantSettings() { - return ((TenantServiceStubSettings) getStubSettings()).deleteTenantSettings(); - } - /** Returns the object with the settings used for calls to listTenants. */ public PagedCallSettings listTenantsSettings() { @@ -187,6 +191,11 @@ public Builder applyToAllUnaryMethods( return this; } + /** Returns the builder for the settings used for calls to deleteTenant. */ + public UnaryCallSettings.Builder deleteTenantSettings() { + return getStubSettingsBuilder().deleteTenantSettings(); + } + /** Returns the builder for the settings used for calls to createTenant. */ public UnaryCallSettings.Builder createTenantSettings() { return getStubSettingsBuilder().createTenantSettings(); @@ -202,11 +211,6 @@ public UnaryCallSettings.Builder updateTenantSettin return getStubSettingsBuilder().updateTenantSettings(); } - /** Returns the builder for the settings used for calls to deleteTenant. */ - public UnaryCallSettings.Builder deleteTenantSettings() { - return getStubSettingsBuilder().deleteTenantSettings(); - } - /** Returns the builder for the settings used for calls to listTenants. */ public PagedCallSettings.Builder< ListTenantsRequest, ListTenantsResponse, ListTenantsPagedResponse> diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/package-info.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/package-info.java index a198b1fe..9b58599e 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/package-info.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/package-info.java @@ -29,9 +29,8 @@ *
  * 
  * try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
- *   ProfileName parent = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
- *   Application application = Application.newBuilder().build();
- *   Application response = applicationServiceClient.createApplication(parent, application);
+ *   ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
+ *   applicationServiceClient.deleteApplication(name);
  * }
  * 
  * 
@@ -46,9 +45,8 @@ *
  * 
  * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
- *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
- *   Company company = Company.newBuilder().build();
- *   Company response = companyServiceClient.createCompany(parent, company);
+ *   CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]");
+ *   companyServiceClient.deleteCompany(name);
  * }
  * 
  * 
@@ -62,7 +60,7 @@ *
  * 
  * try (CompletionClient completionClient = CompletionClient.create()) {
- *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
  *   String query = "";
  *   int pageSize = 0;
  *   CompleteQueryRequest request = CompleteQueryRequest.newBuilder()
@@ -84,7 +82,7 @@
  * 
  * 
  * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
- *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
  *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
  *   ClientEvent response = eventServiceClient.createClientEvent(parent, clientEvent);
  * }
@@ -101,9 +99,8 @@
  * 
  * 
  * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
- *   TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]");
- *   Job job = Job.newBuilder().build();
- *   Job response = jobServiceClient.createJob(parent, job);
+ *   JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]");
+ *   jobServiceClient.deleteJob(name);
  * }
  * 
  * 
@@ -118,9 +115,8 @@ *
  * 
  * try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) {
- *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
- *   Profile profile = Profile.newBuilder().build();
- *   Profile response = profileServiceClient.createProfile(parent, profile);
+ *   ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
+ *   profileServiceClient.deleteProfile(name);
  * }
  * 
  * 
@@ -134,9 +130,8 @@ *
  * 
  * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
- *   ProjectName parent = ProjectName.of("[PROJECT]");
- *   Tenant tenant = Tenant.newBuilder().build();
- *   Tenant response = tenantServiceClient.createTenant(parent, tenant);
+ *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+ *   tenantServiceClient.deleteTenant(name);
  * }
  * 
  * 
diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStub.java index e40e3186..0ed41fdc 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStub.java @@ -40,6 +40,10 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class ApplicationServiceStub implements BackgroundResource { + public UnaryCallable deleteApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteApplicationCallable()"); + } + public UnaryCallable createApplicationCallable() { throw new UnsupportedOperationException("Not implemented: createApplicationCallable()"); } @@ -52,10 +56,6 @@ public UnaryCallable updateApplicationCal throw new UnsupportedOperationException("Not implemented: updateApplicationCallable()"); } - public UnaryCallable deleteApplicationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteApplicationCallable()"); - } - public UnaryCallable listApplicationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listApplicationsPagedCallable()"); diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStubSettings.java index 6f2353db..b18811e4 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStubSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStubSettings.java @@ -71,14 +71,18 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createApplication to 30 seconds: + *

For example, to set the total timeout of deleteApplication to 30 seconds: * *

  * 
  * ApplicationServiceStubSettings.Builder applicationServiceSettingsBuilder =
  *     ApplicationServiceStubSettings.newBuilder();
- * applicationServiceSettingsBuilder.createApplicationSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * applicationServiceSettingsBuilder
+ *     .deleteApplicationSettings()
+ *     .setRetrySettings(
+ *         applicationServiceSettingsBuilder.deleteApplicationSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * ApplicationServiceStubSettings applicationServiceSettings = applicationServiceSettingsBuilder.build();
  * 
  * 
@@ -93,14 +97,19 @@ public class ApplicationServiceStubSettings extends StubSettings deleteApplicationSettings; private final UnaryCallSettings createApplicationSettings; private final UnaryCallSettings getApplicationSettings; private final UnaryCallSettings updateApplicationSettings; - private final UnaryCallSettings deleteApplicationSettings; private final PagedCallSettings< ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> listApplicationsSettings; + /** Returns the object with the settings used for calls to deleteApplication. */ + public UnaryCallSettings deleteApplicationSettings() { + return deleteApplicationSettings; + } + /** Returns the object with the settings used for calls to createApplication. */ public UnaryCallSettings createApplicationSettings() { return createApplicationSettings; @@ -116,11 +125,6 @@ public UnaryCallSettings updateApplicatio return updateApplicationSettings; } - /** Returns the object with the settings used for calls to deleteApplication. */ - public UnaryCallSettings deleteApplicationSettings() { - return deleteApplicationSettings; - } - /** Returns the object with the settings used for calls to listApplications. */ public PagedCallSettings< ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> @@ -197,10 +201,10 @@ public Builder toBuilder() { protected ApplicationServiceStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); + deleteApplicationSettings = settingsBuilder.deleteApplicationSettings().build(); createApplicationSettings = settingsBuilder.createApplicationSettings().build(); getApplicationSettings = settingsBuilder.getApplicationSettings().build(); updateApplicationSettings = settingsBuilder.updateApplicationSettings().build(); - deleteApplicationSettings = settingsBuilder.deleteApplicationSettings().build(); listApplicationsSettings = settingsBuilder.listApplicationsSettings().build(); } @@ -268,14 +272,14 @@ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + deleteApplicationSettings; private final UnaryCallSettings.Builder createApplicationSettings; private final UnaryCallSettings.Builder getApplicationSettings; private final UnaryCallSettings.Builder updateApplicationSettings; - private final UnaryCallSettings.Builder - deleteApplicationSettings; private final PagedCallSettings.Builder< ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> listApplicationsSettings; @@ -321,22 +325,22 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); + deleteApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listApplicationsSettings = PagedCallSettings.newBuilder(LIST_APPLICATIONS_PAGE_STR_FACT); unaryMethodSettingsBuilders = ImmutableList.>of( + deleteApplicationSettings, createApplicationSettings, getApplicationSettings, updateApplicationSettings, - deleteApplicationSettings, listApplicationsSettings); initDefaults(this); @@ -353,6 +357,11 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { + builder + .deleteApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .createApplicationSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -368,11 +377,6 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder - .deleteApplicationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder .listApplicationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) @@ -384,18 +388,18 @@ private static Builder initDefaults(Builder builder) { protected Builder(ApplicationServiceStubSettings settings) { super(settings); + deleteApplicationSettings = settings.deleteApplicationSettings.toBuilder(); createApplicationSettings = settings.createApplicationSettings.toBuilder(); getApplicationSettings = settings.getApplicationSettings.toBuilder(); updateApplicationSettings = settings.updateApplicationSettings.toBuilder(); - deleteApplicationSettings = settings.deleteApplicationSettings.toBuilder(); listApplicationsSettings = settings.listApplicationsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( + deleteApplicationSettings, createApplicationSettings, getApplicationSettings, updateApplicationSettings, - deleteApplicationSettings, listApplicationsSettings); } @@ -415,6 +419,11 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } + /** Returns the builder for the settings used for calls to deleteApplication. */ + public UnaryCallSettings.Builder deleteApplicationSettings() { + return deleteApplicationSettings; + } + /** Returns the builder for the settings used for calls to createApplication. */ public UnaryCallSettings.Builder createApplicationSettings() { @@ -432,11 +441,6 @@ public UnaryCallSettings.Builder getApplicat return updateApplicationSettings; } - /** Returns the builder for the settings used for calls to deleteApplication. */ - public UnaryCallSettings.Builder deleteApplicationSettings() { - return deleteApplicationSettings; - } - /** Returns the builder for the settings used for calls to listApplications. */ public PagedCallSettings.Builder< ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStub.java index 263eb1d6..c781800f 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStub.java @@ -40,6 +40,10 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class CompanyServiceStub implements BackgroundResource { + public UnaryCallable deleteCompanyCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCompanyCallable()"); + } + public UnaryCallable createCompanyCallable() { throw new UnsupportedOperationException("Not implemented: createCompanyCallable()"); } @@ -52,10 +56,6 @@ public UnaryCallable updateCompanyCallable() { throw new UnsupportedOperationException("Not implemented: updateCompanyCallable()"); } - public UnaryCallable deleteCompanyCallable() { - throw new UnsupportedOperationException("Not implemented: deleteCompanyCallable()"); - } - public UnaryCallable listCompaniesPagedCallable() { throw new UnsupportedOperationException("Not implemented: listCompaniesPagedCallable()"); diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStubSettings.java index da8b5d64..55b73fd6 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStubSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStubSettings.java @@ -71,14 +71,18 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createCompany to 30 seconds: + *

For example, to set the total timeout of deleteCompany to 30 seconds: * *

  * 
  * CompanyServiceStubSettings.Builder companyServiceSettingsBuilder =
  *     CompanyServiceStubSettings.newBuilder();
- * companyServiceSettingsBuilder.createCompanySettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * companyServiceSettingsBuilder
+ *     .deleteCompanySettings()
+ *     .setRetrySettings(
+ *         companyServiceSettingsBuilder.deleteCompanySettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * CompanyServiceStubSettings companyServiceSettings = companyServiceSettingsBuilder.build();
  * 
  * 
@@ -93,14 +97,19 @@ public class CompanyServiceStubSettings extends StubSettings deleteCompanySettings; private final UnaryCallSettings createCompanySettings; private final UnaryCallSettings getCompanySettings; private final UnaryCallSettings updateCompanySettings; - private final UnaryCallSettings deleteCompanySettings; private final PagedCallSettings< ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse> listCompaniesSettings; + /** Returns the object with the settings used for calls to deleteCompany. */ + public UnaryCallSettings deleteCompanySettings() { + return deleteCompanySettings; + } + /** Returns the object with the settings used for calls to createCompany. */ public UnaryCallSettings createCompanySettings() { return createCompanySettings; @@ -116,11 +125,6 @@ public UnaryCallSettings updateCompanySettings() return updateCompanySettings; } - /** Returns the object with the settings used for calls to deleteCompany. */ - public UnaryCallSettings deleteCompanySettings() { - return deleteCompanySettings; - } - /** Returns the object with the settings used for calls to listCompanies. */ public PagedCallSettings listCompaniesSettings() { @@ -196,10 +200,10 @@ public Builder toBuilder() { protected CompanyServiceStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); + deleteCompanySettings = settingsBuilder.deleteCompanySettings().build(); createCompanySettings = settingsBuilder.createCompanySettings().build(); getCompanySettings = settingsBuilder.getCompanySettings().build(); updateCompanySettings = settingsBuilder.updateCompanySettings().build(); - deleteCompanySettings = settingsBuilder.deleteCompanySettings().build(); listCompaniesSettings = settingsBuilder.listCompaniesSettings().build(); } @@ -260,10 +264,10 @@ public ApiFuture getFuturePagedResponse( public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder deleteCompanySettings; private final UnaryCallSettings.Builder createCompanySettings; private final UnaryCallSettings.Builder getCompanySettings; private final UnaryCallSettings.Builder updateCompanySettings; - private final UnaryCallSettings.Builder deleteCompanySettings; private final PagedCallSettings.Builder< ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse> listCompaniesSettings; @@ -309,22 +313,22 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); + deleteCompanySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCompanySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getCompanySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateCompanySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteCompanySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listCompaniesSettings = PagedCallSettings.newBuilder(LIST_COMPANIES_PAGE_STR_FACT); unaryMethodSettingsBuilders = ImmutableList.>of( + deleteCompanySettings, createCompanySettings, getCompanySettings, updateCompanySettings, - deleteCompanySettings, listCompaniesSettings); initDefaults(this); @@ -341,6 +345,11 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { + builder + .deleteCompanySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .createCompanySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -356,11 +365,6 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder - .deleteCompanySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder .listCompaniesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) @@ -372,18 +376,18 @@ private static Builder initDefaults(Builder builder) { protected Builder(CompanyServiceStubSettings settings) { super(settings); + deleteCompanySettings = settings.deleteCompanySettings.toBuilder(); createCompanySettings = settings.createCompanySettings.toBuilder(); getCompanySettings = settings.getCompanySettings.toBuilder(); updateCompanySettings = settings.updateCompanySettings.toBuilder(); - deleteCompanySettings = settings.deleteCompanySettings.toBuilder(); listCompaniesSettings = settings.listCompaniesSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( + deleteCompanySettings, createCompanySettings, getCompanySettings, updateCompanySettings, - deleteCompanySettings, listCompaniesSettings); } @@ -403,6 +407,11 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } + /** Returns the builder for the settings used for calls to deleteCompany. */ + public UnaryCallSettings.Builder deleteCompanySettings() { + return deleteCompanySettings; + } + /** Returns the builder for the settings used for calls to createCompany. */ public UnaryCallSettings.Builder createCompanySettings() { return createCompanySettings; @@ -418,11 +427,6 @@ public UnaryCallSettings.Builder updateCompanySet return updateCompanySettings; } - /** Returns the builder for the settings used for calls to deleteCompany. */ - public UnaryCallSettings.Builder deleteCompanySettings() { - return deleteCompanySettings; - } - /** Returns the builder for the settings used for calls to listCompanies. */ public PagedCallSettings.Builder< ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse> diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompletionStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompletionStubSettings.java index 9385a434..03c3bcb4 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompletionStubSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompletionStubSettings.java @@ -62,8 +62,12 @@ * * CompletionStubSettings.Builder completionSettingsBuilder = * CompletionStubSettings.newBuilder(); - * completionSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)); + * completionSettingsBuilder + * .completeQuerySettings() + * .setRetrySettings( + * completionSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); * CompletionStubSettings completionSettings = completionSettingsBuilder.build(); * *
diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/EventServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/EventServiceStubSettings.java index 32fafb2c..133405e1 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/EventServiceStubSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/EventServiceStubSettings.java @@ -62,8 +62,12 @@ * * EventServiceStubSettings.Builder eventServiceSettingsBuilder = * EventServiceStubSettings.newBuilder(); - * eventServiceSettingsBuilder.createClientEventSettings().getRetrySettings().toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)); + * eventServiceSettingsBuilder + * .createClientEventSettings() + * .setRetrySettings( + * eventServiceSettingsBuilder.createClientEventSettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); * EventServiceStubSettings eventServiceSettings = eventServiceSettingsBuilder.build(); * *
diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcApplicationServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcApplicationServiceStub.java index 7d0cfb68..90293fb2 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcApplicationServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcApplicationServiceStub.java @@ -51,6 +51,15 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcApplicationServiceStub extends ApplicationServiceStub { + private static final MethodDescriptor + deleteApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4beta1.ApplicationService/DeleteApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); private static final MethodDescriptor createApplicationMethodDescriptor = MethodDescriptor.newBuilder() @@ -78,15 +87,6 @@ public class GrpcApplicationServiceStub extends ApplicationServiceStub { ProtoUtils.marshaller(UpdateApplicationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Application.getDefaultInstance())) .build(); - private static final MethodDescriptor - deleteApplicationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.talent.v4beta1.ApplicationService/DeleteApplication") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteApplicationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); private static final MethodDescriptor listApplicationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -100,10 +100,10 @@ public class GrpcApplicationServiceStub extends ApplicationServiceStub { private final BackgroundResource backgroundResources; + private final UnaryCallable deleteApplicationCallable; private final UnaryCallable createApplicationCallable; private final UnaryCallable getApplicationCallable; private final UnaryCallable updateApplicationCallable; - private final UnaryCallable deleteApplicationCallable; private final UnaryCallable listApplicationsCallable; private final UnaryCallable @@ -150,6 +150,19 @@ protected GrpcApplicationServiceStub( throws IOException { this.callableFactory = callableFactory; + GrpcCallSettings deleteApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteApplicationMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteApplicationRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); GrpcCallSettings createApplicationTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createApplicationMethodDescriptor) @@ -190,19 +203,6 @@ public Map extract(UpdateApplicationRequest request) { } }) .build(); - GrpcCallSettings deleteApplicationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteApplicationMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteApplicationRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); GrpcCallSettings listApplicationsTransportSettings = GrpcCallSettings.newBuilder() @@ -218,6 +218,11 @@ public Map extract(ListApplicationsRequest request) { }) .build(); + this.deleteApplicationCallable = + callableFactory.createUnaryCallable( + deleteApplicationTransportSettings, + settings.deleteApplicationSettings(), + clientContext); this.createApplicationCallable = callableFactory.createUnaryCallable( createApplicationTransportSettings, @@ -231,11 +236,6 @@ public Map extract(ListApplicationsRequest request) { updateApplicationTransportSettings, settings.updateApplicationSettings(), clientContext); - this.deleteApplicationCallable = - callableFactory.createUnaryCallable( - deleteApplicationTransportSettings, - settings.deleteApplicationSettings(), - clientContext); this.listApplicationsCallable = callableFactory.createUnaryCallable( listApplicationsTransportSettings, settings.listApplicationsSettings(), clientContext); @@ -246,6 +246,10 @@ public Map extract(ListApplicationsRequest request) { backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } + public UnaryCallable deleteApplicationCallable() { + return deleteApplicationCallable; + } + public UnaryCallable createApplicationCallable() { return createApplicationCallable; } @@ -258,10 +262,6 @@ public UnaryCallable updateApplicationCal return updateApplicationCallable; } - public UnaryCallable deleteApplicationCallable() { - return deleteApplicationCallable; - } - public UnaryCallable listApplicationsPagedCallable() { return listApplicationsPagedCallable; diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcCompanyServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcCompanyServiceStub.java index 732ae646..2beeb69b 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcCompanyServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcCompanyServiceStub.java @@ -51,6 +51,13 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcCompanyServiceStub extends CompanyServiceStub { + private static final MethodDescriptor deleteCompanyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4beta1.CompanyService/DeleteCompany") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteCompanyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); private static final MethodDescriptor createCompanyMethodDescriptor = MethodDescriptor.newBuilder() @@ -76,13 +83,6 @@ public class GrpcCompanyServiceStub extends CompanyServiceStub { ProtoUtils.marshaller(UpdateCompanyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Company.getDefaultInstance())) .build(); - private static final MethodDescriptor deleteCompanyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.talent.v4beta1.CompanyService/DeleteCompany") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteCompanyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); private static final MethodDescriptor listCompaniesMethodDescriptor = MethodDescriptor.newBuilder() @@ -96,10 +96,10 @@ public class GrpcCompanyServiceStub extends CompanyServiceStub { private final BackgroundResource backgroundResources; + private final UnaryCallable deleteCompanyCallable; private final UnaryCallable createCompanyCallable; private final UnaryCallable getCompanyCallable; private final UnaryCallable updateCompanyCallable; - private final UnaryCallable deleteCompanyCallable; private final UnaryCallable listCompaniesCallable; private final UnaryCallable listCompaniesPagedCallable; @@ -145,6 +145,19 @@ protected GrpcCompanyServiceStub( throws IOException { this.callableFactory = callableFactory; + GrpcCallSettings deleteCompanyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCompanyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteCompanyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); GrpcCallSettings createCompanyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createCompanyMethodDescriptor) @@ -184,19 +197,6 @@ public Map extract(UpdateCompanyRequest request) { } }) .build(); - GrpcCallSettings deleteCompanyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteCompanyMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteCompanyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); GrpcCallSettings listCompaniesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listCompaniesMethodDescriptor) @@ -211,6 +211,9 @@ public Map extract(ListCompaniesRequest request) { }) .build(); + this.deleteCompanyCallable = + callableFactory.createUnaryCallable( + deleteCompanyTransportSettings, settings.deleteCompanySettings(), clientContext); this.createCompanyCallable = callableFactory.createUnaryCallable( createCompanyTransportSettings, settings.createCompanySettings(), clientContext); @@ -220,9 +223,6 @@ public Map extract(ListCompaniesRequest request) { this.updateCompanyCallable = callableFactory.createUnaryCallable( updateCompanyTransportSettings, settings.updateCompanySettings(), clientContext); - this.deleteCompanyCallable = - callableFactory.createUnaryCallable( - deleteCompanyTransportSettings, settings.deleteCompanySettings(), clientContext); this.listCompaniesCallable = callableFactory.createUnaryCallable( listCompaniesTransportSettings, settings.listCompaniesSettings(), clientContext); @@ -233,6 +233,10 @@ public Map extract(ListCompaniesRequest request) { backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } + public UnaryCallable deleteCompanyCallable() { + return deleteCompanyCallable; + } + public UnaryCallable createCompanyCallable() { return createCompanyCallable; } @@ -245,10 +249,6 @@ public UnaryCallable updateCompanyCallable() { return updateCompanyCallable; } - public UnaryCallable deleteCompanyCallable() { - return deleteCompanyCallable; - } - public UnaryCallable listCompaniesPagedCallable() { return listCompaniesPagedCallable; diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcJobServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcJobServiceStub.java index e48175c4..c605e6d4 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcJobServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcJobServiceStub.java @@ -63,6 +63,13 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcJobServiceStub extends JobServiceStub { + private static final MethodDescriptor deleteJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4beta1.JobService/DeleteJob") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); private static final MethodDescriptor createJobMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -70,6 +77,15 @@ public class GrpcJobServiceStub extends JobServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(CreateJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) .build(); + private static final MethodDescriptor + batchCreateJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4beta1.JobService/BatchCreateJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchCreateJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); private static final MethodDescriptor getJobMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -84,20 +100,14 @@ public class GrpcJobServiceStub extends JobServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(UpdateJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) .build(); - private static final MethodDescriptor deleteJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.talent.v4beta1.JobService/DeleteJob") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - private static final MethodDescriptor - listJobsMethodDescriptor = - MethodDescriptor.newBuilder() + private static final MethodDescriptor + batchUpdateJobsMethodDescriptor = + MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.talent.v4beta1.JobService/ListJobs") - .setRequestMarshaller(ProtoUtils.marshaller(ListJobsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListJobsResponse.getDefaultInstance())) + .setFullMethodName("google.cloud.talent.v4beta1.JobService/BatchUpdateJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchUpdateJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor batchDeleteJobsMethodDescriptor = @@ -108,6 +118,14 @@ public class GrpcJobServiceStub extends JobServiceStub { ProtoUtils.marshaller(BatchDeleteJobsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + listJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4beta1.JobService/ListJobs") + .setRequestMarshaller(ProtoUtils.marshaller(ListJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListJobsResponse.getDefaultInstance())) + .build(); private static final MethodDescriptor searchJobsMethodDescriptor = MethodDescriptor.newBuilder() @@ -124,48 +142,30 @@ public class GrpcJobServiceStub extends JobServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(SearchJobsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SearchJobsResponse.getDefaultInstance())) .build(); - private static final MethodDescriptor - batchCreateJobsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.talent.v4beta1.JobService/BatchCreateJobs") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchCreateJobsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor - batchUpdateJobsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.talent.v4beta1.JobService/BatchUpdateJobs") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchUpdateJobsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; + private final UnaryCallable deleteJobCallable; private final UnaryCallable createJobCallable; + private final UnaryCallable batchCreateJobsCallable; + private final OperationCallable< + BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchCreateJobsOperationCallable; private final UnaryCallable getJobCallable; private final UnaryCallable updateJobCallable; - private final UnaryCallable deleteJobCallable; + private final UnaryCallable batchUpdateJobsCallable; + private final OperationCallable< + BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchUpdateJobsOperationCallable; + private final UnaryCallable batchDeleteJobsCallable; private final UnaryCallable listJobsCallable; private final UnaryCallable listJobsPagedCallable; - private final UnaryCallable batchDeleteJobsCallable; private final UnaryCallable searchJobsCallable; private final UnaryCallable searchJobsPagedCallable; private final UnaryCallable searchJobsForAlertCallable; private final UnaryCallable searchJobsForAlertPagedCallable; - private final UnaryCallable batchCreateJobsCallable; - private final OperationCallable< - BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchCreateJobsOperationCallable; - private final UnaryCallable batchUpdateJobsCallable; - private final OperationCallable< - BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchUpdateJobsOperationCallable; private final GrpcStubCallableFactory callableFactory; @@ -207,6 +207,19 @@ protected GrpcJobServiceStub( this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + GrpcCallSettings deleteJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); GrpcCallSettings createJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createJobMethodDescriptor) @@ -220,6 +233,19 @@ public Map extract(CreateJobRequest request) { } }) .build(); + GrpcCallSettings batchCreateJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchCreateJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchCreateJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); GrpcCallSettings getJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getJobMethodDescriptor) @@ -246,39 +272,39 @@ public Map extract(UpdateJobRequest request) { } }) .build(); - GrpcCallSettings deleteJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteJobMethodDescriptor) + GrpcCallSettings batchUpdateJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchUpdateJobsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { + new RequestParamsExtractor() { @Override - public Map extract(DeleteJobRequest request) { + public Map extract(BatchUpdateJobsRequest request) { ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); + params.put("parent", String.valueOf(request.getParent())); return params.build(); } }) .build(); - GrpcCallSettings listJobsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listJobsMethodDescriptor) + GrpcCallSettings batchDeleteJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteJobsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { + new RequestParamsExtractor() { @Override - public Map extract(ListJobsRequest request) { + public Map extract(BatchDeleteJobsRequest request) { ImmutableMap.Builder params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); } }) .build(); - GrpcCallSettings batchDeleteJobsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchDeleteJobsMethodDescriptor) + GrpcCallSettings listJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listJobsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { + new RequestParamsExtractor() { @Override - public Map extract(BatchDeleteJobsRequest request) { + public Map extract(ListJobsRequest request) { ImmutableMap.Builder params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); @@ -311,54 +337,46 @@ public Map extract(SearchJobsRequest request) { } }) .build(); - GrpcCallSettings batchCreateJobsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchCreateJobsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchCreateJobsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings batchUpdateJobsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchUpdateJobsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchUpdateJobsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); + this.deleteJobCallable = + callableFactory.createUnaryCallable( + deleteJobTransportSettings, settings.deleteJobSettings(), clientContext); this.createJobCallable = callableFactory.createUnaryCallable( createJobTransportSettings, settings.createJobSettings(), clientContext); + this.batchCreateJobsCallable = + callableFactory.createUnaryCallable( + batchCreateJobsTransportSettings, settings.batchCreateJobsSettings(), clientContext); + this.batchCreateJobsOperationCallable = + callableFactory.createOperationCallable( + batchCreateJobsTransportSettings, + settings.batchCreateJobsOperationSettings(), + clientContext, + this.operationsStub); this.getJobCallable = callableFactory.createUnaryCallable( getJobTransportSettings, settings.getJobSettings(), clientContext); this.updateJobCallable = callableFactory.createUnaryCallable( updateJobTransportSettings, settings.updateJobSettings(), clientContext); - this.deleteJobCallable = + this.batchUpdateJobsCallable = callableFactory.createUnaryCallable( - deleteJobTransportSettings, settings.deleteJobSettings(), clientContext); + batchUpdateJobsTransportSettings, settings.batchUpdateJobsSettings(), clientContext); + this.batchUpdateJobsOperationCallable = + callableFactory.createOperationCallable( + batchUpdateJobsTransportSettings, + settings.batchUpdateJobsOperationSettings(), + clientContext, + this.operationsStub); + this.batchDeleteJobsCallable = + callableFactory.createUnaryCallable( + batchDeleteJobsTransportSettings, settings.batchDeleteJobsSettings(), clientContext); this.listJobsCallable = callableFactory.createUnaryCallable( listJobsTransportSettings, settings.listJobsSettings(), clientContext); this.listJobsPagedCallable = callableFactory.createPagedCallable( listJobsTransportSettings, settings.listJobsSettings(), clientContext); - this.batchDeleteJobsCallable = - callableFactory.createUnaryCallable( - batchDeleteJobsTransportSettings, settings.batchDeleteJobsSettings(), clientContext); this.searchJobsCallable = callableFactory.createUnaryCallable( searchJobsTransportSettings, settings.searchJobsSettings(), clientContext); @@ -375,24 +393,6 @@ public Map extract(BatchUpdateJobsRequest request) { searchJobsForAlertTransportSettings, settings.searchJobsForAlertSettings(), clientContext); - this.batchCreateJobsCallable = - callableFactory.createUnaryCallable( - batchCreateJobsTransportSettings, settings.batchCreateJobsSettings(), clientContext); - this.batchCreateJobsOperationCallable = - callableFactory.createOperationCallable( - batchCreateJobsTransportSettings, - settings.batchCreateJobsOperationSettings(), - clientContext, - this.operationsStub); - this.batchUpdateJobsCallable = - callableFactory.createUnaryCallable( - batchUpdateJobsTransportSettings, settings.batchUpdateJobsSettings(), clientContext); - this.batchUpdateJobsOperationCallable = - callableFactory.createOperationCallable( - batchUpdateJobsTransportSettings, - settings.batchUpdateJobsOperationSettings(), - clientContext, - this.operationsStub); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -402,10 +402,24 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + public UnaryCallable deleteJobCallable() { + return deleteJobCallable; + } + public UnaryCallable createJobCallable() { return createJobCallable; } + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchCreateJobsOperationCallable() { + return batchCreateJobsOperationCallable; + } + + public UnaryCallable batchCreateJobsCallable() { + return batchCreateJobsCallable; + } + public UnaryCallable getJobCallable() { return getJobCallable; } @@ -414,8 +428,18 @@ public UnaryCallable updateJobCallable() { return updateJobCallable; } - public UnaryCallable deleteJobCallable() { - return deleteJobCallable; + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchUpdateJobsOperationCallable() { + return batchUpdateJobsOperationCallable; + } + + public UnaryCallable batchUpdateJobsCallable() { + return batchUpdateJobsCallable; + } + + public UnaryCallable batchDeleteJobsCallable() { + return batchDeleteJobsCallable; } public UnaryCallable listJobsPagedCallable() { @@ -426,10 +450,6 @@ public UnaryCallable listJobsCallable() { return listJobsCallable; } - public UnaryCallable batchDeleteJobsCallable() { - return batchDeleteJobsCallable; - } - public UnaryCallable searchJobsPagedCallable() { return searchJobsPagedCallable; } @@ -447,26 +467,6 @@ public UnaryCallable searchJobsForAlertCa return searchJobsForAlertCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchCreateJobsOperationCallable() { - return batchCreateJobsOperationCallable; - } - - public UnaryCallable batchCreateJobsCallable() { - return batchCreateJobsCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchUpdateJobsOperationCallable() { - return batchUpdateJobsOperationCallable; - } - - public UnaryCallable batchUpdateJobsCallable() { - return batchUpdateJobsCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcProfileServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcProfileServiceStub.java index 83b1eba3..3224b2b4 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcProfileServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcProfileServiceStub.java @@ -54,6 +54,23 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcProfileServiceStub extends ProfileServiceStub { + private static final MethodDescriptor deleteProfileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4beta1.ProfileService/DeleteProfile") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteProfileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + searchProfilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4beta1.ProfileService/SearchProfiles") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchProfilesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchProfilesResponse.getDefaultInstance())) + .build(); private static final MethodDescriptor listProfilesMethodDescriptor = MethodDescriptor.newBuilder() @@ -88,36 +105,19 @@ public class GrpcProfileServiceStub extends ProfileServiceStub { ProtoUtils.marshaller(UpdateProfileRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Profile.getDefaultInstance())) .build(); - private static final MethodDescriptor deleteProfileMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.talent.v4beta1.ProfileService/DeleteProfile") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteProfileRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - private static final MethodDescriptor - searchProfilesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.talent.v4beta1.ProfileService/SearchProfiles") - .setRequestMarshaller( - ProtoUtils.marshaller(SearchProfilesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SearchProfilesResponse.getDefaultInstance())) - .build(); private final BackgroundResource backgroundResources; + private final UnaryCallable deleteProfileCallable; + private final UnaryCallable searchProfilesCallable; + private final UnaryCallable + searchProfilesPagedCallable; private final UnaryCallable listProfilesCallable; private final UnaryCallable listProfilesPagedCallable; private final UnaryCallable createProfileCallable; private final UnaryCallable getProfileCallable; private final UnaryCallable updateProfileCallable; - private final UnaryCallable deleteProfileCallable; - private final UnaryCallable searchProfilesCallable; - private final UnaryCallable - searchProfilesPagedCallable; private final GrpcStubCallableFactory callableFactory; @@ -160,6 +160,33 @@ protected GrpcProfileServiceStub( throws IOException { this.callableFactory = callableFactory; + GrpcCallSettings deleteProfileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProfileMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteProfileRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + searchProfilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchProfilesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SearchProfilesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); GrpcCallSettings listProfilesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listProfilesMethodDescriptor) @@ -212,34 +239,16 @@ public Map extract(UpdateProfileRequest request) { } }) .build(); - GrpcCallSettings deleteProfileTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteProfileMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteProfileRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - searchProfilesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(searchProfilesMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(SearchProfilesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); + this.deleteProfileCallable = + callableFactory.createUnaryCallable( + deleteProfileTransportSettings, settings.deleteProfileSettings(), clientContext); + this.searchProfilesCallable = + callableFactory.createUnaryCallable( + searchProfilesTransportSettings, settings.searchProfilesSettings(), clientContext); + this.searchProfilesPagedCallable = + callableFactory.createPagedCallable( + searchProfilesTransportSettings, settings.searchProfilesSettings(), clientContext); this.listProfilesCallable = callableFactory.createUnaryCallable( listProfilesTransportSettings, settings.listProfilesSettings(), clientContext); @@ -255,19 +264,23 @@ public Map extract(SearchProfilesRequest request) { this.updateProfileCallable = callableFactory.createUnaryCallable( updateProfileTransportSettings, settings.updateProfileSettings(), clientContext); - this.deleteProfileCallable = - callableFactory.createUnaryCallable( - deleteProfileTransportSettings, settings.deleteProfileSettings(), clientContext); - this.searchProfilesCallable = - callableFactory.createUnaryCallable( - searchProfilesTransportSettings, settings.searchProfilesSettings(), clientContext); - this.searchProfilesPagedCallable = - callableFactory.createPagedCallable( - searchProfilesTransportSettings, settings.searchProfilesSettings(), clientContext); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } + public UnaryCallable deleteProfileCallable() { + return deleteProfileCallable; + } + + public UnaryCallable + searchProfilesPagedCallable() { + return searchProfilesPagedCallable; + } + + public UnaryCallable searchProfilesCallable() { + return searchProfilesCallable; + } + public UnaryCallable listProfilesPagedCallable() { return listProfilesPagedCallable; } @@ -288,19 +301,6 @@ public UnaryCallable updateProfileCallable() { return updateProfileCallable; } - public UnaryCallable deleteProfileCallable() { - return deleteProfileCallable; - } - - public UnaryCallable - searchProfilesPagedCallable() { - return searchProfilesPagedCallable; - } - - public UnaryCallable searchProfilesCallable() { - return searchProfilesCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcTenantServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcTenantServiceStub.java index 92821cdf..60fadda0 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcTenantServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcTenantServiceStub.java @@ -51,6 +51,13 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcTenantServiceStub extends TenantServiceStub { + private static final MethodDescriptor deleteTenantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4beta1.TenantService/DeleteTenant") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteTenantRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); private static final MethodDescriptor createTenantMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -72,13 +79,6 @@ public class GrpcTenantServiceStub extends TenantServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(UpdateTenantRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Tenant.getDefaultInstance())) .build(); - private static final MethodDescriptor deleteTenantMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.talent.v4beta1.TenantService/DeleteTenant") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteTenantRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); private static final MethodDescriptor listTenantsMethodDescriptor = MethodDescriptor.newBuilder() @@ -91,10 +91,10 @@ public class GrpcTenantServiceStub extends TenantServiceStub { private final BackgroundResource backgroundResources; + private final UnaryCallable deleteTenantCallable; private final UnaryCallable createTenantCallable; private final UnaryCallable getTenantCallable; private final UnaryCallable updateTenantCallable; - private final UnaryCallable deleteTenantCallable; private final UnaryCallable listTenantsCallable; private final UnaryCallable listTenantsPagedCallable; @@ -138,6 +138,19 @@ protected GrpcTenantServiceStub( throws IOException { this.callableFactory = callableFactory; + GrpcCallSettings deleteTenantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTenantMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTenantRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); GrpcCallSettings createTenantTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createTenantMethodDescriptor) @@ -177,19 +190,6 @@ public Map extract(UpdateTenantRequest request) { } }) .build(); - GrpcCallSettings deleteTenantTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteTenantMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteTenantRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); GrpcCallSettings listTenantsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listTenantsMethodDescriptor) @@ -204,6 +204,9 @@ public Map extract(ListTenantsRequest request) { }) .build(); + this.deleteTenantCallable = + callableFactory.createUnaryCallable( + deleteTenantTransportSettings, settings.deleteTenantSettings(), clientContext); this.createTenantCallable = callableFactory.createUnaryCallable( createTenantTransportSettings, settings.createTenantSettings(), clientContext); @@ -213,9 +216,6 @@ public Map extract(ListTenantsRequest request) { this.updateTenantCallable = callableFactory.createUnaryCallable( updateTenantTransportSettings, settings.updateTenantSettings(), clientContext); - this.deleteTenantCallable = - callableFactory.createUnaryCallable( - deleteTenantTransportSettings, settings.deleteTenantSettings(), clientContext); this.listTenantsCallable = callableFactory.createUnaryCallable( listTenantsTransportSettings, settings.listTenantsSettings(), clientContext); @@ -226,6 +226,10 @@ public Map extract(ListTenantsRequest request) { backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } + public UnaryCallable deleteTenantCallable() { + return deleteTenantCallable; + } + public UnaryCallable createTenantCallable() { return createTenantCallable; } @@ -238,10 +242,6 @@ public UnaryCallable updateTenantCallable() { return updateTenantCallable; } - public UnaryCallable deleteTenantCallable() { - return deleteTenantCallable; - } - public UnaryCallable listTenantsPagedCallable() { return listTenantsPagedCallable; } diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStub.java index 4bb36d64..0e14e039 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStub.java @@ -57,10 +57,24 @@ public OperationsStub getOperationsStub() { throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); } + public UnaryCallable deleteJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteJobCallable()"); + } + public UnaryCallable createJobCallable() { throw new UnsupportedOperationException("Not implemented: createJobCallable()"); } + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchCreateJobsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateJobsOperationCallable()"); + } + + public UnaryCallable batchCreateJobsCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateJobsCallable()"); + } + public UnaryCallable getJobCallable() { throw new UnsupportedOperationException("Not implemented: getJobCallable()"); } @@ -69,8 +83,18 @@ public UnaryCallable updateJobCallable() { throw new UnsupportedOperationException("Not implemented: updateJobCallable()"); } - public UnaryCallable deleteJobCallable() { - throw new UnsupportedOperationException("Not implemented: deleteJobCallable()"); + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchUpdateJobsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: batchUpdateJobsOperationCallable()"); + } + + public UnaryCallable batchUpdateJobsCallable() { + throw new UnsupportedOperationException("Not implemented: batchUpdateJobsCallable()"); + } + + public UnaryCallable batchDeleteJobsCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteJobsCallable()"); } public UnaryCallable listJobsPagedCallable() { @@ -81,10 +105,6 @@ public UnaryCallable listJobsCallable() { throw new UnsupportedOperationException("Not implemented: listJobsCallable()"); } - public UnaryCallable batchDeleteJobsCallable() { - throw new UnsupportedOperationException("Not implemented: batchDeleteJobsCallable()"); - } - public UnaryCallable searchJobsPagedCallable() { throw new UnsupportedOperationException("Not implemented: searchJobsPagedCallable()"); } @@ -102,26 +122,6 @@ public UnaryCallable searchJobsForAlertCa throw new UnsupportedOperationException("Not implemented: searchJobsForAlertCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchCreateJobsOperationCallable() { - throw new UnsupportedOperationException("Not implemented: batchCreateJobsOperationCallable()"); - } - - public UnaryCallable batchCreateJobsCallable() { - throw new UnsupportedOperationException("Not implemented: batchCreateJobsCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchUpdateJobsOperationCallable() { - throw new UnsupportedOperationException("Not implemented: batchUpdateJobsOperationCallable()"); - } - - public UnaryCallable batchUpdateJobsCallable() { - throw new UnsupportedOperationException("Not implemented: batchUpdateJobsCallable()"); - } - @Override public abstract void close(); } diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStubSettings.java index 50419abd..dde89e8b 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStubSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStubSettings.java @@ -85,14 +85,18 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createJob to 30 seconds: + *

For example, to set the total timeout of deleteJob to 30 seconds: * *

  * 
  * JobServiceStubSettings.Builder jobServiceSettingsBuilder =
  *     JobServiceStubSettings.newBuilder();
- * jobServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * jobServiceSettingsBuilder
+ *     .deleteJobSettings()
+ *     .setRetrySettings(
+ *         jobServiceSettingsBuilder.deleteJobSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * JobServiceStubSettings jobServiceSettings = jobServiceSettingsBuilder.build();
  * 
  * 
@@ -107,32 +111,49 @@ public class JobServiceStubSettings extends StubSettings .add("https://www.googleapis.com/auth/jobs") .build(); + private final UnaryCallSettings deleteJobSettings; private final UnaryCallSettings createJobSettings; + private final UnaryCallSettings batchCreateJobsSettings; + private final OperationCallSettings< + BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchCreateJobsOperationSettings; private final UnaryCallSettings getJobSettings; private final UnaryCallSettings updateJobSettings; - private final UnaryCallSettings deleteJobSettings; + private final UnaryCallSettings batchUpdateJobsSettings; + private final OperationCallSettings< + BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchUpdateJobsOperationSettings; + private final UnaryCallSettings batchDeleteJobsSettings; private final PagedCallSettings listJobsSettings; - private final UnaryCallSettings batchDeleteJobsSettings; private final PagedCallSettings searchJobsSettings; private final PagedCallSettings< SearchJobsRequest, SearchJobsResponse, SearchJobsForAlertPagedResponse> searchJobsForAlertSettings; - private final UnaryCallSettings batchCreateJobsSettings; - private final OperationCallSettings< - BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchCreateJobsOperationSettings; - private final UnaryCallSettings batchUpdateJobsSettings; - private final OperationCallSettings< - BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchUpdateJobsOperationSettings; + + /** Returns the object with the settings used for calls to deleteJob. */ + public UnaryCallSettings deleteJobSettings() { + return deleteJobSettings; + } /** Returns the object with the settings used for calls to createJob. */ public UnaryCallSettings createJobSettings() { return createJobSettings; } + /** Returns the object with the settings used for calls to batchCreateJobs. */ + public UnaryCallSettings batchCreateJobsSettings() { + return batchCreateJobsSettings; + } + + /** Returns the object with the settings used for calls to batchCreateJobs. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + batchCreateJobsOperationSettings() { + return batchCreateJobsOperationSettings; + } + /** Returns the object with the settings used for calls to getJob. */ public UnaryCallSettings getJobSettings() { return getJobSettings; @@ -143,15 +164,16 @@ public UnaryCallSettings updateJobSettings() { return updateJobSettings; } - /** Returns the object with the settings used for calls to deleteJob. */ - public UnaryCallSettings deleteJobSettings() { - return deleteJobSettings; + /** Returns the object with the settings used for calls to batchUpdateJobs. */ + public UnaryCallSettings batchUpdateJobsSettings() { + return batchUpdateJobsSettings; } - /** Returns the object with the settings used for calls to listJobs. */ - public PagedCallSettings - listJobsSettings() { - return listJobsSettings; + /** Returns the object with the settings used for calls to batchUpdateJobs. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + batchUpdateJobsOperationSettings() { + return batchUpdateJobsOperationSettings; } /** Returns the object with the settings used for calls to batchDeleteJobs. */ @@ -159,6 +181,12 @@ public UnaryCallSettings batchDeleteJobsSettings( return batchDeleteJobsSettings; } + /** Returns the object with the settings used for calls to listJobs. */ + public PagedCallSettings + listJobsSettings() { + return listJobsSettings; + } + /** Returns the object with the settings used for calls to searchJobs. */ public PagedCallSettings searchJobsSettings() { @@ -171,30 +199,6 @@ public UnaryCallSettings batchDeleteJobsSettings( return searchJobsForAlertSettings; } - /** Returns the object with the settings used for calls to batchCreateJobs. */ - public UnaryCallSettings batchCreateJobsSettings() { - return batchCreateJobsSettings; - } - - /** Returns the object with the settings used for calls to batchCreateJobs. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - batchCreateJobsOperationSettings() { - return batchCreateJobsOperationSettings; - } - - /** Returns the object with the settings used for calls to batchUpdateJobs. */ - public UnaryCallSettings batchUpdateJobsSettings() { - return batchUpdateJobsSettings; - } - - /** Returns the object with the settings used for calls to batchUpdateJobs. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - batchUpdateJobsOperationSettings() { - return batchUpdateJobsOperationSettings; - } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public JobServiceStub createStub() throws IOException { if (getTransportChannelProvider() @@ -264,18 +268,18 @@ public Builder toBuilder() { protected JobServiceStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); + deleteJobSettings = settingsBuilder.deleteJobSettings().build(); createJobSettings = settingsBuilder.createJobSettings().build(); + batchCreateJobsSettings = settingsBuilder.batchCreateJobsSettings().build(); + batchCreateJobsOperationSettings = settingsBuilder.batchCreateJobsOperationSettings().build(); getJobSettings = settingsBuilder.getJobSettings().build(); updateJobSettings = settingsBuilder.updateJobSettings().build(); - deleteJobSettings = settingsBuilder.deleteJobSettings().build(); - listJobsSettings = settingsBuilder.listJobsSettings().build(); + batchUpdateJobsSettings = settingsBuilder.batchUpdateJobsSettings().build(); + batchUpdateJobsOperationSettings = settingsBuilder.batchUpdateJobsOperationSettings().build(); batchDeleteJobsSettings = settingsBuilder.batchDeleteJobsSettings().build(); + listJobsSettings = settingsBuilder.listJobsSettings().build(); searchJobsSettings = settingsBuilder.searchJobsSettings().build(); searchJobsForAlertSettings = settingsBuilder.searchJobsForAlertSettings().build(); - batchCreateJobsSettings = settingsBuilder.batchCreateJobsSettings().build(); - batchCreateJobsOperationSettings = settingsBuilder.batchCreateJobsOperationSettings().build(); - batchUpdateJobsSettings = settingsBuilder.batchUpdateJobsSettings().build(); - batchUpdateJobsOperationSettings = settingsBuilder.batchUpdateJobsOperationSettings().build(); } private static final PagedListDescriptor @@ -449,30 +453,30 @@ public ApiFuture getFuturePagedResponse( public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder deleteJobSettings; private final UnaryCallSettings.Builder createJobSettings; + private final UnaryCallSettings.Builder + batchCreateJobsSettings; + private final OperationCallSettings.Builder< + BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchCreateJobsOperationSettings; private final UnaryCallSettings.Builder getJobSettings; private final UnaryCallSettings.Builder updateJobSettings; - private final UnaryCallSettings.Builder deleteJobSettings; + private final UnaryCallSettings.Builder + batchUpdateJobsSettings; + private final OperationCallSettings.Builder< + BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchUpdateJobsOperationSettings; + private final UnaryCallSettings.Builder batchDeleteJobsSettings; private final PagedCallSettings.Builder< ListJobsRequest, ListJobsResponse, ListJobsPagedResponse> listJobsSettings; - private final UnaryCallSettings.Builder batchDeleteJobsSettings; private final PagedCallSettings.Builder< SearchJobsRequest, SearchJobsResponse, SearchJobsPagedResponse> searchJobsSettings; private final PagedCallSettings.Builder< SearchJobsRequest, SearchJobsResponse, SearchJobsForAlertPagedResponse> searchJobsForAlertSettings; - private final UnaryCallSettings.Builder - batchCreateJobsSettings; - private final OperationCallSettings.Builder< - BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchCreateJobsOperationSettings; - private final UnaryCallSettings.Builder - batchUpdateJobsSettings; - private final OperationCallSettings.Builder< - BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchUpdateJobsOperationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -515,43 +519,43 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); + deleteJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchCreateJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + batchCreateJobsOperationSettings = OperationCallSettings.newBuilder(); + getJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchUpdateJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listJobsSettings = PagedCallSettings.newBuilder(LIST_JOBS_PAGE_STR_FACT); + batchUpdateJobsOperationSettings = OperationCallSettings.newBuilder(); batchDeleteJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listJobsSettings = PagedCallSettings.newBuilder(LIST_JOBS_PAGE_STR_FACT); + searchJobsSettings = PagedCallSettings.newBuilder(SEARCH_JOBS_PAGE_STR_FACT); searchJobsForAlertSettings = PagedCallSettings.newBuilder(SEARCH_JOBS_FOR_ALERT_PAGE_STR_FACT); - batchCreateJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - batchCreateJobsOperationSettings = OperationCallSettings.newBuilder(); - - batchUpdateJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - batchUpdateJobsOperationSettings = OperationCallSettings.newBuilder(); - unaryMethodSettingsBuilders = ImmutableList.>of( + deleteJobSettings, createJobSettings, + batchCreateJobsSettings, getJobSettings, updateJobSettings, - deleteJobSettings, - listJobsSettings, + batchUpdateJobsSettings, batchDeleteJobsSettings, + listJobsSettings, searchJobsSettings, - searchJobsForAlertSettings, - batchCreateJobsSettings, - batchUpdateJobsSettings); + searchJobsForAlertSettings); initDefaults(this); } @@ -568,52 +572,52 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { builder - .createJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .deleteJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .getJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .createJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .updateJobSettings() + .batchCreateJobsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .deleteJobSettings() + .getJobSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .listJobsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .updateJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .batchDeleteJobsSettings() + .batchUpdateJobsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .searchJobsSettings() + .batchDeleteJobsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .searchJobsForAlertSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .listJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .batchCreateJobsSettings() + .searchJobsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .batchUpdateJobsSettings() + .searchJobsForAlertSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder @@ -669,31 +673,31 @@ private static Builder initDefaults(Builder builder) { protected Builder(JobServiceStubSettings settings) { super(settings); + deleteJobSettings = settings.deleteJobSettings.toBuilder(); createJobSettings = settings.createJobSettings.toBuilder(); + batchCreateJobsSettings = settings.batchCreateJobsSettings.toBuilder(); + batchCreateJobsOperationSettings = settings.batchCreateJobsOperationSettings.toBuilder(); getJobSettings = settings.getJobSettings.toBuilder(); updateJobSettings = settings.updateJobSettings.toBuilder(); - deleteJobSettings = settings.deleteJobSettings.toBuilder(); - listJobsSettings = settings.listJobsSettings.toBuilder(); + batchUpdateJobsSettings = settings.batchUpdateJobsSettings.toBuilder(); + batchUpdateJobsOperationSettings = settings.batchUpdateJobsOperationSettings.toBuilder(); batchDeleteJobsSettings = settings.batchDeleteJobsSettings.toBuilder(); + listJobsSettings = settings.listJobsSettings.toBuilder(); searchJobsSettings = settings.searchJobsSettings.toBuilder(); searchJobsForAlertSettings = settings.searchJobsForAlertSettings.toBuilder(); - batchCreateJobsSettings = settings.batchCreateJobsSettings.toBuilder(); - batchCreateJobsOperationSettings = settings.batchCreateJobsOperationSettings.toBuilder(); - batchUpdateJobsSettings = settings.batchUpdateJobsSettings.toBuilder(); - batchUpdateJobsOperationSettings = settings.batchUpdateJobsOperationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( + deleteJobSettings, createJobSettings, + batchCreateJobsSettings, getJobSettings, updateJobSettings, - deleteJobSettings, - listJobsSettings, + batchUpdateJobsSettings, batchDeleteJobsSettings, + listJobsSettings, searchJobsSettings, - searchJobsForAlertSettings, - batchCreateJobsSettings, - batchUpdateJobsSettings); + searchJobsForAlertSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -712,11 +716,30 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } + /** Returns the builder for the settings used for calls to deleteJob. */ + public UnaryCallSettings.Builder deleteJobSettings() { + return deleteJobSettings; + } + /** Returns the builder for the settings used for calls to createJob. */ public UnaryCallSettings.Builder createJobSettings() { return createJobSettings; } + /** Returns the builder for the settings used for calls to batchCreateJobs. */ + public UnaryCallSettings.Builder batchCreateJobsSettings() { + return batchCreateJobsSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateJobs. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchCreateJobsOperationSettings() { + return batchCreateJobsOperationSettings; + } + /** Returns the builder for the settings used for calls to getJob. */ public UnaryCallSettings.Builder getJobSettings() { return getJobSettings; @@ -727,15 +750,18 @@ public UnaryCallSettings.Builder updateJobSettings() { return updateJobSettings; } - /** Returns the builder for the settings used for calls to deleteJob. */ - public UnaryCallSettings.Builder deleteJobSettings() { - return deleteJobSettings; + /** Returns the builder for the settings used for calls to batchUpdateJobs. */ + public UnaryCallSettings.Builder batchUpdateJobsSettings() { + return batchUpdateJobsSettings; } - /** Returns the builder for the settings used for calls to listJobs. */ - public PagedCallSettings.Builder - listJobsSettings() { - return listJobsSettings; + /** Returns the builder for the settings used for calls to batchUpdateJobs. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> + batchUpdateJobsOperationSettings() { + return batchUpdateJobsOperationSettings; } /** Returns the builder for the settings used for calls to batchDeleteJobs. */ @@ -743,6 +769,12 @@ public UnaryCallSettings.Builder batchDeleteJobsS return batchDeleteJobsSettings; } + /** Returns the builder for the settings used for calls to listJobs. */ + public PagedCallSettings.Builder + listJobsSettings() { + return listJobsSettings; + } + /** Returns the builder for the settings used for calls to searchJobs. */ public PagedCallSettings.Builder searchJobsSettings() { @@ -756,34 +788,6 @@ public UnaryCallSettings.Builder batchDeleteJobsS return searchJobsForAlertSettings; } - /** Returns the builder for the settings used for calls to batchCreateJobs. */ - public UnaryCallSettings.Builder batchCreateJobsSettings() { - return batchCreateJobsSettings; - } - - /** Returns the builder for the settings used for calls to batchCreateJobs. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - BatchCreateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchCreateJobsOperationSettings() { - return batchCreateJobsOperationSettings; - } - - /** Returns the builder for the settings used for calls to batchUpdateJobs. */ - public UnaryCallSettings.Builder batchUpdateJobsSettings() { - return batchUpdateJobsSettings; - } - - /** Returns the builder for the settings used for calls to batchUpdateJobs. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - BatchUpdateJobsRequest, JobOperationResult, BatchOperationMetadata> - batchUpdateJobsOperationSettings() { - return batchUpdateJobsOperationSettings; - } - @Override public JobServiceStubSettings build() throws IOException { return new JobServiceStubSettings(this); diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStub.java index e531803e..5dec1a12 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStub.java @@ -43,6 +43,19 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class ProfileServiceStub implements BackgroundResource { + public UnaryCallable deleteProfileCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProfileCallable()"); + } + + public UnaryCallable + searchProfilesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchProfilesPagedCallable()"); + } + + public UnaryCallable searchProfilesCallable() { + throw new UnsupportedOperationException("Not implemented: searchProfilesCallable()"); + } + public UnaryCallable listProfilesPagedCallable() { throw new UnsupportedOperationException("Not implemented: listProfilesPagedCallable()"); } @@ -63,19 +76,6 @@ public UnaryCallable updateProfileCallable() { throw new UnsupportedOperationException("Not implemented: updateProfileCallable()"); } - public UnaryCallable deleteProfileCallable() { - throw new UnsupportedOperationException("Not implemented: deleteProfileCallable()"); - } - - public UnaryCallable - searchProfilesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: searchProfilesPagedCallable()"); - } - - public UnaryCallable searchProfilesCallable() { - throw new UnsupportedOperationException("Not implemented: searchProfilesCallable()"); - } - @Override public abstract void close(); } diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStubSettings.java index b5f66306..8c706b12 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStubSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStubSettings.java @@ -75,14 +75,18 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createProfile to 30 seconds: + *

For example, to set the total timeout of deleteProfile to 30 seconds: * *

  * 
  * ProfileServiceStubSettings.Builder profileServiceSettingsBuilder =
  *     ProfileServiceStubSettings.newBuilder();
- * profileServiceSettingsBuilder.createProfileSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * profileServiceSettingsBuilder
+ *     .deleteProfileSettings()
+ *     .setRetrySettings(
+ *         profileServiceSettingsBuilder.deleteProfileSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * ProfileServiceStubSettings profileServiceSettings = profileServiceSettingsBuilder.build();
  * 
  * 
@@ -97,16 +101,28 @@ public class ProfileServiceStubSettings extends StubSettings deleteProfileSettings; + private final PagedCallSettings< + SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> + searchProfilesSettings; private final PagedCallSettings< ListProfilesRequest, ListProfilesResponse, ListProfilesPagedResponse> listProfilesSettings; private final UnaryCallSettings createProfileSettings; private final UnaryCallSettings getProfileSettings; private final UnaryCallSettings updateProfileSettings; - private final UnaryCallSettings deleteProfileSettings; - private final PagedCallSettings< + + /** Returns the object with the settings used for calls to deleteProfile. */ + public UnaryCallSettings deleteProfileSettings() { + return deleteProfileSettings; + } + + /** Returns the object with the settings used for calls to searchProfiles. */ + public PagedCallSettings< SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> - searchProfilesSettings; + searchProfilesSettings() { + return searchProfilesSettings; + } /** Returns the object with the settings used for calls to listProfiles. */ public PagedCallSettings @@ -129,18 +145,6 @@ public UnaryCallSettings updateProfileSettings() return updateProfileSettings; } - /** Returns the object with the settings used for calls to deleteProfile. */ - public UnaryCallSettings deleteProfileSettings() { - return deleteProfileSettings; - } - - /** Returns the object with the settings used for calls to searchProfiles. */ - public PagedCallSettings< - SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> - searchProfilesSettings() { - return searchProfilesSettings; - } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public ProfileServiceStub createStub() throws IOException { if (getTransportChannelProvider() @@ -210,103 +214,86 @@ public Builder toBuilder() { protected ProfileServiceStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); + deleteProfileSettings = settingsBuilder.deleteProfileSettings().build(); + searchProfilesSettings = settingsBuilder.searchProfilesSettings().build(); listProfilesSettings = settingsBuilder.listProfilesSettings().build(); createProfileSettings = settingsBuilder.createProfileSettings().build(); getProfileSettings = settingsBuilder.getProfileSettings().build(); updateProfileSettings = settingsBuilder.updateProfileSettings().build(); - deleteProfileSettings = settingsBuilder.deleteProfileSettings().build(); - searchProfilesSettings = settingsBuilder.searchProfilesSettings().build(); } - private static final PagedListDescriptor - LIST_PROFILES_PAGE_STR_DESC = - new PagedListDescriptor() { + private static final PagedListDescriptor< + SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile> + SEARCH_PROFILES_PAGE_STR_DESC = + new PagedListDescriptor< + SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile>() { @Override public String emptyToken() { return ""; } @Override - public ListProfilesRequest injectToken(ListProfilesRequest payload, String token) { - return ListProfilesRequest.newBuilder(payload).setPageToken(token).build(); + public SearchProfilesRequest injectToken(SearchProfilesRequest payload, String token) { + return SearchProfilesRequest.newBuilder(payload).setPageToken(token).build(); } @Override - public ListProfilesRequest injectPageSize(ListProfilesRequest payload, int pageSize) { - return ListProfilesRequest.newBuilder(payload).setPageSize(pageSize).build(); + public SearchProfilesRequest injectPageSize( + SearchProfilesRequest payload, int pageSize) { + return SearchProfilesRequest.newBuilder(payload).setPageSize(pageSize).build(); } @Override - public Integer extractPageSize(ListProfilesRequest payload) { + public Integer extractPageSize(SearchProfilesRequest payload) { return payload.getPageSize(); } @Override - public String extractNextToken(ListProfilesResponse payload) { + public String extractNextToken(SearchProfilesResponse payload) { return payload.getNextPageToken(); } @Override - public Iterable extractResources(ListProfilesResponse payload) { - return payload.getProfilesList() != null - ? payload.getProfilesList() - : ImmutableList.of(); + public Iterable extractResources(SearchProfilesResponse payload) { + return payload.getSummarizedProfilesList() != null + ? payload.getSummarizedProfilesList() + : ImmutableList.of(); } }; - private static final PagedListDescriptor< - SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile> - SEARCH_PROFILES_PAGE_STR_DESC = - new PagedListDescriptor< - SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile>() { + private static final PagedListDescriptor + LIST_PROFILES_PAGE_STR_DESC = + new PagedListDescriptor() { @Override public String emptyToken() { return ""; } @Override - public SearchProfilesRequest injectToken(SearchProfilesRequest payload, String token) { - return SearchProfilesRequest.newBuilder(payload).setPageToken(token).build(); + public ListProfilesRequest injectToken(ListProfilesRequest payload, String token) { + return ListProfilesRequest.newBuilder(payload).setPageToken(token).build(); } @Override - public SearchProfilesRequest injectPageSize( - SearchProfilesRequest payload, int pageSize) { - return SearchProfilesRequest.newBuilder(payload).setPageSize(pageSize).build(); + public ListProfilesRequest injectPageSize(ListProfilesRequest payload, int pageSize) { + return ListProfilesRequest.newBuilder(payload).setPageSize(pageSize).build(); } @Override - public Integer extractPageSize(SearchProfilesRequest payload) { + public Integer extractPageSize(ListProfilesRequest payload) { return payload.getPageSize(); } @Override - public String extractNextToken(SearchProfilesResponse payload) { + public String extractNextToken(ListProfilesResponse payload) { return payload.getNextPageToken(); } @Override - public Iterable extractResources(SearchProfilesResponse payload) { - return payload.getSummarizedProfilesList() != null - ? payload.getSummarizedProfilesList() - : ImmutableList.of(); - } - }; - - private static final PagedListResponseFactory< - ListProfilesRequest, ListProfilesResponse, ListProfilesPagedResponse> - LIST_PROFILES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProfilesRequest, ListProfilesResponse, ListProfilesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListProfilesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_PROFILES_PAGE_STR_DESC, request, context); - return ListProfilesPagedResponse.createAsync(pageContext, futureResponse); + public Iterable extractResources(ListProfilesResponse payload) { + return payload.getProfilesList() != null + ? payload.getProfilesList() + : ImmutableList.of(); } }; @@ -328,20 +315,37 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListProfilesRequest, ListProfilesResponse, ListProfilesPagedResponse> + LIST_PROFILES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProfilesRequest, ListProfilesResponse, ListProfilesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProfilesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PROFILES_PAGE_STR_DESC, request, context); + return ListProfilesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Builder for ProfileServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder deleteProfileSettings; + private final PagedCallSettings.Builder< + SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> + searchProfilesSettings; private final PagedCallSettings.Builder< ListProfilesRequest, ListProfilesResponse, ListProfilesPagedResponse> listProfilesSettings; private final UnaryCallSettings.Builder createProfileSettings; private final UnaryCallSettings.Builder getProfileSettings; private final UnaryCallSettings.Builder updateProfileSettings; - private final UnaryCallSettings.Builder deleteProfileSettings; - private final PagedCallSettings.Builder< - SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> - searchProfilesSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -384,6 +388,10 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); + deleteProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + searchProfilesSettings = PagedCallSettings.newBuilder(SEARCH_PROFILES_PAGE_STR_FACT); + listProfilesSettings = PagedCallSettings.newBuilder(LIST_PROFILES_PAGE_STR_FACT); createProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -392,18 +400,14 @@ protected Builder(ClientContext clientContext) { updateProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - searchProfilesSettings = PagedCallSettings.newBuilder(SEARCH_PROFILES_PAGE_STR_FACT); - unaryMethodSettingsBuilders = ImmutableList.>of( + deleteProfileSettings, + searchProfilesSettings, listProfilesSettings, createProfileSettings, getProfileSettings, - updateProfileSettings, - deleteProfileSettings, - searchProfilesSettings); + updateProfileSettings); initDefaults(this); } @@ -420,32 +424,32 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { builder - .listProfilesSettings() + .deleteProfileSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .createProfileSettings() + .searchProfilesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .getProfileSettings() + .listProfilesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .updateProfileSettings() + .createProfileSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .deleteProfileSettings() + .getProfileSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder - .searchProfilesSettings() + .updateProfileSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); @@ -455,21 +459,21 @@ private static Builder initDefaults(Builder builder) { protected Builder(ProfileServiceStubSettings settings) { super(settings); + deleteProfileSettings = settings.deleteProfileSettings.toBuilder(); + searchProfilesSettings = settings.searchProfilesSettings.toBuilder(); listProfilesSettings = settings.listProfilesSettings.toBuilder(); createProfileSettings = settings.createProfileSettings.toBuilder(); getProfileSettings = settings.getProfileSettings.toBuilder(); updateProfileSettings = settings.updateProfileSettings.toBuilder(); - deleteProfileSettings = settings.deleteProfileSettings.toBuilder(); - searchProfilesSettings = settings.searchProfilesSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( + deleteProfileSettings, + searchProfilesSettings, listProfilesSettings, createProfileSettings, getProfileSettings, - updateProfileSettings, - deleteProfileSettings, - searchProfilesSettings); + updateProfileSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -488,6 +492,18 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } + /** Returns the builder for the settings used for calls to deleteProfile. */ + public UnaryCallSettings.Builder deleteProfileSettings() { + return deleteProfileSettings; + } + + /** Returns the builder for the settings used for calls to searchProfiles. */ + public PagedCallSettings.Builder< + SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> + searchProfilesSettings() { + return searchProfilesSettings; + } + /** Returns the builder for the settings used for calls to listProfiles. */ public PagedCallSettings.Builder< ListProfilesRequest, ListProfilesResponse, ListProfilesPagedResponse> @@ -510,18 +526,6 @@ public UnaryCallSettings.Builder updateProfileSet return updateProfileSettings; } - /** Returns the builder for the settings used for calls to deleteProfile. */ - public UnaryCallSettings.Builder deleteProfileSettings() { - return deleteProfileSettings; - } - - /** Returns the builder for the settings used for calls to searchProfiles. */ - public PagedCallSettings.Builder< - SearchProfilesRequest, SearchProfilesResponse, SearchProfilesPagedResponse> - searchProfilesSettings() { - return searchProfilesSettings; - } - @Override public ProfileServiceStubSettings build() throws IOException { return new ProfileServiceStubSettings(this); diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStub.java index 9d8528c8..94bd7eca 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStub.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStub.java @@ -40,6 +40,10 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class TenantServiceStub implements BackgroundResource { + public UnaryCallable deleteTenantCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTenantCallable()"); + } + public UnaryCallable createTenantCallable() { throw new UnsupportedOperationException("Not implemented: createTenantCallable()"); } @@ -52,10 +56,6 @@ public UnaryCallable updateTenantCallable() { throw new UnsupportedOperationException("Not implemented: updateTenantCallable()"); } - public UnaryCallable deleteTenantCallable() { - throw new UnsupportedOperationException("Not implemented: deleteTenantCallable()"); - } - public UnaryCallable listTenantsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listTenantsPagedCallable()"); } diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStubSettings.java index e60e9622..5878504d 100644 --- a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStubSettings.java +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStubSettings.java @@ -71,14 +71,18 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createTenant to 30 seconds: + *

For example, to set the total timeout of deleteTenant to 30 seconds: * *

  * 
  * TenantServiceStubSettings.Builder tenantServiceSettingsBuilder =
  *     TenantServiceStubSettings.newBuilder();
- * tenantServiceSettingsBuilder.createTenantSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * tenantServiceSettingsBuilder
+ *     .deleteTenantSettings()
+ *     .setRetrySettings(
+ *         tenantServiceSettingsBuilder.deleteTenantSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * TenantServiceStubSettings tenantServiceSettings = tenantServiceSettingsBuilder.build();
  * 
  * 
@@ -93,13 +97,18 @@ public class TenantServiceStubSettings extends StubSettings deleteTenantSettings; private final UnaryCallSettings createTenantSettings; private final UnaryCallSettings getTenantSettings; private final UnaryCallSettings updateTenantSettings; - private final UnaryCallSettings deleteTenantSettings; private final PagedCallSettings listTenantsSettings; + /** Returns the object with the settings used for calls to deleteTenant. */ + public UnaryCallSettings deleteTenantSettings() { + return deleteTenantSettings; + } + /** Returns the object with the settings used for calls to createTenant. */ public UnaryCallSettings createTenantSettings() { return createTenantSettings; @@ -115,11 +124,6 @@ public UnaryCallSettings updateTenantSettings() { return updateTenantSettings; } - /** Returns the object with the settings used for calls to deleteTenant. */ - public UnaryCallSettings deleteTenantSettings() { - return deleteTenantSettings; - } - /** Returns the object with the settings used for calls to listTenants. */ public PagedCallSettings listTenantsSettings() { @@ -195,10 +199,10 @@ public Builder toBuilder() { protected TenantServiceStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); + deleteTenantSettings = settingsBuilder.deleteTenantSettings().build(); createTenantSettings = settingsBuilder.createTenantSettings().build(); getTenantSettings = settingsBuilder.getTenantSettings().build(); updateTenantSettings = settingsBuilder.updateTenantSettings().build(); - deleteTenantSettings = settingsBuilder.deleteTenantSettings().build(); listTenantsSettings = settingsBuilder.listTenantsSettings().build(); } @@ -259,10 +263,10 @@ public ApiFuture getFuturePagedResponse( public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder deleteTenantSettings; private final UnaryCallSettings.Builder createTenantSettings; private final UnaryCallSettings.Builder getTenantSettings; private final UnaryCallSettings.Builder updateTenantSettings; - private final UnaryCallSettings.Builder deleteTenantSettings; private final PagedCallSettings.Builder< ListTenantsRequest, ListTenantsResponse, ListTenantsPagedResponse> listTenantsSettings; @@ -308,22 +312,22 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); + deleteTenantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTenantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getTenantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateTenantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteTenantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listTenantsSettings = PagedCallSettings.newBuilder(LIST_TENANTS_PAGE_STR_FACT); unaryMethodSettingsBuilders = ImmutableList.>of( + deleteTenantSettings, createTenantSettings, getTenantSettings, updateTenantSettings, - deleteTenantSettings, listTenantsSettings); initDefaults(this); @@ -340,6 +344,11 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { + builder + .deleteTenantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .createTenantSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -355,11 +364,6 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder - .deleteTenantSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder .listTenantsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) @@ -371,18 +375,18 @@ private static Builder initDefaults(Builder builder) { protected Builder(TenantServiceStubSettings settings) { super(settings); + deleteTenantSettings = settings.deleteTenantSettings.toBuilder(); createTenantSettings = settings.createTenantSettings.toBuilder(); getTenantSettings = settings.getTenantSettings.toBuilder(); updateTenantSettings = settings.updateTenantSettings.toBuilder(); - deleteTenantSettings = settings.deleteTenantSettings.toBuilder(); listTenantsSettings = settings.listTenantsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( + deleteTenantSettings, createTenantSettings, getTenantSettings, updateTenantSettings, - deleteTenantSettings, listTenantsSettings); } @@ -402,6 +406,11 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } + /** Returns the builder for the settings used for calls to deleteTenant. */ + public UnaryCallSettings.Builder deleteTenantSettings() { + return deleteTenantSettings; + } + /** Returns the builder for the settings used for calls to createTenant. */ public UnaryCallSettings.Builder createTenantSettings() { return createTenantSettings; @@ -417,11 +426,6 @@ public UnaryCallSettings.Builder updateTenantSettin return updateTenantSettings; } - /** Returns the builder for the settings used for calls to deleteTenant. */ - public UnaryCallSettings.Builder deleteTenantSettings() { - return deleteTenantSettings; - } - /** Returns the builder for the settings used for calls to listTenants. */ public PagedCallSettings.Builder< ListTenantsRequest, ListTenantsResponse, ListTenantsPagedResponse> diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ApplicationServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ApplicationServiceClientTest.java index bb0c4103..2d64b052 100644 --- a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ApplicationServiceClientTest.java +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ApplicationServiceClientTest.java @@ -98,6 +98,45 @@ public void tearDown() throws Exception { client.close(); } + @Test + @SuppressWarnings("all") + public void deleteApplicationTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockApplicationService.addResponse(expectedResponse); + + ApplicationName name = + ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"); + + client.deleteApplication(name); + + List actualRequests = mockApplicationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApplicationRequest actualRequest = (DeleteApplicationRequest) actualRequests.get(0); + + Assert.assertEquals(name, ApplicationName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockApplicationService.addException(exception); + + try { + ApplicationName name = + ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"); + + client.deleteApplication(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void createApplicationTest() { @@ -105,8 +144,8 @@ public void createApplicationTest() { ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"); String externalId = "externalId-1153075697"; String profile = "profile-309425751"; - String job = "job105405"; - String company = "company950484093"; + JobName job = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); + CompanyName company = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); String outcomeNotes = "outcomeNotes-355961964"; String jobTitleSnippet = "jobTitleSnippet-1100512972"; Application expectedResponse = @@ -114,8 +153,8 @@ public void createApplicationTest() { .setName(name.toString()) .setExternalId(externalId) .setProfile(profile) - .setJob(job) - .setCompany(company) + .setJob(job.toString()) + .setCompany(company.toString()) .setOutcomeNotes(outcomeNotes) .setJobTitleSnippet(jobTitleSnippet) .build(); @@ -163,8 +202,8 @@ public void getApplicationTest() { ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"); String externalId = "externalId-1153075697"; String profile = "profile-309425751"; - String job = "job105405"; - String company = "company950484093"; + JobName job = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); + CompanyName company = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); String outcomeNotes = "outcomeNotes-355961964"; String jobTitleSnippet = "jobTitleSnippet-1100512972"; Application expectedResponse = @@ -172,8 +211,8 @@ public void getApplicationTest() { .setName(name2.toString()) .setExternalId(externalId) .setProfile(profile) - .setJob(job) - .setCompany(company) + .setJob(job.toString()) + .setCompany(company.toString()) .setOutcomeNotes(outcomeNotes) .setJobTitleSnippet(jobTitleSnippet) .build(); @@ -220,8 +259,8 @@ public void updateApplicationTest() { ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"); String externalId = "externalId-1153075697"; String profile = "profile-309425751"; - String job = "job105405"; - String company = "company950484093"; + JobName job = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); + CompanyName company = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); String outcomeNotes = "outcomeNotes-355961964"; String jobTitleSnippet = "jobTitleSnippet-1100512972"; Application expectedResponse = @@ -229,8 +268,8 @@ public void updateApplicationTest() { .setName(name.toString()) .setExternalId(externalId) .setProfile(profile) - .setJob(job) - .setCompany(company) + .setJob(job.toString()) + .setCompany(company.toString()) .setOutcomeNotes(outcomeNotes) .setJobTitleSnippet(jobTitleSnippet) .build(); @@ -268,45 +307,6 @@ public void updateApplicationExceptionTest() throws Exception { } } - @Test - @SuppressWarnings("all") - public void deleteApplicationTest() { - Empty expectedResponse = Empty.newBuilder().build(); - mockApplicationService.addResponse(expectedResponse); - - ApplicationName name = - ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"); - - client.deleteApplication(name); - - List actualRequests = mockApplicationService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteApplicationRequest actualRequest = (DeleteApplicationRequest) actualRequests.get(0); - - Assert.assertEquals(name, ApplicationName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteApplicationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockApplicationService.addException(exception); - - try { - ApplicationName name = - ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"); - - client.deleteApplication(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - @Test @SuppressWarnings("all") public void listApplicationsTest() { diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompanyServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompanyServiceClientTest.java index bdd8169c..942b3a13 100644 --- a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompanyServiceClientTest.java +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompanyServiceClientTest.java @@ -98,10 +98,47 @@ public void tearDown() throws Exception { client.close(); } + @Test + @SuppressWarnings("all") + public void deleteCompanyTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockCompanyService.addResponse(expectedResponse); + + CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); + + client.deleteCompany(name); + + List actualRequests = mockCompanyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCompanyRequest actualRequest = (DeleteCompanyRequest) actualRequests.get(0); + + Assert.assertEquals(name, CompanyName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteCompanyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCompanyService.addException(exception); + + try { + CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); + + client.deleteCompany(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void createCompanyTest() { - CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); String displayName = "displayName1615086568"; String externalId = "externalId-1153075697"; String headquartersAddress = "headquartersAddress-1879520036"; @@ -126,7 +163,7 @@ public void createCompanyTest() { .build(); mockCompanyService.addResponse(expectedResponse); - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); Company company = Company.newBuilder().build(); Company actualResponse = client.createCompany(parent, company); @@ -136,7 +173,7 @@ public void createCompanyTest() { Assert.assertEquals(1, actualRequests.size()); CreateCompanyRequest actualRequest = (CreateCompanyRequest) actualRequests.get(0); - Assert.assertEquals(parent, TenantOrProjectNames.parse(actualRequest.getParent())); + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); Assert.assertEquals(company, actualRequest.getCompany()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -151,7 +188,7 @@ public void createCompanyExceptionTest() throws Exception { mockCompanyService.addException(exception); try { - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); Company company = Company.newBuilder().build(); client.createCompany(parent, company); @@ -164,7 +201,7 @@ public void createCompanyExceptionTest() throws Exception { @Test @SuppressWarnings("all") public void getCompanyTest() { - CompanyName name2 = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + CompanyName name2 = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); String displayName = "displayName1615086568"; String externalId = "externalId-1153075697"; String headquartersAddress = "headquartersAddress-1879520036"; @@ -189,7 +226,7 @@ public void getCompanyTest() { .build(); mockCompanyService.addResponse(expectedResponse); - CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); Company actualResponse = client.getCompany(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -198,7 +235,7 @@ public void getCompanyTest() { Assert.assertEquals(1, actualRequests.size()); GetCompanyRequest actualRequest = (GetCompanyRequest) actualRequests.get(0); - Assert.assertEquals(name, CompanyNames.parse(actualRequest.getName())); + Assert.assertEquals(name, CompanyName.parse(actualRequest.getName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -212,7 +249,7 @@ public void getCompanyExceptionTest() throws Exception { mockCompanyService.addException(exception); try { - CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); client.getCompany(name); Assert.fail("No exception raised"); @@ -224,7 +261,7 @@ public void getCompanyExceptionTest() throws Exception { @Test @SuppressWarnings("all") public void updateCompanyTest() { - CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + CompanyName name = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); String displayName = "displayName1615086568"; String externalId = "externalId-1153075697"; String headquartersAddress = "headquartersAddress-1879520036"; @@ -281,43 +318,6 @@ public void updateCompanyExceptionTest() throws Exception { } } - @Test - @SuppressWarnings("all") - public void deleteCompanyTest() { - Empty expectedResponse = Empty.newBuilder().build(); - mockCompanyService.addResponse(expectedResponse); - - CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); - - client.deleteCompany(name); - - List actualRequests = mockCompanyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteCompanyRequest actualRequest = (DeleteCompanyRequest) actualRequests.get(0); - - Assert.assertEquals(name, CompanyNames.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteCompanyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockCompanyService.addException(exception); - - try { - CompanyName name = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); - - client.deleteCompany(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - @Test @SuppressWarnings("all") public void listCompaniesTest() { @@ -331,7 +331,7 @@ public void listCompaniesTest() { .build(); mockCompanyService.addResponse(expectedResponse); - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); ListCompaniesPagedResponse pagedListResponse = client.listCompanies(parent); @@ -343,7 +343,7 @@ public void listCompaniesTest() { Assert.assertEquals(1, actualRequests.size()); ListCompaniesRequest actualRequest = (ListCompaniesRequest) actualRequests.get(0); - Assert.assertEquals(parent, TenantOrProjectNames.parse(actualRequest.getParent())); + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -357,7 +357,7 @@ public void listCompaniesExceptionTest() throws Exception { mockCompanyService.addException(exception); try { - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); client.listCompanies(parent); Assert.fail("No exception raised"); diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompletionClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompletionClientTest.java index 3c75409f..2cb1bbf8 100644 --- a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompletionClientTest.java +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompletionClientTest.java @@ -16,16 +16,25 @@ package com.google.cloud.talent.v4beta1; import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.grpc.testing.MockGrpcService; import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.Arrays; +import java.util.List; import java.util.UUID; import org.junit.After; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Test; @javax.annotation.Generated("by GAPIC") public class CompletionClientTest { @@ -84,4 +93,60 @@ public void setUp() throws IOException { public void tearDown() throws Exception { client.close(); } + + @Test + @SuppressWarnings("all") + public void completeQueryTest() { + CompleteQueryResponse expectedResponse = CompleteQueryResponse.newBuilder().build(); + mockCompletion.addResponse(expectedResponse); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + String query = "query107944136"; + int pageSize = 883849137; + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setParent(parent.toString()) + .setQuery(query) + .setPageSize(pageSize) + .build(); + + CompleteQueryResponse actualResponse = client.completeQuery(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCompletion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CompleteQueryRequest actualRequest = (CompleteQueryRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertEquals(pageSize, actualRequest.getPageSize()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void completeQueryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCompletion.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + String query = "query107944136"; + int pageSize = 883849137; + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setParent(parent.toString()) + .setQuery(query) + .setPageSize(pageSize) + .build(); + + client.completeQuery(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } } diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/EventServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/EventServiceClientTest.java index 1cab545b..ca270b4b 100644 --- a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/EventServiceClientTest.java +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/EventServiceClientTest.java @@ -108,7 +108,7 @@ public void createClientEventTest() { .build(); mockEventService.addResponse(expectedResponse); - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); ClientEvent clientEvent = ClientEvent.newBuilder().build(); ClientEvent actualResponse = client.createClientEvent(parent, clientEvent); @@ -118,7 +118,7 @@ public void createClientEventTest() { Assert.assertEquals(1, actualRequests.size()); CreateClientEventRequest actualRequest = (CreateClientEventRequest) actualRequests.get(0); - Assert.assertEquals(parent, TenantOrProjectNames.parse(actualRequest.getParent())); + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); Assert.assertEquals(clientEvent, actualRequest.getClientEvent()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -133,7 +133,7 @@ public void createClientEventExceptionTest() throws Exception { mockEventService.addException(exception); try { - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); ClientEvent clientEvent = ClientEvent.newBuilder().build(); client.createClientEvent(parent, clientEvent); diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/JobServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/JobServiceClientTest.java index 3bb76e11..f49363d4 100644 --- a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/JobServiceClientTest.java +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/JobServiceClientTest.java @@ -16,6 +16,8 @@ package com.google.cloud.talent.v4beta1; import static com.google.cloud.talent.v4beta1.JobServiceClient.ListJobsPagedResponse; +import static com.google.cloud.talent.v4beta1.JobServiceClient.SearchJobsForAlertPagedResponse; +import static com.google.cloud.talent.v4beta1.JobServiceClient.SearchJobsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -103,11 +105,48 @@ public void tearDown() throws Exception { client.close(); } + @Test + @SuppressWarnings("all") + public void deleteJobTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); + + client.deleteJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteJobRequest actualRequest = (DeleteJobRequest) actualRequests.get(0); + + Assert.assertEquals(name, JobName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); + + client.deleteJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void createJobTest() { - JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]"); - CompanyName company = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); + CompanyName company = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); String requisitionId = "requisitionId980224926"; String title = "title110371416"; String description = "description-1724546052"; @@ -135,7 +174,7 @@ public void createJobTest() { .build(); mockJobService.addResponse(expectedResponse); - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); Job job = Job.newBuilder().build(); Job actualResponse = client.createJob(parent, job); @@ -145,7 +184,7 @@ public void createJobTest() { Assert.assertEquals(1, actualRequests.size()); CreateJobRequest actualRequest = (CreateJobRequest) actualRequests.get(0); - Assert.assertEquals(parent, TenantOrProjectNames.parse(actualRequest.getParent())); + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); Assert.assertEquals(job, actualRequest.getJob()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -160,7 +199,7 @@ public void createJobExceptionTest() throws Exception { mockJobService.addException(exception); try { - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); Job job = Job.newBuilder().build(); client.createJob(parent, job); @@ -170,11 +209,60 @@ public void createJobExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void batchCreateJobsTest() throws Exception { + JobOperationResult expectedResponse = JobOperationResult.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchCreateJobsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List jobs = new ArrayList<>(); + + JobOperationResult actualResponse = client.batchCreateJobsAsync(parent, jobs).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateJobsRequest actualRequest = (BatchCreateJobsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(jobs, actualRequest.getJobsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchCreateJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List jobs = new ArrayList<>(); + + client.batchCreateJobsAsync(parent, jobs).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test @SuppressWarnings("all") public void getJobTest() { - JobName name2 = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]"); - CompanyName company = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + JobName name2 = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); + CompanyName company = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); String requisitionId = "requisitionId980224926"; String title = "title110371416"; String description = "description-1724546052"; @@ -202,7 +290,7 @@ public void getJobTest() { .build(); mockJobService.addResponse(expectedResponse); - JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]"); + JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); Job actualResponse = client.getJob(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -211,7 +299,7 @@ public void getJobTest() { Assert.assertEquals(1, actualRequests.size()); GetJobRequest actualRequest = (GetJobRequest) actualRequests.get(0); - Assert.assertEquals(name, JobNames.parse(actualRequest.getName())); + Assert.assertEquals(name, JobName.parse(actualRequest.getName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -225,7 +313,7 @@ public void getJobExceptionTest() throws Exception { mockJobService.addException(exception); try { - JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]"); + JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); client.getJob(name); Assert.fail("No exception raised"); @@ -237,8 +325,8 @@ public void getJobExceptionTest() throws Exception { @Test @SuppressWarnings("all") public void updateJobTest() { - JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]"); - CompanyName company = CompanyWithTenantName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + JobName name = JobName.ofProjectJobName("[PROJECT]", "[JOB]"); + CompanyName company = CompanyName.ofProjectCompanyName("[PROJECT]", "[COMPANY]"); String requisitionId = "requisitionId980224926"; String title = "title110371416"; String description = "description-1724546052"; @@ -300,19 +388,28 @@ public void updateJobExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void deleteJobTest() { - Empty expectedResponse = Empty.newBuilder().build(); - mockJobService.addResponse(expectedResponse); + public void batchUpdateJobsTest() throws Exception { + JobOperationResult expectedResponse = JobOperationResult.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchUpdateJobsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); - JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List jobs = new ArrayList<>(); - client.deleteJob(name); + JobOperationResult actualResponse = client.batchUpdateJobsAsync(parent, jobs).get(); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteJobRequest actualRequest = (DeleteJobRequest) actualRequests.get(0); + BatchUpdateJobsRequest actualRequest = (BatchUpdateJobsRequest) actualRequests.get(0); - Assert.assertEquals(name, JobNames.parse(actualRequest.getName())); + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(jobs, actualRequest.getJobsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -321,44 +418,39 @@ public void deleteJobTest() { @Test @SuppressWarnings("all") - public void deleteJobExceptionTest() throws Exception { + public void batchUpdateJobsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - JobName name = JobWithTenantName.of("[PROJECT]", "[TENANT]", "[JOBS]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List jobs = new ArrayList<>(); - client.deleteJob(name); + client.batchUpdateJobsAsync(parent, jobs).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test @SuppressWarnings("all") - public void listJobsTest() { - String nextPageToken = ""; - Job jobsElement = Job.newBuilder().build(); - List jobs = Arrays.asList(jobsElement); - ListJobsResponse expectedResponse = - ListJobsResponse.newBuilder().setNextPageToken(nextPageToken).addAllJobs(jobs).build(); + public void batchDeleteJobsTest() { + Empty expectedResponse = Empty.newBuilder().build(); mockJobService.addResponse(expectedResponse); - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); String filter = "filter-1274492040"; - ListJobsPagedResponse pagedListResponse = client.listJobs(parent, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + client.batchDeleteJobs(parent, filter); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListJobsRequest actualRequest = (ListJobsRequest) actualRequests.get(0); + BatchDeleteJobsRequest actualRequest = (BatchDeleteJobsRequest) actualRequests.get(0); - Assert.assertEquals(parent, TenantOrProjectNames.parse(actualRequest.getParent())); + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); Assert.assertEquals(filter, actualRequest.getFilter()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -368,15 +460,15 @@ public void listJobsTest() { @Test @SuppressWarnings("all") - public void listJobsExceptionTest() throws Exception { + public void batchDeleteJobsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); String filter = "filter-1274492040"; - client.listJobs(parent, filter); + client.batchDeleteJobs(parent, filter); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -385,20 +477,28 @@ public void listJobsExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void batchDeleteJobsTest() { - Empty expectedResponse = Empty.newBuilder().build(); + public void listJobsTest() { + String nextPageToken = ""; + Job jobsElement = Job.newBuilder().build(); + List jobs = Arrays.asList(jobsElement); + ListJobsResponse expectedResponse = + ListJobsResponse.newBuilder().setNextPageToken(nextPageToken).addAllJobs(jobs).build(); mockJobService.addResponse(expectedResponse); - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); String filter = "filter-1274492040"; - client.batchDeleteJobs(parent, filter); + ListJobsPagedResponse pagedListResponse = client.listJobs(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchDeleteJobsRequest actualRequest = (BatchDeleteJobsRequest) actualRequests.get(0); + ListJobsRequest actualRequest = (ListJobsRequest) actualRequests.get(0); - Assert.assertEquals(parent, TenantOrProjectNames.parse(actualRequest.getParent())); + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); Assert.assertEquals(filter, actualRequest.getFilter()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -408,15 +508,15 @@ public void batchDeleteJobsTest() { @Test @SuppressWarnings("all") - public void batchDeleteJobsExceptionTest() throws Exception { + public void listJobsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); String filter = "filter-1274492040"; - client.batchDeleteJobs(parent, filter); + client.listJobs(parent, filter); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -425,28 +525,45 @@ public void batchDeleteJobsExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void batchCreateJobsTest() throws Exception { - JobOperationResult expectedResponse = JobOperationResult.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("batchCreateJobsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) + public void searchJobsTest() { + String nextPageToken = ""; + int estimatedTotalSize = 1882144769; + int totalSize = 705419236; + int broadenedQueryJobsCount = 1432104658; + SearchJobsResponse.MatchingJob matchingJobsElement = + SearchJobsResponse.MatchingJob.newBuilder().build(); + List matchingJobs = Arrays.asList(matchingJobsElement); + SearchJobsResponse expectedResponse = + SearchJobsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .setEstimatedTotalSize(estimatedTotalSize) + .setTotalSize(totalSize) + .setBroadenedQueryJobsCount(broadenedQueryJobsCount) + .addAllMatchingJobs(matchingJobs) .build(); - mockJobService.addResponse(resultOperation); + mockJobService.addResponse(expectedResponse); - String formattedParent = TenantName.format("[PROJECT]", "[TENANT]"); - List jobs = new ArrayList<>(); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); - JobOperationResult actualResponse = client.batchCreateJobsAsync(formattedParent, jobs).get(); - Assert.assertEquals(expectedResponse, actualResponse); + SearchJobsPagedResponse pagedListResponse = client.searchJobs(request); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMatchingJobsList().get(0), resources.get(0)); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchCreateJobsRequest actualRequest = (BatchCreateJobsRequest) actualRequests.get(0); + SearchJobsRequest actualRequest = (SearchJobsRequest) actualRequests.get(0); - Assert.assertEquals(formattedParent, actualRequest.getParent()); - Assert.assertEquals(jobs, actualRequest.getJobsList()); + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(requestMetadata, actualRequest.getRequestMetadata()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -455,47 +572,67 @@ public void batchCreateJobsTest() throws Exception { @Test @SuppressWarnings("all") - public void batchCreateJobsExceptionTest() throws Exception { + public void searchJobsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - String formattedParent = TenantName.format("[PROJECT]", "[TENANT]"); - List jobs = new ArrayList<>(); - - client.batchCreateJobsAsync(formattedParent, jobs).get(); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); + + client.searchJobs(request); Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } catch (InvalidArgumentException e) { + // Expected exception } } @Test @SuppressWarnings("all") - public void batchUpdateJobsTest() throws Exception { - JobOperationResult expectedResponse = JobOperationResult.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("batchUpdateJobsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) + public void searchJobsForAlertTest() { + String nextPageToken = ""; + int estimatedTotalSize = 1882144769; + int totalSize = 705419236; + int broadenedQueryJobsCount = 1432104658; + SearchJobsResponse.MatchingJob matchingJobsElement = + SearchJobsResponse.MatchingJob.newBuilder().build(); + List matchingJobs = Arrays.asList(matchingJobsElement); + SearchJobsResponse expectedResponse = + SearchJobsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .setEstimatedTotalSize(estimatedTotalSize) + .setTotalSize(totalSize) + .setBroadenedQueryJobsCount(broadenedQueryJobsCount) + .addAllMatchingJobs(matchingJobs) .build(); - mockJobService.addResponse(resultOperation); + mockJobService.addResponse(expectedResponse); - String formattedParent = TenantName.format("[PROJECT]", "[TENANT]"); - List jobs = new ArrayList<>(); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); - JobOperationResult actualResponse = client.batchUpdateJobsAsync(formattedParent, jobs).get(); - Assert.assertEquals(expectedResponse, actualResponse); + SearchJobsForAlertPagedResponse pagedListResponse = client.searchJobsForAlert(request); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMatchingJobsList().get(0), resources.get(0)); List actualRequests = mockJobService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchUpdateJobsRequest actualRequest = (BatchUpdateJobsRequest) actualRequests.get(0); + SearchJobsRequest actualRequest = (SearchJobsRequest) actualRequests.get(0); - Assert.assertEquals(formattedParent, actualRequest.getParent()); - Assert.assertEquals(jobs, actualRequest.getJobsList()); + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(requestMetadata, actualRequest.getRequestMetadata()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -504,20 +641,23 @@ public void batchUpdateJobsTest() throws Exception { @Test @SuppressWarnings("all") - public void batchUpdateJobsExceptionTest() throws Exception { + public void searchJobsForAlertExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockJobService.addException(exception); try { - String formattedParent = TenantName.format("[PROJECT]", "[TENANT]"); - List jobs = new ArrayList<>(); - - client.batchUpdateJobsAsync(formattedParent, jobs).get(); + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); + + client.searchJobsForAlert(request); Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } catch (InvalidArgumentException e) { + // Expected exception } } } diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ProfileServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ProfileServiceClientTest.java index f730ec7b..e132ca74 100644 --- a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ProfileServiceClientTest.java +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ProfileServiceClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.talent.v4beta1; import static com.google.cloud.talent.v4beta1.ProfileServiceClient.ListProfilesPagedResponse; +import static com.google.cloud.talent.v4beta1.ProfileServiceClient.SearchProfilesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -98,6 +99,108 @@ public void tearDown() throws Exception { client.close(); } + @Test + @SuppressWarnings("all") + public void deleteProfileTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockProfileService.addResponse(expectedResponse); + + ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]"); + + client.deleteProfile(name); + + List actualRequests = mockProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProfileRequest actualRequest = (DeleteProfileRequest) actualRequests.get(0); + + Assert.assertEquals(name, ProfileName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteProfileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockProfileService.addException(exception); + + try { + ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]"); + + client.deleteProfile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void searchProfilesTest() { + long estimatedTotalSize = 1882144769L; + String nextPageToken = ""; + String resultSetId = "resultSetId-770306950"; + SummarizedProfile summarizedProfilesElement = SummarizedProfile.newBuilder().build(); + List summarizedProfiles = Arrays.asList(summarizedProfilesElement); + SearchProfilesResponse expectedResponse = + SearchProfilesResponse.newBuilder() + .setEstimatedTotalSize(estimatedTotalSize) + .setNextPageToken(nextPageToken) + .setResultSetId(resultSetId) + .addAllSummarizedProfiles(summarizedProfiles) + .build(); + mockProfileService.addResponse(expectedResponse); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchProfilesRequest request = + SearchProfilesRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); + + SearchProfilesPagedResponse pagedListResponse = client.searchProfiles(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSummarizedProfilesList().get(0), resources.get(0)); + + List actualRequests = mockProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchProfilesRequest actualRequest = (SearchProfilesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(requestMetadata, actualRequest.getRequestMetadata()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void searchProfilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockProfileService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchProfilesRequest request = + SearchProfilesRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); + + client.searchProfiles(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void listProfilesTest() { @@ -310,41 +413,4 @@ public void updateProfileExceptionTest() throws Exception { // Expected exception } } - - @Test - @SuppressWarnings("all") - public void deleteProfileTest() { - Empty expectedResponse = Empty.newBuilder().build(); - mockProfileService.addResponse(expectedResponse); - - ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]"); - - client.deleteProfile(name); - - List actualRequests = mockProfileService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProfileRequest actualRequest = (DeleteProfileRequest) actualRequests.get(0); - - Assert.assertEquals(name, ProfileName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteProfileExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockProfileService.addException(exception); - - try { - ProfileName name = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]"); - - client.deleteProfile(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } } diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/TenantServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/TenantServiceClientTest.java index 25d0f8d2..ae8c0db1 100644 --- a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/TenantServiceClientTest.java +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/TenantServiceClientTest.java @@ -98,6 +98,43 @@ public void tearDown() throws Exception { client.close(); } + @Test + @SuppressWarnings("all") + public void deleteTenantTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockTenantService.addResponse(expectedResponse); + + TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); + + client.deleteTenant(name); + + List actualRequests = mockTenantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTenantRequest actualRequest = (DeleteTenantRequest) actualRequests.get(0); + + Assert.assertEquals(name, TenantName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteTenantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockTenantService.addException(exception); + + try { + TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); + + client.deleteTenant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void createTenantTest() { @@ -224,43 +261,6 @@ public void updateTenantExceptionTest() throws Exception { } } - @Test - @SuppressWarnings("all") - public void deleteTenantTest() { - Empty expectedResponse = Empty.newBuilder().build(); - mockTenantService.addResponse(expectedResponse); - - TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); - - client.deleteTenant(name); - - List actualRequests = mockTenantService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteTenantRequest actualRequest = (DeleteTenantRequest) actualRequests.get(0); - - Assert.assertEquals(name, TenantName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteTenantExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockTenantService.addException(exception); - - try { - TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); - - client.deleteTenant(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - @Test @SuppressWarnings("all") public void listTenantsTest() { diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/it/ITSystemTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/it/ITSystemTest.java index b4b3da14..002bd5f8 100644 --- a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/it/ITSystemTest.java +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/it/ITSystemTest.java @@ -22,7 +22,6 @@ import com.google.cloud.talent.v4beta1.Company; import com.google.cloud.talent.v4beta1.CompanyName; import com.google.cloud.talent.v4beta1.CompanyServiceClient; -import com.google.cloud.talent.v4beta1.CompanyWithTenantName; import com.google.cloud.talent.v4beta1.CompleteQueryRequest; import com.google.cloud.talent.v4beta1.CompleteQueryResponse; import com.google.cloud.talent.v4beta1.CompletionClient; @@ -41,14 +40,12 @@ import com.google.cloud.talent.v4beta1.JobEvent; import com.google.cloud.talent.v4beta1.JobName; import com.google.cloud.talent.v4beta1.JobServiceClient; -import com.google.cloud.talent.v4beta1.JobWithTenantName; import com.google.cloud.talent.v4beta1.ListCompaniesRequest; import com.google.cloud.talent.v4beta1.ListJobsRequest; import com.google.cloud.talent.v4beta1.ListTenantsRequest; import com.google.cloud.talent.v4beta1.ProjectName; import com.google.cloud.talent.v4beta1.Tenant; import com.google.cloud.talent.v4beta1.TenantName; -import com.google.cloud.talent.v4beta1.TenantOrProjectName; import com.google.cloud.talent.v4beta1.TenantServiceClient; import com.google.cloud.talent.v4beta1.UpdateCompanyRequest; import com.google.cloud.talent.v4beta1.UpdateJobRequest; @@ -86,7 +83,6 @@ public class ITSystemTest { + "tenant-test-" + UUID.randomUUID().toString().substring(0, 8); private static final ProjectName PROJECT_NAME = ProjectName.of(PROJECT_ID); - private static TenantOrProjectName projectName; private static final String DISPLAY_NAME = "display-name-test-" + UUID.randomUUID().toString().substring(0, 8); private static final String EXTERNAL_ID = String.valueOf(Instant.now().getEpochSecond()); @@ -116,17 +112,16 @@ public static void beforeTest() throws IOException { /* create company */ companyServiceClient = CompanyServiceClient.create(); - projectName = TenantName.of(PROJECT_ID, tenantId); Company createCompany = Company.newBuilder().setDisplayName(DISPLAY_NAME).setExternalId(EXTERNAL_ID).build(); CreateCompanyRequest companyRequest = CreateCompanyRequest.newBuilder() - .setParent(projectName.toString()) + .setParent(tenantName.toString()) .setCompany(createCompany) .build(); company = companyServiceClient.createCompany(companyRequest); companyId = getId(company.getName()); - companyName = CompanyWithTenantName.of(PROJECT_ID, tenantId, companyId); + companyName = CompanyName.ofProjectTenantCompanyName(PROJECT_ID, tenantId, companyId); /* create job */ jobServiceClient = JobServiceClient.create(); @@ -143,10 +138,10 @@ public static void beforeTest() throws IOException { .setLanguageCode(LANGUAGE_CODE) .build(); CreateJobRequest jobRequest = - CreateJobRequest.newBuilder().setParent(projectName.toString()).setJob(createJob).build(); + CreateJobRequest.newBuilder().setParent(tenantName.toString()).setJob(createJob).build(); job = jobServiceClient.createJob(jobRequest); jobId = getId(job.getName()); - jobName = JobWithTenantName.of(PROJECT_ID, tenantId, jobId); + jobName = JobName.ofProjectTenantJobName(PROJECT_ID, tenantId, jobId); /*create event */ eventServiceClient = EventServiceClient.create(); @@ -222,7 +217,7 @@ public void getCompanyTest() { @Test public void listCompaniesTest() { ListCompaniesRequest request = - ListCompaniesRequest.newBuilder().setParent(projectName.toString()).build(); + ListCompaniesRequest.newBuilder().setParent(tenantName.toString()).build(); for (Company actual : companyServiceClient.listCompanies(request).iterateAll()) { if (company.getName().equals(actual.getName())) { assertEquals(company.getName(), actual.getName()); @@ -262,7 +257,7 @@ public void getJobTest() { public void listJobsTest() { String filter = "companyName =" + "\"" + company.getName() + "\""; ListJobsRequest request = - ListJobsRequest.newBuilder().setParent(projectName.toString()).setFilter(filter).build(); + ListJobsRequest.newBuilder().setParent(tenantName.toString()).setFilter(filter).build(); for (Job actual : jobServiceClient.listJobs(request).iterateAll()) { if (job.getName().equals(actual.getName())) { assertEquals(job.getName(), actual.getName()); @@ -315,7 +310,7 @@ public void createEventTest() { .build(); CreateClientEventRequest request = CreateClientEventRequest.newBuilder() - .setParent(projectName.toString()) + .setParent(tenantName.toString()) .setClientEvent(clientEvent) .build(); ClientEvent actual = eventServiceClient.createClientEvent(request); @@ -329,7 +324,7 @@ public void createEventTest() { public void completeQueryTest() { CompleteQueryRequest request = CompleteQueryRequest.newBuilder() - .setParent(projectName.toString()) + .setParent(tenantName.toString()) .setQuery("Soft") .setPageSize(5) .addAllLanguageCodes(Arrays.asList(LANGUAGE_CODE)) diff --git a/grpc-google-cloud-talent-v4beta1/clirr-ignored-differences.xml b/grpc-google-cloud-talent-v4beta1/clirr-ignored-differences.xml new file mode 100644 index 00000000..59c4d27c --- /dev/null +++ b/grpc-google-cloud-talent-v4beta1/clirr-ignored-differences.xml @@ -0,0 +1,10 @@ + + + + + + 6001 + com/google/cloud/talent/v4beta1/*Grpc + METHOD_* + + diff --git a/grpc-google-cloud-talent-v4beta1/pom.xml b/grpc-google-cloud-talent-v4beta1/pom.xml index c59b1814..77b83d5c 100644 --- a/grpc-google-cloud-talent-v4beta1/pom.xml +++ b/grpc-google-cloud-talent-v4beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-talent-v4beta1 - 0.35.2-beta + 0.36.0 grpc-google-cloud-talent-v4beta1 GRPC library for grpc-google-cloud-talent-v4beta1 com.google.cloud google-cloud-talent-parent - 0.35.2-beta + 0.36.0 diff --git a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceGrpc.java b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceGrpc.java index d5bf6468..4b340f29 100644 --- a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceGrpc.java +++ b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceGrpc.java @@ -31,7 +31,7 @@ *
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/cloud/talent/v4beta1/application_service.proto") public final class ApplicationServiceGrpc { @@ -40,30 +40,20 @@ private ApplicationServiceGrpc() {} public static final String SERVICE_NAME = "google.cloud.talent.v4beta1.ApplicationService"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateApplicationMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateApplicationRequest, - com.google.cloud.talent.v4beta1.Application> - METHOD_CREATE_APPLICATION = getCreateApplicationMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateApplicationRequest, com.google.cloud.talent.v4beta1.Application> getCreateApplicationMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateApplication", + requestType = com.google.cloud.talent.v4beta1.CreateApplicationRequest.class, + responseType = com.google.cloud.talent.v4beta1.Application.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateApplicationRequest, com.google.cloud.talent.v4beta1.Application> getCreateApplicationMethod() { - return getCreateApplicationMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateApplicationRequest, - com.google.cloud.talent.v4beta1.Application> - getCreateApplicationMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateApplicationRequest, com.google.cloud.talent.v4beta1.Application> @@ -79,10 +69,7 @@ private ApplicationServiceGrpc() {} com.google.cloud.talent.v4beta1.Application> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ApplicationService", - "CreateApplication")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApplication")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -100,30 +87,20 @@ private ApplicationServiceGrpc() {} return getCreateApplicationMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetApplicationMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetApplicationRequest, - com.google.cloud.talent.v4beta1.Application> - METHOD_GET_APPLICATION = getGetApplicationMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetApplicationRequest, com.google.cloud.talent.v4beta1.Application> getGetApplicationMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetApplication", + requestType = com.google.cloud.talent.v4beta1.GetApplicationRequest.class, + responseType = com.google.cloud.talent.v4beta1.Application.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetApplicationRequest, com.google.cloud.talent.v4beta1.Application> getGetApplicationMethod() { - return getGetApplicationMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetApplicationRequest, - com.google.cloud.talent.v4beta1.Application> - getGetApplicationMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetApplicationRequest, com.google.cloud.talent.v4beta1.Application> @@ -138,9 +115,7 @@ private ApplicationServiceGrpc() {} com.google.cloud.talent.v4beta1.Application> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ApplicationService", "GetApplication")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApplication")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -158,30 +133,20 @@ private ApplicationServiceGrpc() {} return getGetApplicationMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateApplicationMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateApplicationRequest, - com.google.cloud.talent.v4beta1.Application> - METHOD_UPDATE_APPLICATION = getUpdateApplicationMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateApplicationRequest, com.google.cloud.talent.v4beta1.Application> getUpdateApplicationMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateApplication", + requestType = com.google.cloud.talent.v4beta1.UpdateApplicationRequest.class, + responseType = com.google.cloud.talent.v4beta1.Application.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateApplicationRequest, com.google.cloud.talent.v4beta1.Application> getUpdateApplicationMethod() { - return getUpdateApplicationMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateApplicationRequest, - com.google.cloud.talent.v4beta1.Application> - getUpdateApplicationMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateApplicationRequest, com.google.cloud.talent.v4beta1.Application> @@ -197,10 +162,7 @@ private ApplicationServiceGrpc() {} com.google.cloud.talent.v4beta1.Application> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ApplicationService", - "UpdateApplication")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApplication")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -218,26 +180,18 @@ private ApplicationServiceGrpc() {} return getUpdateApplicationMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteApplicationMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteApplicationRequest, com.google.protobuf.Empty> - METHOD_DELETE_APPLICATION = getDeleteApplicationMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteApplicationRequest, com.google.protobuf.Empty> getDeleteApplicationMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteApplication", + requestType = com.google.cloud.talent.v4beta1.DeleteApplicationRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteApplicationRequest, com.google.protobuf.Empty> getDeleteApplicationMethod() { - return getDeleteApplicationMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteApplicationRequest, com.google.protobuf.Empty> - getDeleteApplicationMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteApplicationRequest, com.google.protobuf.Empty> getDeleteApplicationMethod; @@ -252,10 +206,7 @@ private ApplicationServiceGrpc() {} com.google.protobuf.Empty> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ApplicationService", - "DeleteApplication")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApplication")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -273,30 +224,20 @@ private ApplicationServiceGrpc() {} return getDeleteApplicationMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListApplicationsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListApplicationsRequest, - com.google.cloud.talent.v4beta1.ListApplicationsResponse> - METHOD_LIST_APPLICATIONS = getListApplicationsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListApplicationsRequest, com.google.cloud.talent.v4beta1.ListApplicationsResponse> getListApplicationsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListApplications", + requestType = com.google.cloud.talent.v4beta1.ListApplicationsRequest.class, + responseType = com.google.cloud.talent.v4beta1.ListApplicationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListApplicationsRequest, com.google.cloud.talent.v4beta1.ListApplicationsResponse> getListApplicationsMethod() { - return getListApplicationsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListApplicationsRequest, - com.google.cloud.talent.v4beta1.ListApplicationsResponse> - getListApplicationsMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListApplicationsRequest, com.google.cloud.talent.v4beta1.ListApplicationsResponse> @@ -312,9 +253,7 @@ private ApplicationServiceGrpc() {} com.google.cloud.talent.v4beta1.ListApplicationsResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ApplicationService", "ListApplications")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApplications")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -335,19 +274,43 @@ private ApplicationServiceGrpc() {} /** Creates a new async stub that supports all call types for the service */ public static ApplicationServiceStub newStub(io.grpc.Channel channel) { - return new ApplicationServiceStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ApplicationServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ApplicationServiceStub(channel, callOptions); + } + }; + return ApplicationServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static ApplicationServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - return new ApplicationServiceBlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ApplicationServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ApplicationServiceBlockingStub(channel, callOptions); + } + }; + return ApplicationServiceBlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static ApplicationServiceFutureStub newFutureStub(io.grpc.Channel channel) { - return new ApplicationServiceFutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ApplicationServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ApplicationServiceFutureStub(channel, callOptions); + } + }; + return ApplicationServiceFutureStub.newStub(factory, channel); } /** @@ -370,7 +333,7 @@ public abstract static class ApplicationServiceImplBase implements io.grpc.Binda public void createApplication( com.google.cloud.talent.v4beta1.CreateApplicationRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateApplicationMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCreateApplicationMethod(), responseObserver); } /** @@ -383,7 +346,7 @@ public void createApplication( public void getApplication( com.google.cloud.talent.v4beta1.GetApplicationRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetApplicationMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getGetApplicationMethod(), responseObserver); } /** @@ -396,7 +359,7 @@ public void getApplication( public void updateApplication( com.google.cloud.talent.v4beta1.UpdateApplicationRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateApplicationMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getUpdateApplicationMethod(), responseObserver); } /** @@ -409,7 +372,7 @@ public void updateApplication( public void deleteApplication( com.google.cloud.talent.v4beta1.DeleteApplicationRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteApplicationMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getDeleteApplicationMethod(), responseObserver); } /** @@ -423,40 +386,40 @@ public void listApplications( com.google.cloud.talent.v4beta1.ListApplicationsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListApplicationsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListApplicationsMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getCreateApplicationMethodHelper(), + getCreateApplicationMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.CreateApplicationRequest, com.google.cloud.talent.v4beta1.Application>( this, METHODID_CREATE_APPLICATION))) .addMethod( - getGetApplicationMethodHelper(), + getGetApplicationMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.GetApplicationRequest, com.google.cloud.talent.v4beta1.Application>(this, METHODID_GET_APPLICATION))) .addMethod( - getUpdateApplicationMethodHelper(), + getUpdateApplicationMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.UpdateApplicationRequest, com.google.cloud.talent.v4beta1.Application>( this, METHODID_UPDATE_APPLICATION))) .addMethod( - getDeleteApplicationMethodHelper(), + getDeleteApplicationMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.DeleteApplicationRequest, com.google.protobuf.Empty>(this, METHODID_DELETE_APPLICATION))) .addMethod( - getListApplicationsMethodHelper(), + getListApplicationsMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.ListApplicationsRequest, @@ -475,11 +438,7 @@ public final io.grpc.ServerServiceDefinition bindService() { *
*/ public static final class ApplicationServiceStub - extends io.grpc.stub.AbstractStub { - private ApplicationServiceStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractAsyncStub { private ApplicationServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -501,7 +460,7 @@ public void createApplication( com.google.cloud.talent.v4beta1.CreateApplicationRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCreateApplicationMethodHelper(), getCallOptions()), + getChannel().newCall(getCreateApplicationMethod(), getCallOptions()), request, responseObserver); } @@ -517,7 +476,7 @@ public void getApplication( com.google.cloud.talent.v4beta1.GetApplicationRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetApplicationMethodHelper(), getCallOptions()), + getChannel().newCall(getGetApplicationMethod(), getCallOptions()), request, responseObserver); } @@ -533,7 +492,7 @@ public void updateApplication( com.google.cloud.talent.v4beta1.UpdateApplicationRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUpdateApplicationMethodHelper(), getCallOptions()), + getChannel().newCall(getUpdateApplicationMethod(), getCallOptions()), request, responseObserver); } @@ -549,7 +508,7 @@ public void deleteApplication( com.google.cloud.talent.v4beta1.DeleteApplicationRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getDeleteApplicationMethodHelper(), getCallOptions()), + getChannel().newCall(getDeleteApplicationMethod(), getCallOptions()), request, responseObserver); } @@ -566,7 +525,7 @@ public void listApplications( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListApplicationsMethodHelper(), getCallOptions()), + getChannel().newCall(getListApplicationsMethod(), getCallOptions()), request, responseObserver); } @@ -581,11 +540,7 @@ public void listApplications( *
*/ public static final class ApplicationServiceBlockingStub - extends io.grpc.stub.AbstractStub { - private ApplicationServiceBlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private ApplicationServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -607,7 +562,7 @@ protected ApplicationServiceBlockingStub build( public com.google.cloud.talent.v4beta1.Application createApplication( com.google.cloud.talent.v4beta1.CreateApplicationRequest request) { return blockingUnaryCall( - getChannel(), getCreateApplicationMethodHelper(), getCallOptions(), request); + getChannel(), getCreateApplicationMethod(), getCallOptions(), request); } /** @@ -619,8 +574,7 @@ public com.google.cloud.talent.v4beta1.Application createApplication( */ public com.google.cloud.talent.v4beta1.Application getApplication( com.google.cloud.talent.v4beta1.GetApplicationRequest request) { - return blockingUnaryCall( - getChannel(), getGetApplicationMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getGetApplicationMethod(), getCallOptions(), request); } /** @@ -633,7 +587,7 @@ public com.google.cloud.talent.v4beta1.Application getApplication( public com.google.cloud.talent.v4beta1.Application updateApplication( com.google.cloud.talent.v4beta1.UpdateApplicationRequest request) { return blockingUnaryCall( - getChannel(), getUpdateApplicationMethodHelper(), getCallOptions(), request); + getChannel(), getUpdateApplicationMethod(), getCallOptions(), request); } /** @@ -646,7 +600,7 @@ public com.google.cloud.talent.v4beta1.Application updateApplication( public com.google.protobuf.Empty deleteApplication( com.google.cloud.talent.v4beta1.DeleteApplicationRequest request) { return blockingUnaryCall( - getChannel(), getDeleteApplicationMethodHelper(), getCallOptions(), request); + getChannel(), getDeleteApplicationMethod(), getCallOptions(), request); } /** @@ -659,7 +613,7 @@ public com.google.protobuf.Empty deleteApplication( public com.google.cloud.talent.v4beta1.ListApplicationsResponse listApplications( com.google.cloud.talent.v4beta1.ListApplicationsRequest request) { return blockingUnaryCall( - getChannel(), getListApplicationsMethodHelper(), getCallOptions(), request); + getChannel(), getListApplicationsMethod(), getCallOptions(), request); } } @@ -672,11 +626,7 @@ public com.google.cloud.talent.v4beta1.ListApplicationsResponse listApplications *
*/ public static final class ApplicationServiceFutureStub - extends io.grpc.stub.AbstractStub { - private ApplicationServiceFutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private ApplicationServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -698,7 +648,7 @@ protected ApplicationServiceFutureStub build( com.google.cloud.talent.v4beta1.Application> createApplication(com.google.cloud.talent.v4beta1.CreateApplicationRequest request) { return futureUnaryCall( - getChannel().newCall(getCreateApplicationMethodHelper(), getCallOptions()), request); + getChannel().newCall(getCreateApplicationMethod(), getCallOptions()), request); } /** @@ -712,7 +662,7 @@ protected ApplicationServiceFutureStub build( com.google.cloud.talent.v4beta1.Application> getApplication(com.google.cloud.talent.v4beta1.GetApplicationRequest request) { return futureUnaryCall( - getChannel().newCall(getGetApplicationMethodHelper(), getCallOptions()), request); + getChannel().newCall(getGetApplicationMethod(), getCallOptions()), request); } /** @@ -726,7 +676,7 @@ protected ApplicationServiceFutureStub build( com.google.cloud.talent.v4beta1.Application> updateApplication(com.google.cloud.talent.v4beta1.UpdateApplicationRequest request) { return futureUnaryCall( - getChannel().newCall(getUpdateApplicationMethodHelper(), getCallOptions()), request); + getChannel().newCall(getUpdateApplicationMethod(), getCallOptions()), request); } /** @@ -739,7 +689,7 @@ protected ApplicationServiceFutureStub build( public com.google.common.util.concurrent.ListenableFuture deleteApplication(com.google.cloud.talent.v4beta1.DeleteApplicationRequest request) { return futureUnaryCall( - getChannel().newCall(getDeleteApplicationMethodHelper(), getCallOptions()), request); + getChannel().newCall(getDeleteApplicationMethod(), getCallOptions()), request); } /** @@ -753,7 +703,7 @@ protected ApplicationServiceFutureStub build( com.google.cloud.talent.v4beta1.ListApplicationsResponse> listApplications(com.google.cloud.talent.v4beta1.ListApplicationsRequest request) { return futureUnaryCall( - getChannel().newCall(getListApplicationsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getListApplicationsMethod(), getCallOptions()), request); } } @@ -874,11 +824,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ApplicationServiceFileDescriptorSupplier()) - .addMethod(getCreateApplicationMethodHelper()) - .addMethod(getGetApplicationMethodHelper()) - .addMethod(getUpdateApplicationMethodHelper()) - .addMethod(getDeleteApplicationMethodHelper()) - .addMethod(getListApplicationsMethodHelper()) + .addMethod(getCreateApplicationMethod()) + .addMethod(getGetApplicationMethod()) + .addMethod(getUpdateApplicationMethod()) + .addMethod(getDeleteApplicationMethod()) + .addMethod(getListApplicationsMethod()) .build(); } } diff --git a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceGrpc.java b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceGrpc.java index df071cfb..8fb623c6 100644 --- a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceGrpc.java +++ b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceGrpc.java @@ -30,7 +30,7 @@ *
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/cloud/talent/v4beta1/company_service.proto") public final class CompanyServiceGrpc { @@ -39,30 +39,20 @@ private CompanyServiceGrpc() {} public static final String SERVICE_NAME = "google.cloud.talent.v4beta1.CompanyService"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateCompanyMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateCompanyRequest, - com.google.cloud.talent.v4beta1.Company> - METHOD_CREATE_COMPANY = getCreateCompanyMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateCompanyRequest, com.google.cloud.talent.v4beta1.Company> getCreateCompanyMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCompany", + requestType = com.google.cloud.talent.v4beta1.CreateCompanyRequest.class, + responseType = com.google.cloud.talent.v4beta1.Company.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateCompanyRequest, com.google.cloud.talent.v4beta1.Company> getCreateCompanyMethod() { - return getCreateCompanyMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateCompanyRequest, - com.google.cloud.talent.v4beta1.Company> - getCreateCompanyMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateCompanyRequest, com.google.cloud.talent.v4beta1.Company> @@ -77,9 +67,7 @@ private CompanyServiceGrpc() {} com.google.cloud.talent.v4beta1.Company> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.CompanyService", "CreateCompany")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCompany")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -97,30 +85,20 @@ private CompanyServiceGrpc() {} return getCreateCompanyMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetCompanyMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetCompanyRequest, - com.google.cloud.talent.v4beta1.Company> - METHOD_GET_COMPANY = getGetCompanyMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetCompanyRequest, com.google.cloud.talent.v4beta1.Company> getGetCompanyMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCompany", + requestType = com.google.cloud.talent.v4beta1.GetCompanyRequest.class, + responseType = com.google.cloud.talent.v4beta1.Company.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetCompanyRequest, com.google.cloud.talent.v4beta1.Company> getGetCompanyMethod() { - return getGetCompanyMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetCompanyRequest, - com.google.cloud.talent.v4beta1.Company> - getGetCompanyMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetCompanyRequest, com.google.cloud.talent.v4beta1.Company> @@ -135,9 +113,7 @@ private CompanyServiceGrpc() {} com.google.cloud.talent.v4beta1.Company> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.CompanyService", "GetCompany")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCompany")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -154,30 +130,20 @@ private CompanyServiceGrpc() {} return getGetCompanyMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateCompanyMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateCompanyRequest, - com.google.cloud.talent.v4beta1.Company> - METHOD_UPDATE_COMPANY = getUpdateCompanyMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateCompanyRequest, com.google.cloud.talent.v4beta1.Company> getUpdateCompanyMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCompany", + requestType = com.google.cloud.talent.v4beta1.UpdateCompanyRequest.class, + responseType = com.google.cloud.talent.v4beta1.Company.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateCompanyRequest, com.google.cloud.talent.v4beta1.Company> getUpdateCompanyMethod() { - return getUpdateCompanyMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateCompanyRequest, - com.google.cloud.talent.v4beta1.Company> - getUpdateCompanyMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateCompanyRequest, com.google.cloud.talent.v4beta1.Company> @@ -192,9 +158,7 @@ private CompanyServiceGrpc() {} com.google.cloud.talent.v4beta1.Company> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.CompanyService", "UpdateCompany")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCompany")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -212,26 +176,18 @@ private CompanyServiceGrpc() {} return getUpdateCompanyMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteCompanyMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteCompanyRequest, com.google.protobuf.Empty> - METHOD_DELETE_COMPANY = getDeleteCompanyMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteCompanyRequest, com.google.protobuf.Empty> getDeleteCompanyMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCompany", + requestType = com.google.cloud.talent.v4beta1.DeleteCompanyRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteCompanyRequest, com.google.protobuf.Empty> getDeleteCompanyMethod() { - return getDeleteCompanyMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteCompanyRequest, com.google.protobuf.Empty> - getDeleteCompanyMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteCompanyRequest, com.google.protobuf.Empty> getDeleteCompanyMethod; @@ -245,9 +201,7 @@ private CompanyServiceGrpc() {} com.google.protobuf.Empty> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.CompanyService", "DeleteCompany")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCompany")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -265,30 +219,20 @@ private CompanyServiceGrpc() {} return getDeleteCompanyMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListCompaniesMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListCompaniesRequest, - com.google.cloud.talent.v4beta1.ListCompaniesResponse> - METHOD_LIST_COMPANIES = getListCompaniesMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListCompaniesRequest, com.google.cloud.talent.v4beta1.ListCompaniesResponse> getListCompaniesMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCompanies", + requestType = com.google.cloud.talent.v4beta1.ListCompaniesRequest.class, + responseType = com.google.cloud.talent.v4beta1.ListCompaniesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListCompaniesRequest, com.google.cloud.talent.v4beta1.ListCompaniesResponse> getListCompaniesMethod() { - return getListCompaniesMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListCompaniesRequest, - com.google.cloud.talent.v4beta1.ListCompaniesResponse> - getListCompaniesMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListCompaniesRequest, com.google.cloud.talent.v4beta1.ListCompaniesResponse> @@ -303,9 +247,7 @@ private CompanyServiceGrpc() {} com.google.cloud.talent.v4beta1.ListCompaniesResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.CompanyService", "ListCompanies")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCompanies")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -326,19 +268,43 @@ private CompanyServiceGrpc() {} /** Creates a new async stub that supports all call types for the service */ public static CompanyServiceStub newStub(io.grpc.Channel channel) { - return new CompanyServiceStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompanyServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompanyServiceStub(channel, callOptions); + } + }; + return CompanyServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static CompanyServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - return new CompanyServiceBlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompanyServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompanyServiceBlockingStub(channel, callOptions); + } + }; + return CompanyServiceBlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static CompanyServiceFutureStub newFutureStub(io.grpc.Channel channel) { - return new CompanyServiceFutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompanyServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompanyServiceFutureStub(channel, callOptions); + } + }; + return CompanyServiceFutureStub.newStub(factory, channel); } /** @@ -360,7 +326,7 @@ public abstract static class CompanyServiceImplBase implements io.grpc.BindableS public void createCompany( com.google.cloud.talent.v4beta1.CreateCompanyRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateCompanyMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCreateCompanyMethod(), responseObserver); } /** @@ -373,7 +339,7 @@ public void createCompany( public void getCompany( com.google.cloud.talent.v4beta1.GetCompanyRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetCompanyMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getGetCompanyMethod(), responseObserver); } /** @@ -386,7 +352,7 @@ public void getCompany( public void updateCompany( com.google.cloud.talent.v4beta1.UpdateCompanyRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateCompanyMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getUpdateCompanyMethod(), responseObserver); } /** @@ -400,7 +366,7 @@ public void updateCompany( public void deleteCompany( com.google.cloud.talent.v4beta1.DeleteCompanyRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteCompanyMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getDeleteCompanyMethod(), responseObserver); } /** @@ -414,38 +380,38 @@ public void listCompanies( com.google.cloud.talent.v4beta1.ListCompaniesRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListCompaniesMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListCompaniesMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getCreateCompanyMethodHelper(), + getCreateCompanyMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.CreateCompanyRequest, com.google.cloud.talent.v4beta1.Company>(this, METHODID_CREATE_COMPANY))) .addMethod( - getGetCompanyMethodHelper(), + getGetCompanyMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.GetCompanyRequest, com.google.cloud.talent.v4beta1.Company>(this, METHODID_GET_COMPANY))) .addMethod( - getUpdateCompanyMethodHelper(), + getUpdateCompanyMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.UpdateCompanyRequest, com.google.cloud.talent.v4beta1.Company>(this, METHODID_UPDATE_COMPANY))) .addMethod( - getDeleteCompanyMethodHelper(), + getDeleteCompanyMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.DeleteCompanyRequest, com.google.protobuf.Empty>(this, METHODID_DELETE_COMPANY))) .addMethod( - getListCompaniesMethodHelper(), + getListCompaniesMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.ListCompaniesRequest, @@ -463,11 +429,7 @@ public final io.grpc.ServerServiceDefinition bindService() { *
*/ public static final class CompanyServiceStub - extends io.grpc.stub.AbstractStub { - private CompanyServiceStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractAsyncStub { private CompanyServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -488,7 +450,7 @@ public void createCompany( com.google.cloud.talent.v4beta1.CreateCompanyRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCreateCompanyMethodHelper(), getCallOptions()), + getChannel().newCall(getCreateCompanyMethod(), getCallOptions()), request, responseObserver); } @@ -504,9 +466,7 @@ public void getCompany( com.google.cloud.talent.v4beta1.GetCompanyRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetCompanyMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetCompanyMethod(), getCallOptions()), request, responseObserver); } /** @@ -520,7 +480,7 @@ public void updateCompany( com.google.cloud.talent.v4beta1.UpdateCompanyRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUpdateCompanyMethodHelper(), getCallOptions()), + getChannel().newCall(getUpdateCompanyMethod(), getCallOptions()), request, responseObserver); } @@ -537,7 +497,7 @@ public void deleteCompany( com.google.cloud.talent.v4beta1.DeleteCompanyRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getDeleteCompanyMethodHelper(), getCallOptions()), + getChannel().newCall(getDeleteCompanyMethod(), getCallOptions()), request, responseObserver); } @@ -554,7 +514,7 @@ public void listCompanies( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListCompaniesMethodHelper(), getCallOptions()), + getChannel().newCall(getListCompaniesMethod(), getCallOptions()), request, responseObserver); } @@ -568,11 +528,7 @@ public void listCompanies( *
*/ public static final class CompanyServiceBlockingStub - extends io.grpc.stub.AbstractStub { - private CompanyServiceBlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private CompanyServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -592,8 +548,7 @@ protected CompanyServiceBlockingStub build( */ public com.google.cloud.talent.v4beta1.Company createCompany( com.google.cloud.talent.v4beta1.CreateCompanyRequest request) { - return blockingUnaryCall( - getChannel(), getCreateCompanyMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getCreateCompanyMethod(), getCallOptions(), request); } /** @@ -605,8 +560,7 @@ public com.google.cloud.talent.v4beta1.Company createCompany( */ public com.google.cloud.talent.v4beta1.Company getCompany( com.google.cloud.talent.v4beta1.GetCompanyRequest request) { - return blockingUnaryCall( - getChannel(), getGetCompanyMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getGetCompanyMethod(), getCallOptions(), request); } /** @@ -618,8 +572,7 @@ public com.google.cloud.talent.v4beta1.Company getCompany( */ public com.google.cloud.talent.v4beta1.Company updateCompany( com.google.cloud.talent.v4beta1.UpdateCompanyRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateCompanyMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getUpdateCompanyMethod(), getCallOptions(), request); } /** @@ -632,8 +585,7 @@ public com.google.cloud.talent.v4beta1.Company updateCompany( */ public com.google.protobuf.Empty deleteCompany( com.google.cloud.talent.v4beta1.DeleteCompanyRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteCompanyMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getDeleteCompanyMethod(), getCallOptions(), request); } /** @@ -645,8 +597,7 @@ public com.google.protobuf.Empty deleteCompany( */ public com.google.cloud.talent.v4beta1.ListCompaniesResponse listCompanies( com.google.cloud.talent.v4beta1.ListCompaniesRequest request) { - return blockingUnaryCall( - getChannel(), getListCompaniesMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getListCompaniesMethod(), getCallOptions(), request); } } @@ -658,11 +609,7 @@ public com.google.cloud.talent.v4beta1.ListCompaniesResponse listCompanies( *
*/ public static final class CompanyServiceFutureStub - extends io.grpc.stub.AbstractStub { - private CompanyServiceFutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private CompanyServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -684,7 +631,7 @@ protected CompanyServiceFutureStub build( com.google.cloud.talent.v4beta1.Company> createCompany(com.google.cloud.talent.v4beta1.CreateCompanyRequest request) { return futureUnaryCall( - getChannel().newCall(getCreateCompanyMethodHelper(), getCallOptions()), request); + getChannel().newCall(getCreateCompanyMethod(), getCallOptions()), request); } /** @@ -698,7 +645,7 @@ protected CompanyServiceFutureStub build( com.google.cloud.talent.v4beta1.Company> getCompany(com.google.cloud.talent.v4beta1.GetCompanyRequest request) { return futureUnaryCall( - getChannel().newCall(getGetCompanyMethodHelper(), getCallOptions()), request); + getChannel().newCall(getGetCompanyMethod(), getCallOptions()), request); } /** @@ -712,7 +659,7 @@ protected CompanyServiceFutureStub build( com.google.cloud.talent.v4beta1.Company> updateCompany(com.google.cloud.talent.v4beta1.UpdateCompanyRequest request) { return futureUnaryCall( - getChannel().newCall(getUpdateCompanyMethodHelper(), getCallOptions()), request); + getChannel().newCall(getUpdateCompanyMethod(), getCallOptions()), request); } /** @@ -726,7 +673,7 @@ protected CompanyServiceFutureStub build( public com.google.common.util.concurrent.ListenableFuture deleteCompany(com.google.cloud.talent.v4beta1.DeleteCompanyRequest request) { return futureUnaryCall( - getChannel().newCall(getDeleteCompanyMethodHelper(), getCallOptions()), request); + getChannel().newCall(getDeleteCompanyMethod(), getCallOptions()), request); } /** @@ -740,7 +687,7 @@ protected CompanyServiceFutureStub build( com.google.cloud.talent.v4beta1.ListCompaniesResponse> listCompanies(com.google.cloud.talent.v4beta1.ListCompaniesRequest request) { return futureUnaryCall( - getChannel().newCall(getListCompaniesMethodHelper(), getCallOptions()), request); + getChannel().newCall(getListCompaniesMethod(), getCallOptions()), request); } } @@ -860,11 +807,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new CompanyServiceFileDescriptorSupplier()) - .addMethod(getCreateCompanyMethodHelper()) - .addMethod(getGetCompanyMethodHelper()) - .addMethod(getUpdateCompanyMethodHelper()) - .addMethod(getDeleteCompanyMethodHelper()) - .addMethod(getListCompaniesMethodHelper()) + .addMethod(getCreateCompanyMethod()) + .addMethod(getGetCompanyMethod()) + .addMethod(getUpdateCompanyMethod()) + .addMethod(getDeleteCompanyMethod()) + .addMethod(getListCompaniesMethod()) .build(); } } diff --git a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompletionGrpc.java b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompletionGrpc.java index ff005563..52888cb1 100644 --- a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompletionGrpc.java +++ b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompletionGrpc.java @@ -30,7 +30,7 @@ *
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/cloud/talent/v4beta1/completion_service.proto") public final class CompletionGrpc { @@ -39,30 +39,20 @@ private CompletionGrpc() {} public static final String SERVICE_NAME = "google.cloud.talent.v4beta1.Completion"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCompleteQueryMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CompleteQueryRequest, - com.google.cloud.talent.v4beta1.CompleteQueryResponse> - METHOD_COMPLETE_QUERY = getCompleteQueryMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CompleteQueryRequest, com.google.cloud.talent.v4beta1.CompleteQueryResponse> getCompleteQueryMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CompleteQuery", + requestType = com.google.cloud.talent.v4beta1.CompleteQueryRequest.class, + responseType = com.google.cloud.talent.v4beta1.CompleteQueryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CompleteQueryRequest, com.google.cloud.talent.v4beta1.CompleteQueryResponse> getCompleteQueryMethod() { - return getCompleteQueryMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CompleteQueryRequest, - com.google.cloud.talent.v4beta1.CompleteQueryResponse> - getCompleteQueryMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CompleteQueryRequest, com.google.cloud.talent.v4beta1.CompleteQueryResponse> @@ -77,9 +67,7 @@ private CompletionGrpc() {} com.google.cloud.talent.v4beta1.CompleteQueryResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.Completion", "CompleteQuery")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CompleteQuery")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -99,19 +87,42 @@ private CompletionGrpc() {} /** Creates a new async stub that supports all call types for the service */ public static CompletionStub newStub(io.grpc.Channel channel) { - return new CompletionStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompletionStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionStub(channel, callOptions); + } + }; + return CompletionStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static CompletionBlockingStub newBlockingStub(io.grpc.Channel channel) { - return new CompletionBlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompletionBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionBlockingStub(channel, callOptions); + } + }; + return CompletionBlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static CompletionFutureStub newFutureStub(io.grpc.Channel channel) { - return new CompletionFutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompletionFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionFutureStub(channel, callOptions); + } + }; + return CompletionFutureStub.newStub(factory, channel); } /** @@ -135,14 +146,14 @@ public void completeQuery( com.google.cloud.talent.v4beta1.CompleteQueryRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCompleteQueryMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCompleteQueryMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getCompleteQueryMethodHelper(), + getCompleteQueryMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.CompleteQueryRequest, @@ -159,11 +170,7 @@ public final io.grpc.ServerServiceDefinition bindService() { * A service handles auto completion. *
*/ - public static final class CompletionStub extends io.grpc.stub.AbstractStub { - private CompletionStub(io.grpc.Channel channel) { - super(channel); - } - + public static final class CompletionStub extends io.grpc.stub.AbstractAsyncStub { private CompletionStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -186,7 +193,7 @@ public void completeQuery( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCompleteQueryMethodHelper(), getCallOptions()), + getChannel().newCall(getCompleteQueryMethod(), getCallOptions()), request, responseObserver); } @@ -200,11 +207,7 @@ public void completeQuery( *
*/ public static final class CompletionBlockingStub - extends io.grpc.stub.AbstractStub { - private CompletionBlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private CompletionBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -225,8 +228,7 @@ protected CompletionBlockingStub build( */ public com.google.cloud.talent.v4beta1.CompleteQueryResponse completeQuery( com.google.cloud.talent.v4beta1.CompleteQueryRequest request) { - return blockingUnaryCall( - getChannel(), getCompleteQueryMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getCompleteQueryMethod(), getCallOptions(), request); } } @@ -238,11 +240,7 @@ public com.google.cloud.talent.v4beta1.CompleteQueryResponse completeQuery( *
*/ public static final class CompletionFutureStub - extends io.grpc.stub.AbstractStub { - private CompletionFutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private CompletionFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -264,7 +262,7 @@ protected CompletionFutureStub build(io.grpc.Channel channel, io.grpc.CallOption com.google.cloud.talent.v4beta1.CompleteQueryResponse> completeQuery(com.google.cloud.talent.v4beta1.CompleteQueryRequest request) { return futureUnaryCall( - getChannel().newCall(getCompleteQueryMethodHelper(), getCallOptions()), request); + getChannel().newCall(getCompleteQueryMethod(), getCallOptions()), request); } } @@ -357,7 +355,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new CompletionFileDescriptorSupplier()) - .addMethod(getCompleteQueryMethodHelper()) + .addMethod(getCompleteQueryMethod()) .build(); } } diff --git a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/EventServiceGrpc.java b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/EventServiceGrpc.java index 8f09ba32..051166af 100644 --- a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/EventServiceGrpc.java +++ b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/EventServiceGrpc.java @@ -30,7 +30,7 @@ *
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/cloud/talent/v4beta1/event_service.proto") public final class EventServiceGrpc { @@ -39,30 +39,20 @@ private EventServiceGrpc() {} public static final String SERVICE_NAME = "google.cloud.talent.v4beta1.EventService"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateClientEventMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateClientEventRequest, - com.google.cloud.talent.v4beta1.ClientEvent> - METHOD_CREATE_CLIENT_EVENT = getCreateClientEventMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateClientEventRequest, com.google.cloud.talent.v4beta1.ClientEvent> getCreateClientEventMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateClientEvent", + requestType = com.google.cloud.talent.v4beta1.CreateClientEventRequest.class, + responseType = com.google.cloud.talent.v4beta1.ClientEvent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateClientEventRequest, com.google.cloud.talent.v4beta1.ClientEvent> getCreateClientEventMethod() { - return getCreateClientEventMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateClientEventRequest, - com.google.cloud.talent.v4beta1.ClientEvent> - getCreateClientEventMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateClientEventRequest, com.google.cloud.talent.v4beta1.ClientEvent> @@ -77,9 +67,7 @@ private EventServiceGrpc() {} com.google.cloud.talent.v4beta1.ClientEvent> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.EventService", "CreateClientEvent")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateClientEvent")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -99,19 +87,43 @@ private EventServiceGrpc() {} /** Creates a new async stub that supports all call types for the service */ public static EventServiceStub newStub(io.grpc.Channel channel) { - return new EventServiceStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventServiceStub(channel, callOptions); + } + }; + return EventServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static EventServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - return new EventServiceBlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventServiceBlockingStub(channel, callOptions); + } + }; + return EventServiceBlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static EventServiceFutureStub newFutureStub(io.grpc.Channel channel) { - return new EventServiceFutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventServiceFutureStub(channel, callOptions); + } + }; + return EventServiceFutureStub.newStub(factory, channel); } /** @@ -139,14 +151,14 @@ public abstract static class EventServiceImplBase implements io.grpc.BindableSer public void createClientEvent( com.google.cloud.talent.v4beta1.CreateClientEventRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateClientEventMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCreateClientEventMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getCreateClientEventMethodHelper(), + getCreateClientEventMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.CreateClientEventRequest, @@ -163,11 +175,8 @@ public final io.grpc.ServerServiceDefinition bindService() { * A service handles client event report. *
*/ - public static final class EventServiceStub extends io.grpc.stub.AbstractStub { - private EventServiceStub(io.grpc.Channel channel) { - super(channel); - } - + public static final class EventServiceStub + extends io.grpc.stub.AbstractAsyncStub { private EventServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -194,7 +203,7 @@ public void createClientEvent( com.google.cloud.talent.v4beta1.CreateClientEventRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCreateClientEventMethodHelper(), getCallOptions()), + getChannel().newCall(getCreateClientEventMethod(), getCallOptions()), request, responseObserver); } @@ -208,11 +217,7 @@ public void createClientEvent( *
*/ public static final class EventServiceBlockingStub - extends io.grpc.stub.AbstractStub { - private EventServiceBlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private EventServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -239,7 +244,7 @@ protected EventServiceBlockingStub build( public com.google.cloud.talent.v4beta1.ClientEvent createClientEvent( com.google.cloud.talent.v4beta1.CreateClientEventRequest request) { return blockingUnaryCall( - getChannel(), getCreateClientEventMethodHelper(), getCallOptions(), request); + getChannel(), getCreateClientEventMethod(), getCallOptions(), request); } } @@ -251,11 +256,7 @@ public com.google.cloud.talent.v4beta1.ClientEvent createClientEvent( *
*/ public static final class EventServiceFutureStub - extends io.grpc.stub.AbstractStub { - private EventServiceFutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private EventServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -283,7 +284,7 @@ protected EventServiceFutureStub build( com.google.cloud.talent.v4beta1.ClientEvent> createClientEvent(com.google.cloud.talent.v4beta1.CreateClientEventRequest request) { return futureUnaryCall( - getChannel().newCall(getCreateClientEventMethodHelper(), getCallOptions()), request); + getChannel().newCall(getCreateClientEventMethod(), getCallOptions()), request); } } @@ -376,7 +377,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new EventServiceFileDescriptorSupplier()) - .addMethod(getCreateClientEventMethodHelper()) + .addMethod(getCreateClientEventMethod()) .build(); } } diff --git a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobServiceGrpc.java b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobServiceGrpc.java index 99d89cc8..ffa944de 100644 --- a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobServiceGrpc.java +++ b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobServiceGrpc.java @@ -30,7 +30,7 @@ *
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/cloud/talent/v4beta1/job_service.proto") public final class JobServiceGrpc { @@ -39,26 +39,18 @@ private JobServiceGrpc() {} public static final String SERVICE_NAME = "google.cloud.talent.v4beta1.JobService"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateJobMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateJobRequest, com.google.cloud.talent.v4beta1.Job> - METHOD_CREATE_JOB = getCreateJobMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateJobRequest, com.google.cloud.talent.v4beta1.Job> getCreateJobMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateJob", + requestType = com.google.cloud.talent.v4beta1.CreateJobRequest.class, + responseType = com.google.cloud.talent.v4beta1.Job.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateJobRequest, com.google.cloud.talent.v4beta1.Job> getCreateJobMethod() { - return getCreateJobMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateJobRequest, com.google.cloud.talent.v4beta1.Job> - getCreateJobMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateJobRequest, com.google.cloud.talent.v4beta1.Job> getCreateJobMethod; @@ -72,9 +64,7 @@ private JobServiceGrpc() {} com.google.cloud.talent.v4beta1.Job> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "CreateJob")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateJob")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -91,26 +81,18 @@ private JobServiceGrpc() {} return getCreateJobMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getBatchCreateJobsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.BatchCreateJobsRequest, com.google.longrunning.Operation> - METHOD_BATCH_CREATE_JOBS = getBatchCreateJobsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.BatchCreateJobsRequest, com.google.longrunning.Operation> getBatchCreateJobsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchCreateJobs", + requestType = com.google.cloud.talent.v4beta1.BatchCreateJobsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.BatchCreateJobsRequest, com.google.longrunning.Operation> getBatchCreateJobsMethod() { - return getBatchCreateJobsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.BatchCreateJobsRequest, com.google.longrunning.Operation> - getBatchCreateJobsMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.BatchCreateJobsRequest, com.google.longrunning.Operation> @@ -125,9 +107,7 @@ private JobServiceGrpc() {} com.google.longrunning.Operation> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "BatchCreateJobs")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateJobs")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -145,26 +125,18 @@ private JobServiceGrpc() {} return getBatchCreateJobsMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetJobMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetJobRequest, com.google.cloud.talent.v4beta1.Job> - METHOD_GET_JOB = getGetJobMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetJobRequest, com.google.cloud.talent.v4beta1.Job> getGetJobMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetJob", + requestType = com.google.cloud.talent.v4beta1.GetJobRequest.class, + responseType = com.google.cloud.talent.v4beta1.Job.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetJobRequest, com.google.cloud.talent.v4beta1.Job> getGetJobMethod() { - return getGetJobMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetJobRequest, com.google.cloud.talent.v4beta1.Job> - getGetJobMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetJobRequest, com.google.cloud.talent.v4beta1.Job> getGetJobMethod; @@ -178,9 +150,7 @@ private JobServiceGrpc() {} com.google.cloud.talent.v4beta1.Job> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "GetJob")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetJob")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -196,26 +166,18 @@ private JobServiceGrpc() {} return getGetJobMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateJobMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateJobRequest, com.google.cloud.talent.v4beta1.Job> - METHOD_UPDATE_JOB = getUpdateJobMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateJobRequest, com.google.cloud.talent.v4beta1.Job> getUpdateJobMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateJob", + requestType = com.google.cloud.talent.v4beta1.UpdateJobRequest.class, + responseType = com.google.cloud.talent.v4beta1.Job.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateJobRequest, com.google.cloud.talent.v4beta1.Job> getUpdateJobMethod() { - return getUpdateJobMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateJobRequest, com.google.cloud.talent.v4beta1.Job> - getUpdateJobMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateJobRequest, com.google.cloud.talent.v4beta1.Job> getUpdateJobMethod; @@ -229,9 +191,7 @@ private JobServiceGrpc() {} com.google.cloud.talent.v4beta1.Job> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "UpdateJob")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateJob")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -248,26 +208,18 @@ private JobServiceGrpc() {} return getUpdateJobMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getBatchUpdateJobsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest, com.google.longrunning.Operation> - METHOD_BATCH_UPDATE_JOBS = getBatchUpdateJobsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest, com.google.longrunning.Operation> getBatchUpdateJobsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchUpdateJobs", + requestType = com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest, com.google.longrunning.Operation> getBatchUpdateJobsMethod() { - return getBatchUpdateJobsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest, com.google.longrunning.Operation> - getBatchUpdateJobsMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest, com.google.longrunning.Operation> @@ -282,9 +234,7 @@ private JobServiceGrpc() {} com.google.longrunning.Operation> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "BatchUpdateJobs")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchUpdateJobs")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -302,26 +252,18 @@ private JobServiceGrpc() {} return getBatchUpdateJobsMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteJobMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteJobRequest, com.google.protobuf.Empty> - METHOD_DELETE_JOB = getDeleteJobMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteJobRequest, com.google.protobuf.Empty> getDeleteJobMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteJob", + requestType = com.google.cloud.talent.v4beta1.DeleteJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteJobRequest, com.google.protobuf.Empty> getDeleteJobMethod() { - return getDeleteJobMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteJobRequest, com.google.protobuf.Empty> - getDeleteJobMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteJobRequest, com.google.protobuf.Empty> getDeleteJobMethod; @@ -334,9 +276,7 @@ private JobServiceGrpc() {} . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "DeleteJob")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteJob")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -353,26 +293,18 @@ private JobServiceGrpc() {} return getDeleteJobMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getBatchDeleteJobsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest, com.google.protobuf.Empty> - METHOD_BATCH_DELETE_JOBS = getBatchDeleteJobsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest, com.google.protobuf.Empty> getBatchDeleteJobsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchDeleteJobs", + requestType = com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest, com.google.protobuf.Empty> getBatchDeleteJobsMethod() { - return getBatchDeleteJobsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest, com.google.protobuf.Empty> - getBatchDeleteJobsMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest, com.google.protobuf.Empty> getBatchDeleteJobsMethod; @@ -386,9 +318,7 @@ private JobServiceGrpc() {} com.google.protobuf.Empty> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "BatchDeleteJobs")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchDeleteJobs")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -406,30 +336,20 @@ private JobServiceGrpc() {} return getBatchDeleteJobsMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListJobsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListJobsRequest, - com.google.cloud.talent.v4beta1.ListJobsResponse> - METHOD_LIST_JOBS = getListJobsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListJobsRequest, com.google.cloud.talent.v4beta1.ListJobsResponse> getListJobsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListJobs", + requestType = com.google.cloud.talent.v4beta1.ListJobsRequest.class, + responseType = com.google.cloud.talent.v4beta1.ListJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListJobsRequest, com.google.cloud.talent.v4beta1.ListJobsResponse> getListJobsMethod() { - return getListJobsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListJobsRequest, - com.google.cloud.talent.v4beta1.ListJobsResponse> - getListJobsMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListJobsRequest, com.google.cloud.talent.v4beta1.ListJobsResponse> @@ -444,9 +364,7 @@ private JobServiceGrpc() {} com.google.cloud.talent.v4beta1.ListJobsResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "ListJobs")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListJobs")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -463,30 +381,20 @@ private JobServiceGrpc() {} return getListJobsMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getSearchJobsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.SearchJobsRequest, - com.google.cloud.talent.v4beta1.SearchJobsResponse> - METHOD_SEARCH_JOBS = getSearchJobsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.SearchJobsRequest, com.google.cloud.talent.v4beta1.SearchJobsResponse> getSearchJobsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchJobs", + requestType = com.google.cloud.talent.v4beta1.SearchJobsRequest.class, + responseType = com.google.cloud.talent.v4beta1.SearchJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.SearchJobsRequest, com.google.cloud.talent.v4beta1.SearchJobsResponse> getSearchJobsMethod() { - return getSearchJobsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.SearchJobsRequest, - com.google.cloud.talent.v4beta1.SearchJobsResponse> - getSearchJobsMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.SearchJobsRequest, com.google.cloud.talent.v4beta1.SearchJobsResponse> @@ -501,9 +409,7 @@ private JobServiceGrpc() {} com.google.cloud.talent.v4beta1.SearchJobsResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "SearchJobs")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchJobs")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -521,30 +427,20 @@ private JobServiceGrpc() {} return getSearchJobsMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getSearchJobsForAlertMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.SearchJobsRequest, - com.google.cloud.talent.v4beta1.SearchJobsResponse> - METHOD_SEARCH_JOBS_FOR_ALERT = getSearchJobsForAlertMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.SearchJobsRequest, com.google.cloud.talent.v4beta1.SearchJobsResponse> getSearchJobsForAlertMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchJobsForAlert", + requestType = com.google.cloud.talent.v4beta1.SearchJobsRequest.class, + responseType = com.google.cloud.talent.v4beta1.SearchJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.SearchJobsRequest, com.google.cloud.talent.v4beta1.SearchJobsResponse> getSearchJobsForAlertMethod() { - return getSearchJobsForAlertMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.SearchJobsRequest, - com.google.cloud.talent.v4beta1.SearchJobsResponse> - getSearchJobsForAlertMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.SearchJobsRequest, com.google.cloud.talent.v4beta1.SearchJobsResponse> @@ -559,9 +455,7 @@ private JobServiceGrpc() {} com.google.cloud.talent.v4beta1.SearchJobsResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.JobService", "SearchJobsForAlert")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchJobsForAlert")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -582,19 +476,42 @@ private JobServiceGrpc() {} /** Creates a new async stub that supports all call types for the service */ public static JobServiceStub newStub(io.grpc.Channel channel) { - return new JobServiceStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public JobServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceStub(channel, callOptions); + } + }; + return JobServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static JobServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - return new JobServiceBlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public JobServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceBlockingStub(channel, callOptions); + } + }; + return JobServiceBlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static JobServiceFutureStub newFutureStub(io.grpc.Channel channel) { - return new JobServiceFutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public JobServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceFutureStub(channel, callOptions); + } + }; + return JobServiceFutureStub.newStub(factory, channel); } /** @@ -618,7 +535,7 @@ public abstract static class JobServiceImplBase implements io.grpc.BindableServi public void createJob( com.google.cloud.talent.v4beta1.CreateJobRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateJobMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCreateJobMethod(), responseObserver); } /** @@ -631,7 +548,7 @@ public void createJob( public void batchCreateJobs( com.google.cloud.talent.v4beta1.BatchCreateJobsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getBatchCreateJobsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getBatchCreateJobsMethod(), responseObserver); } /** @@ -645,7 +562,7 @@ public void batchCreateJobs( public void getJob( com.google.cloud.talent.v4beta1.GetJobRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetJobMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getGetJobMethod(), responseObserver); } /** @@ -660,7 +577,7 @@ public void getJob( public void updateJob( com.google.cloud.talent.v4beta1.UpdateJobRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateJobMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getUpdateJobMethod(), responseObserver); } /** @@ -673,7 +590,7 @@ public void updateJob( public void batchUpdateJobs( com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getBatchUpdateJobsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getBatchUpdateJobsMethod(), responseObserver); } /** @@ -688,7 +605,7 @@ public void batchUpdateJobs( public void deleteJob( com.google.cloud.talent.v4beta1.DeleteJobRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteJobMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getDeleteJobMethod(), responseObserver); } /** @@ -701,7 +618,7 @@ public void deleteJob( public void batchDeleteJobs( com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getBatchDeleteJobsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getBatchDeleteJobsMethod(), responseObserver); } /** @@ -715,7 +632,7 @@ public void listJobs( com.google.cloud.talent.v4beta1.ListJobsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListJobsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListJobsMethod(), responseObserver); } /** @@ -732,7 +649,7 @@ public void searchJobs( com.google.cloud.talent.v4beta1.SearchJobsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getSearchJobsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getSearchJobsMethod(), responseObserver); } /** @@ -753,69 +670,69 @@ public void searchJobsForAlert( com.google.cloud.talent.v4beta1.SearchJobsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getSearchJobsForAlertMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getSearchJobsForAlertMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getCreateJobMethodHelper(), + getCreateJobMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.CreateJobRequest, com.google.cloud.talent.v4beta1.Job>(this, METHODID_CREATE_JOB))) .addMethod( - getBatchCreateJobsMethodHelper(), + getBatchCreateJobsMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.BatchCreateJobsRequest, com.google.longrunning.Operation>(this, METHODID_BATCH_CREATE_JOBS))) .addMethod( - getGetJobMethodHelper(), + getGetJobMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.GetJobRequest, com.google.cloud.talent.v4beta1.Job>(this, METHODID_GET_JOB))) .addMethod( - getUpdateJobMethodHelper(), + getUpdateJobMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.UpdateJobRequest, com.google.cloud.talent.v4beta1.Job>(this, METHODID_UPDATE_JOB))) .addMethod( - getBatchUpdateJobsMethodHelper(), + getBatchUpdateJobsMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest, com.google.longrunning.Operation>(this, METHODID_BATCH_UPDATE_JOBS))) .addMethod( - getDeleteJobMethodHelper(), + getDeleteJobMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.DeleteJobRequest, com.google.protobuf.Empty>( this, METHODID_DELETE_JOB))) .addMethod( - getBatchDeleteJobsMethodHelper(), + getBatchDeleteJobsMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest, com.google.protobuf.Empty>(this, METHODID_BATCH_DELETE_JOBS))) .addMethod( - getListJobsMethodHelper(), + getListJobsMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.ListJobsRequest, com.google.cloud.talent.v4beta1.ListJobsResponse>(this, METHODID_LIST_JOBS))) .addMethod( - getSearchJobsMethodHelper(), + getSearchJobsMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.SearchJobsRequest, com.google.cloud.talent.v4beta1.SearchJobsResponse>( this, METHODID_SEARCH_JOBS))) .addMethod( - getSearchJobsForAlertMethodHelper(), + getSearchJobsForAlertMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.SearchJobsRequest, @@ -832,11 +749,7 @@ public final io.grpc.ServerServiceDefinition bindService() { * A service handles job management, including job CRUD, enumeration and search. *
*/ - public static final class JobServiceStub extends io.grpc.stub.AbstractStub { - private JobServiceStub(io.grpc.Channel channel) { - super(channel); - } - + public static final class JobServiceStub extends io.grpc.stub.AbstractAsyncStub { private JobServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -859,9 +772,7 @@ public void createJob( com.google.cloud.talent.v4beta1.CreateJobRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCreateJobMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getCreateJobMethod(), getCallOptions()), request, responseObserver); } /** @@ -875,7 +786,7 @@ public void batchCreateJobs( com.google.cloud.talent.v4beta1.BatchCreateJobsRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getBatchCreateJobsMethodHelper(), getCallOptions()), + getChannel().newCall(getBatchCreateJobsMethod(), getCallOptions()), request, responseObserver); } @@ -892,9 +803,7 @@ public void getJob( com.google.cloud.talent.v4beta1.GetJobRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetJobMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetJobMethod(), getCallOptions()), request, responseObserver); } /** @@ -910,9 +819,7 @@ public void updateJob( com.google.cloud.talent.v4beta1.UpdateJobRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUpdateJobMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getUpdateJobMethod(), getCallOptions()), request, responseObserver); } /** @@ -926,7 +833,7 @@ public void batchUpdateJobs( com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getBatchUpdateJobsMethodHelper(), getCallOptions()), + getChannel().newCall(getBatchUpdateJobsMethod(), getCallOptions()), request, responseObserver); } @@ -944,9 +851,7 @@ public void deleteJob( com.google.cloud.talent.v4beta1.DeleteJobRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getDeleteJobMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getDeleteJobMethod(), getCallOptions()), request, responseObserver); } /** @@ -960,7 +865,7 @@ public void batchDeleteJobs( com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getBatchDeleteJobsMethodHelper(), getCallOptions()), + getChannel().newCall(getBatchDeleteJobsMethod(), getCallOptions()), request, responseObserver); } @@ -977,9 +882,7 @@ public void listJobs( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListJobsMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getListJobsMethod(), getCallOptions()), request, responseObserver); } /** @@ -997,9 +900,7 @@ public void searchJobs( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getSearchJobsMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getSearchJobsMethod(), getCallOptions()), request, responseObserver); } /** @@ -1021,7 +922,7 @@ public void searchJobsForAlert( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getSearchJobsForAlertMethodHelper(), getCallOptions()), + getChannel().newCall(getSearchJobsForAlertMethod(), getCallOptions()), request, responseObserver); } @@ -1035,11 +936,7 @@ public void searchJobsForAlert( *
*/ public static final class JobServiceBlockingStub - extends io.grpc.stub.AbstractStub { - private JobServiceBlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private JobServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -1061,7 +958,7 @@ protected JobServiceBlockingStub build( */ public com.google.cloud.talent.v4beta1.Job createJob( com.google.cloud.talent.v4beta1.CreateJobRequest request) { - return blockingUnaryCall(getChannel(), getCreateJobMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getCreateJobMethod(), getCallOptions(), request); } /** @@ -1073,8 +970,7 @@ public com.google.cloud.talent.v4beta1.Job createJob( */ public com.google.longrunning.Operation batchCreateJobs( com.google.cloud.talent.v4beta1.BatchCreateJobsRequest request) { - return blockingUnaryCall( - getChannel(), getBatchCreateJobsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getBatchCreateJobsMethod(), getCallOptions(), request); } /** @@ -1087,7 +983,7 @@ public com.google.longrunning.Operation batchCreateJobs( */ public com.google.cloud.talent.v4beta1.Job getJob( com.google.cloud.talent.v4beta1.GetJobRequest request) { - return blockingUnaryCall(getChannel(), getGetJobMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getGetJobMethod(), getCallOptions(), request); } /** @@ -1101,7 +997,7 @@ public com.google.cloud.talent.v4beta1.Job getJob( */ public com.google.cloud.talent.v4beta1.Job updateJob( com.google.cloud.talent.v4beta1.UpdateJobRequest request) { - return blockingUnaryCall(getChannel(), getUpdateJobMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getUpdateJobMethod(), getCallOptions(), request); } /** @@ -1113,8 +1009,7 @@ public com.google.cloud.talent.v4beta1.Job updateJob( */ public com.google.longrunning.Operation batchUpdateJobs( com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest request) { - return blockingUnaryCall( - getChannel(), getBatchUpdateJobsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getBatchUpdateJobsMethod(), getCallOptions(), request); } /** @@ -1128,7 +1023,7 @@ public com.google.longrunning.Operation batchUpdateJobs( */ public com.google.protobuf.Empty deleteJob( com.google.cloud.talent.v4beta1.DeleteJobRequest request) { - return blockingUnaryCall(getChannel(), getDeleteJobMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getDeleteJobMethod(), getCallOptions(), request); } /** @@ -1140,8 +1035,7 @@ public com.google.protobuf.Empty deleteJob( */ public com.google.protobuf.Empty batchDeleteJobs( com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest request) { - return blockingUnaryCall( - getChannel(), getBatchDeleteJobsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getBatchDeleteJobsMethod(), getCallOptions(), request); } /** @@ -1153,7 +1047,7 @@ public com.google.protobuf.Empty batchDeleteJobs( */ public com.google.cloud.talent.v4beta1.ListJobsResponse listJobs( com.google.cloud.talent.v4beta1.ListJobsRequest request) { - return blockingUnaryCall(getChannel(), getListJobsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getListJobsMethod(), getCallOptions(), request); } /** @@ -1168,8 +1062,7 @@ public com.google.cloud.talent.v4beta1.ListJobsResponse listJobs( */ public com.google.cloud.talent.v4beta1.SearchJobsResponse searchJobs( com.google.cloud.talent.v4beta1.SearchJobsRequest request) { - return blockingUnaryCall( - getChannel(), getSearchJobsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getSearchJobsMethod(), getCallOptions(), request); } /** @@ -1189,7 +1082,7 @@ public com.google.cloud.talent.v4beta1.SearchJobsResponse searchJobs( public com.google.cloud.talent.v4beta1.SearchJobsResponse searchJobsForAlert( com.google.cloud.talent.v4beta1.SearchJobsRequest request) { return blockingUnaryCall( - getChannel(), getSearchJobsForAlertMethodHelper(), getCallOptions(), request); + getChannel(), getSearchJobsForAlertMethod(), getCallOptions(), request); } } @@ -1201,11 +1094,7 @@ public com.google.cloud.talent.v4beta1.SearchJobsResponse searchJobsForAlert( *
*/ public static final class JobServiceFutureStub - extends io.grpc.stub.AbstractStub { - private JobServiceFutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private JobServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -1226,8 +1115,7 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption */ public com.google.common.util.concurrent.ListenableFuture createJob(com.google.cloud.talent.v4beta1.CreateJobRequest request) { - return futureUnaryCall( - getChannel().newCall(getCreateJobMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getCreateJobMethod(), getCallOptions()), request); } /** @@ -1240,7 +1128,7 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption public com.google.common.util.concurrent.ListenableFuture batchCreateJobs(com.google.cloud.talent.v4beta1.BatchCreateJobsRequest request) { return futureUnaryCall( - getChannel().newCall(getBatchCreateJobsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getBatchCreateJobsMethod(), getCallOptions()), request); } /** @@ -1253,8 +1141,7 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption */ public com.google.common.util.concurrent.ListenableFuture getJob(com.google.cloud.talent.v4beta1.GetJobRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetJobMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getGetJobMethod(), getCallOptions()), request); } /** @@ -1268,8 +1155,7 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption */ public com.google.common.util.concurrent.ListenableFuture updateJob(com.google.cloud.talent.v4beta1.UpdateJobRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateJobMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getUpdateJobMethod(), getCallOptions()), request); } /** @@ -1282,7 +1168,7 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption public com.google.common.util.concurrent.ListenableFuture batchUpdateJobs(com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest request) { return futureUnaryCall( - getChannel().newCall(getBatchUpdateJobsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getBatchUpdateJobsMethod(), getCallOptions()), request); } /** @@ -1296,8 +1182,7 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption */ public com.google.common.util.concurrent.ListenableFuture deleteJob( com.google.cloud.talent.v4beta1.DeleteJobRequest request) { - return futureUnaryCall( - getChannel().newCall(getDeleteJobMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getDeleteJobMethod(), getCallOptions()), request); } /** @@ -1310,7 +1195,7 @@ public com.google.common.util.concurrent.ListenableFuture batchDeleteJobs(com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest request) { return futureUnaryCall( - getChannel().newCall(getBatchDeleteJobsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getBatchDeleteJobsMethod(), getCallOptions()), request); } /** @@ -1323,8 +1208,7 @@ public com.google.common.util.concurrent.ListenableFuture listJobs(com.google.cloud.talent.v4beta1.ListJobsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListJobsMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getListJobsMethod(), getCallOptions()), request); } /** @@ -1341,7 +1225,7 @@ public com.google.common.util.concurrent.ListenableFuture searchJobs(com.google.cloud.talent.v4beta1.SearchJobsRequest request) { return futureUnaryCall( - getChannel().newCall(getSearchJobsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getSearchJobsMethod(), getCallOptions()), request); } /** @@ -1362,7 +1246,7 @@ public com.google.common.util.concurrent.ListenableFuture searchJobsForAlert(com.google.cloud.talent.v4beta1.SearchJobsRequest request) { return futureUnaryCall( - getChannel().newCall(getSearchJobsForAlertMethodHelper(), getCallOptions()), request); + getChannel().newCall(getSearchJobsForAlertMethod(), getCallOptions()), request); } } @@ -1511,16 +1395,16 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new JobServiceFileDescriptorSupplier()) - .addMethod(getCreateJobMethodHelper()) - .addMethod(getBatchCreateJobsMethodHelper()) - .addMethod(getGetJobMethodHelper()) - .addMethod(getUpdateJobMethodHelper()) - .addMethod(getBatchUpdateJobsMethodHelper()) - .addMethod(getDeleteJobMethodHelper()) - .addMethod(getBatchDeleteJobsMethodHelper()) - .addMethod(getListJobsMethodHelper()) - .addMethod(getSearchJobsMethodHelper()) - .addMethod(getSearchJobsForAlertMethodHelper()) + .addMethod(getCreateJobMethod()) + .addMethod(getBatchCreateJobsMethod()) + .addMethod(getGetJobMethod()) + .addMethod(getUpdateJobMethod()) + .addMethod(getBatchUpdateJobsMethod()) + .addMethod(getDeleteJobMethod()) + .addMethod(getBatchDeleteJobsMethod()) + .addMethod(getListJobsMethod()) + .addMethod(getSearchJobsMethod()) + .addMethod(getSearchJobsForAlertMethod()) .build(); } } diff --git a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceGrpc.java b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceGrpc.java index 017db7e9..88dfe247 100644 --- a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceGrpc.java +++ b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceGrpc.java @@ -31,7 +31,7 @@ *
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/cloud/talent/v4beta1/profile_service.proto") public final class ProfileServiceGrpc { @@ -40,30 +40,20 @@ private ProfileServiceGrpc() {} public static final String SERVICE_NAME = "google.cloud.talent.v4beta1.ProfileService"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListProfilesMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListProfilesRequest, - com.google.cloud.talent.v4beta1.ListProfilesResponse> - METHOD_LIST_PROFILES = getListProfilesMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListProfilesRequest, com.google.cloud.talent.v4beta1.ListProfilesResponse> getListProfilesMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProfiles", + requestType = com.google.cloud.talent.v4beta1.ListProfilesRequest.class, + responseType = com.google.cloud.talent.v4beta1.ListProfilesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListProfilesRequest, com.google.cloud.talent.v4beta1.ListProfilesResponse> getListProfilesMethod() { - return getListProfilesMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListProfilesRequest, - com.google.cloud.talent.v4beta1.ListProfilesResponse> - getListProfilesMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListProfilesRequest, com.google.cloud.talent.v4beta1.ListProfilesResponse> @@ -78,9 +68,7 @@ private ProfileServiceGrpc() {} com.google.cloud.talent.v4beta1.ListProfilesResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ProfileService", "ListProfiles")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProfiles")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -99,30 +87,20 @@ private ProfileServiceGrpc() {} return getListProfilesMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateProfileMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateProfileRequest, - com.google.cloud.talent.v4beta1.Profile> - METHOD_CREATE_PROFILE = getCreateProfileMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateProfileRequest, com.google.cloud.talent.v4beta1.Profile> getCreateProfileMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProfile", + requestType = com.google.cloud.talent.v4beta1.CreateProfileRequest.class, + responseType = com.google.cloud.talent.v4beta1.Profile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateProfileRequest, com.google.cloud.talent.v4beta1.Profile> getCreateProfileMethod() { - return getCreateProfileMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateProfileRequest, - com.google.cloud.talent.v4beta1.Profile> - getCreateProfileMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateProfileRequest, com.google.cloud.talent.v4beta1.Profile> @@ -137,9 +115,7 @@ private ProfileServiceGrpc() {} com.google.cloud.talent.v4beta1.Profile> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ProfileService", "CreateProfile")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProfile")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -157,30 +133,20 @@ private ProfileServiceGrpc() {} return getCreateProfileMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetProfileMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetProfileRequest, - com.google.cloud.talent.v4beta1.Profile> - METHOD_GET_PROFILE = getGetProfileMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetProfileRequest, com.google.cloud.talent.v4beta1.Profile> getGetProfileMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProfile", + requestType = com.google.cloud.talent.v4beta1.GetProfileRequest.class, + responseType = com.google.cloud.talent.v4beta1.Profile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetProfileRequest, com.google.cloud.talent.v4beta1.Profile> getGetProfileMethod() { - return getGetProfileMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetProfileRequest, - com.google.cloud.talent.v4beta1.Profile> - getGetProfileMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetProfileRequest, com.google.cloud.talent.v4beta1.Profile> @@ -195,9 +161,7 @@ private ProfileServiceGrpc() {} com.google.cloud.talent.v4beta1.Profile> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ProfileService", "GetProfile")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProfile")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -214,30 +178,20 @@ private ProfileServiceGrpc() {} return getGetProfileMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateProfileMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateProfileRequest, - com.google.cloud.talent.v4beta1.Profile> - METHOD_UPDATE_PROFILE = getUpdateProfileMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateProfileRequest, com.google.cloud.talent.v4beta1.Profile> getUpdateProfileMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProfile", + requestType = com.google.cloud.talent.v4beta1.UpdateProfileRequest.class, + responseType = com.google.cloud.talent.v4beta1.Profile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateProfileRequest, com.google.cloud.talent.v4beta1.Profile> getUpdateProfileMethod() { - return getUpdateProfileMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateProfileRequest, - com.google.cloud.talent.v4beta1.Profile> - getUpdateProfileMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateProfileRequest, com.google.cloud.talent.v4beta1.Profile> @@ -252,9 +206,7 @@ private ProfileServiceGrpc() {} com.google.cloud.talent.v4beta1.Profile> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ProfileService", "UpdateProfile")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProfile")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -272,26 +224,18 @@ private ProfileServiceGrpc() {} return getUpdateProfileMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteProfileMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteProfileRequest, com.google.protobuf.Empty> - METHOD_DELETE_PROFILE = getDeleteProfileMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteProfileRequest, com.google.protobuf.Empty> getDeleteProfileMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProfile", + requestType = com.google.cloud.talent.v4beta1.DeleteProfileRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteProfileRequest, com.google.protobuf.Empty> getDeleteProfileMethod() { - return getDeleteProfileMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteProfileRequest, com.google.protobuf.Empty> - getDeleteProfileMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteProfileRequest, com.google.protobuf.Empty> getDeleteProfileMethod; @@ -305,9 +249,7 @@ private ProfileServiceGrpc() {} com.google.protobuf.Empty> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ProfileService", "DeleteProfile")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProfile")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -325,30 +267,20 @@ private ProfileServiceGrpc() {} return getDeleteProfileMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getSearchProfilesMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.SearchProfilesRequest, - com.google.cloud.talent.v4beta1.SearchProfilesResponse> - METHOD_SEARCH_PROFILES = getSearchProfilesMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.SearchProfilesRequest, com.google.cloud.talent.v4beta1.SearchProfilesResponse> getSearchProfilesMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchProfiles", + requestType = com.google.cloud.talent.v4beta1.SearchProfilesRequest.class, + responseType = com.google.cloud.talent.v4beta1.SearchProfilesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.SearchProfilesRequest, com.google.cloud.talent.v4beta1.SearchProfilesResponse> getSearchProfilesMethod() { - return getSearchProfilesMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.SearchProfilesRequest, - com.google.cloud.talent.v4beta1.SearchProfilesResponse> - getSearchProfilesMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.SearchProfilesRequest, com.google.cloud.talent.v4beta1.SearchProfilesResponse> @@ -363,9 +295,7 @@ private ProfileServiceGrpc() {} com.google.cloud.talent.v4beta1.SearchProfilesResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.ProfileService", "SearchProfiles")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchProfiles")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -386,19 +316,43 @@ private ProfileServiceGrpc() {} /** Creates a new async stub that supports all call types for the service */ public static ProfileServiceStub newStub(io.grpc.Channel channel) { - return new ProfileServiceStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProfileServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProfileServiceStub(channel, callOptions); + } + }; + return ProfileServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static ProfileServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - return new ProfileServiceBlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProfileServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProfileServiceBlockingStub(channel, callOptions); + } + }; + return ProfileServiceBlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static ProfileServiceFutureStub newFutureStub(io.grpc.Channel channel) { - return new ProfileServiceFutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProfileServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProfileServiceFutureStub(channel, callOptions); + } + }; + return ProfileServiceFutureStub.newStub(factory, channel); } /** @@ -422,7 +376,7 @@ public void listProfiles( com.google.cloud.talent.v4beta1.ListProfilesRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListProfilesMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListProfilesMethod(), responseObserver); } /** @@ -435,7 +389,7 @@ public void listProfiles( public void createProfile( com.google.cloud.talent.v4beta1.CreateProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateProfileMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCreateProfileMethod(), responseObserver); } /** @@ -448,7 +402,7 @@ public void createProfile( public void getProfile( com.google.cloud.talent.v4beta1.GetProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetProfileMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getGetProfileMethod(), responseObserver); } /** @@ -461,7 +415,7 @@ public void getProfile( public void updateProfile( com.google.cloud.talent.v4beta1.UpdateProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateProfileMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getUpdateProfileMethod(), responseObserver); } /** @@ -476,7 +430,7 @@ public void updateProfile( public void deleteProfile( com.google.cloud.talent.v4beta1.DeleteProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteProfileMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getDeleteProfileMethod(), responseObserver); } /** @@ -493,45 +447,45 @@ public void searchProfiles( com.google.cloud.talent.v4beta1.SearchProfilesRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getSearchProfilesMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getSearchProfilesMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getListProfilesMethodHelper(), + getListProfilesMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.ListProfilesRequest, com.google.cloud.talent.v4beta1.ListProfilesResponse>( this, METHODID_LIST_PROFILES))) .addMethod( - getCreateProfileMethodHelper(), + getCreateProfileMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.CreateProfileRequest, com.google.cloud.talent.v4beta1.Profile>(this, METHODID_CREATE_PROFILE))) .addMethod( - getGetProfileMethodHelper(), + getGetProfileMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.GetProfileRequest, com.google.cloud.talent.v4beta1.Profile>(this, METHODID_GET_PROFILE))) .addMethod( - getUpdateProfileMethodHelper(), + getUpdateProfileMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.UpdateProfileRequest, com.google.cloud.talent.v4beta1.Profile>(this, METHODID_UPDATE_PROFILE))) .addMethod( - getDeleteProfileMethodHelper(), + getDeleteProfileMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.DeleteProfileRequest, com.google.protobuf.Empty>(this, METHODID_DELETE_PROFILE))) .addMethod( - getSearchProfilesMethodHelper(), + getSearchProfilesMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.SearchProfilesRequest, @@ -550,11 +504,7 @@ public final io.grpc.ServerServiceDefinition bindService() { *
*/ public static final class ProfileServiceStub - extends io.grpc.stub.AbstractStub { - private ProfileServiceStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractAsyncStub { private ProfileServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -576,7 +526,7 @@ public void listProfiles( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListProfilesMethodHelper(), getCallOptions()), + getChannel().newCall(getListProfilesMethod(), getCallOptions()), request, responseObserver); } @@ -592,7 +542,7 @@ public void createProfile( com.google.cloud.talent.v4beta1.CreateProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCreateProfileMethodHelper(), getCallOptions()), + getChannel().newCall(getCreateProfileMethod(), getCallOptions()), request, responseObserver); } @@ -608,9 +558,7 @@ public void getProfile( com.google.cloud.talent.v4beta1.GetProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetProfileMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetProfileMethod(), getCallOptions()), request, responseObserver); } /** @@ -624,7 +572,7 @@ public void updateProfile( com.google.cloud.talent.v4beta1.UpdateProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUpdateProfileMethodHelper(), getCallOptions()), + getChannel().newCall(getUpdateProfileMethod(), getCallOptions()), request, responseObserver); } @@ -642,7 +590,7 @@ public void deleteProfile( com.google.cloud.talent.v4beta1.DeleteProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getDeleteProfileMethodHelper(), getCallOptions()), + getChannel().newCall(getDeleteProfileMethod(), getCallOptions()), request, responseObserver); } @@ -662,7 +610,7 @@ public void searchProfiles( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getSearchProfilesMethodHelper(), getCallOptions()), + getChannel().newCall(getSearchProfilesMethod(), getCallOptions()), request, responseObserver); } @@ -677,11 +625,7 @@ public void searchProfiles( *
*/ public static final class ProfileServiceBlockingStub - extends io.grpc.stub.AbstractStub { - private ProfileServiceBlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private ProfileServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -701,8 +645,7 @@ protected ProfileServiceBlockingStub build( */ public com.google.cloud.talent.v4beta1.ListProfilesResponse listProfiles( com.google.cloud.talent.v4beta1.ListProfilesRequest request) { - return blockingUnaryCall( - getChannel(), getListProfilesMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getListProfilesMethod(), getCallOptions(), request); } /** @@ -714,8 +657,7 @@ public com.google.cloud.talent.v4beta1.ListProfilesResponse listProfiles( */ public com.google.cloud.talent.v4beta1.Profile createProfile( com.google.cloud.talent.v4beta1.CreateProfileRequest request) { - return blockingUnaryCall( - getChannel(), getCreateProfileMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getCreateProfileMethod(), getCallOptions(), request); } /** @@ -727,8 +669,7 @@ public com.google.cloud.talent.v4beta1.Profile createProfile( */ public com.google.cloud.talent.v4beta1.Profile getProfile( com.google.cloud.talent.v4beta1.GetProfileRequest request) { - return blockingUnaryCall( - getChannel(), getGetProfileMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getGetProfileMethod(), getCallOptions(), request); } /** @@ -740,8 +681,7 @@ public com.google.cloud.talent.v4beta1.Profile getProfile( */ public com.google.cloud.talent.v4beta1.Profile updateProfile( com.google.cloud.talent.v4beta1.UpdateProfileRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateProfileMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getUpdateProfileMethod(), getCallOptions(), request); } /** @@ -755,8 +695,7 @@ public com.google.cloud.talent.v4beta1.Profile updateProfile( */ public com.google.protobuf.Empty deleteProfile( com.google.cloud.talent.v4beta1.DeleteProfileRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteProfileMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getDeleteProfileMethod(), getCallOptions(), request); } /** @@ -771,8 +710,7 @@ public com.google.protobuf.Empty deleteProfile( */ public com.google.cloud.talent.v4beta1.SearchProfilesResponse searchProfiles( com.google.cloud.talent.v4beta1.SearchProfilesRequest request) { - return blockingUnaryCall( - getChannel(), getSearchProfilesMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getSearchProfilesMethod(), getCallOptions(), request); } } @@ -785,11 +723,7 @@ public com.google.cloud.talent.v4beta1.SearchProfilesResponse searchProfiles( *
*/ public static final class ProfileServiceFutureStub - extends io.grpc.stub.AbstractStub { - private ProfileServiceFutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private ProfileServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -811,7 +745,7 @@ protected ProfileServiceFutureStub build( com.google.cloud.talent.v4beta1.ListProfilesResponse> listProfiles(com.google.cloud.talent.v4beta1.ListProfilesRequest request) { return futureUnaryCall( - getChannel().newCall(getListProfilesMethodHelper(), getCallOptions()), request); + getChannel().newCall(getListProfilesMethod(), getCallOptions()), request); } /** @@ -825,7 +759,7 @@ protected ProfileServiceFutureStub build( com.google.cloud.talent.v4beta1.Profile> createProfile(com.google.cloud.talent.v4beta1.CreateProfileRequest request) { return futureUnaryCall( - getChannel().newCall(getCreateProfileMethodHelper(), getCallOptions()), request); + getChannel().newCall(getCreateProfileMethod(), getCallOptions()), request); } /** @@ -839,7 +773,7 @@ protected ProfileServiceFutureStub build( com.google.cloud.talent.v4beta1.Profile> getProfile(com.google.cloud.talent.v4beta1.GetProfileRequest request) { return futureUnaryCall( - getChannel().newCall(getGetProfileMethodHelper(), getCallOptions()), request); + getChannel().newCall(getGetProfileMethod(), getCallOptions()), request); } /** @@ -853,7 +787,7 @@ protected ProfileServiceFutureStub build( com.google.cloud.talent.v4beta1.Profile> updateProfile(com.google.cloud.talent.v4beta1.UpdateProfileRequest request) { return futureUnaryCall( - getChannel().newCall(getUpdateProfileMethodHelper(), getCallOptions()), request); + getChannel().newCall(getUpdateProfileMethod(), getCallOptions()), request); } /** @@ -868,7 +802,7 @@ protected ProfileServiceFutureStub build( public com.google.common.util.concurrent.ListenableFuture deleteProfile(com.google.cloud.talent.v4beta1.DeleteProfileRequest request) { return futureUnaryCall( - getChannel().newCall(getDeleteProfileMethodHelper(), getCallOptions()), request); + getChannel().newCall(getDeleteProfileMethod(), getCallOptions()), request); } /** @@ -885,7 +819,7 @@ protected ProfileServiceFutureStub build( com.google.cloud.talent.v4beta1.SearchProfilesResponse> searchProfiles(com.google.cloud.talent.v4beta1.SearchProfilesRequest request) { return futureUnaryCall( - getChannel().newCall(getSearchProfilesMethodHelper(), getCallOptions()), request); + getChannel().newCall(getSearchProfilesMethod(), getCallOptions()), request); } } @@ -1012,12 +946,12 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ProfileServiceFileDescriptorSupplier()) - .addMethod(getListProfilesMethodHelper()) - .addMethod(getCreateProfileMethodHelper()) - .addMethod(getGetProfileMethodHelper()) - .addMethod(getUpdateProfileMethodHelper()) - .addMethod(getDeleteProfileMethodHelper()) - .addMethod(getSearchProfilesMethodHelper()) + .addMethod(getListProfilesMethod()) + .addMethod(getCreateProfileMethod()) + .addMethod(getGetProfileMethod()) + .addMethod(getUpdateProfileMethod()) + .addMethod(getDeleteProfileMethod()) + .addMethod(getSearchProfilesMethod()) .build(); } } diff --git a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceGrpc.java b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceGrpc.java index 499f0d6d..c554b883 100644 --- a/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceGrpc.java +++ b/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceGrpc.java @@ -30,7 +30,7 @@ *
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.10.0)", + value = "by gRPC proto compiler", comments = "Source: google/cloud/talent/v4beta1/tenant_service.proto") public final class TenantServiceGrpc { @@ -39,30 +39,20 @@ private TenantServiceGrpc() {} public static final String SERVICE_NAME = "google.cloud.talent.v4beta1.TenantService"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getCreateTenantMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateTenantRequest, - com.google.cloud.talent.v4beta1.Tenant> - METHOD_CREATE_TENANT = getCreateTenantMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateTenantRequest, com.google.cloud.talent.v4beta1.Tenant> getCreateTenantMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTenant", + requestType = com.google.cloud.talent.v4beta1.CreateTenantRequest.class, + responseType = com.google.cloud.talent.v4beta1.Tenant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateTenantRequest, com.google.cloud.talent.v4beta1.Tenant> getCreateTenantMethod() { - return getCreateTenantMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.CreateTenantRequest, - com.google.cloud.talent.v4beta1.Tenant> - getCreateTenantMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.CreateTenantRequest, com.google.cloud.talent.v4beta1.Tenant> @@ -77,9 +67,7 @@ private TenantServiceGrpc() {} com.google.cloud.talent.v4beta1.Tenant> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.TenantService", "CreateTenant")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTenant")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -97,26 +85,18 @@ private TenantServiceGrpc() {} return getCreateTenantMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getGetTenantMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetTenantRequest, com.google.cloud.talent.v4beta1.Tenant> - METHOD_GET_TENANT = getGetTenantMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetTenantRequest, com.google.cloud.talent.v4beta1.Tenant> getGetTenantMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTenant", + requestType = com.google.cloud.talent.v4beta1.GetTenantRequest.class, + responseType = com.google.cloud.talent.v4beta1.Tenant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetTenantRequest, com.google.cloud.talent.v4beta1.Tenant> getGetTenantMethod() { - return getGetTenantMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.GetTenantRequest, com.google.cloud.talent.v4beta1.Tenant> - getGetTenantMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.GetTenantRequest, com.google.cloud.talent.v4beta1.Tenant> @@ -131,9 +111,7 @@ private TenantServiceGrpc() {} com.google.cloud.talent.v4beta1.Tenant> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.TenantService", "GetTenant")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTenant")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -150,30 +128,20 @@ private TenantServiceGrpc() {} return getGetTenantMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getUpdateTenantMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateTenantRequest, - com.google.cloud.talent.v4beta1.Tenant> - METHOD_UPDATE_TENANT = getUpdateTenantMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateTenantRequest, com.google.cloud.talent.v4beta1.Tenant> getUpdateTenantMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTenant", + requestType = com.google.cloud.talent.v4beta1.UpdateTenantRequest.class, + responseType = com.google.cloud.talent.v4beta1.Tenant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateTenantRequest, com.google.cloud.talent.v4beta1.Tenant> getUpdateTenantMethod() { - return getUpdateTenantMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.UpdateTenantRequest, - com.google.cloud.talent.v4beta1.Tenant> - getUpdateTenantMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.UpdateTenantRequest, com.google.cloud.talent.v4beta1.Tenant> @@ -188,9 +156,7 @@ private TenantServiceGrpc() {} com.google.cloud.talent.v4beta1.Tenant> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.TenantService", "UpdateTenant")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTenant")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -208,26 +174,18 @@ private TenantServiceGrpc() {} return getUpdateTenantMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getDeleteTenantMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteTenantRequest, com.google.protobuf.Empty> - METHOD_DELETE_TENANT = getDeleteTenantMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteTenantRequest, com.google.protobuf.Empty> getDeleteTenantMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTenant", + requestType = com.google.cloud.talent.v4beta1.DeleteTenantRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteTenantRequest, com.google.protobuf.Empty> getDeleteTenantMethod() { - return getDeleteTenantMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.DeleteTenantRequest, com.google.protobuf.Empty> - getDeleteTenantMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.DeleteTenantRequest, com.google.protobuf.Empty> getDeleteTenantMethod; @@ -241,9 +199,7 @@ private TenantServiceGrpc() {} com.google.protobuf.Empty> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.TenantService", "DeleteTenant")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTenant")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -261,30 +217,20 @@ private TenantServiceGrpc() {} return getDeleteTenantMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getListTenantsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListTenantsRequest, - com.google.cloud.talent.v4beta1.ListTenantsResponse> - METHOD_LIST_TENANTS = getListTenantsMethodHelper(); - private static volatile io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListTenantsRequest, com.google.cloud.talent.v4beta1.ListTenantsResponse> getListTenantsMethod; - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTenants", + requestType = com.google.cloud.talent.v4beta1.ListTenantsRequest.class, + responseType = com.google.cloud.talent.v4beta1.ListTenantsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListTenantsRequest, com.google.cloud.talent.v4beta1.ListTenantsResponse> getListTenantsMethod() { - return getListTenantsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.talent.v4beta1.ListTenantsRequest, - com.google.cloud.talent.v4beta1.ListTenantsResponse> - getListTenantsMethodHelper() { io.grpc.MethodDescriptor< com.google.cloud.talent.v4beta1.ListTenantsRequest, com.google.cloud.talent.v4beta1.ListTenantsResponse> @@ -299,9 +245,7 @@ private TenantServiceGrpc() {} com.google.cloud.talent.v4beta1.ListTenantsResponse> newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.talent.v4beta1.TenantService", "ListTenants")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTenants")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( @@ -321,19 +265,43 @@ private TenantServiceGrpc() {} /** Creates a new async stub that supports all call types for the service */ public static TenantServiceStub newStub(io.grpc.Channel channel) { - return new TenantServiceStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TenantServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TenantServiceStub(channel, callOptions); + } + }; + return TenantServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static TenantServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - return new TenantServiceBlockingStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TenantServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TenantServiceBlockingStub(channel, callOptions); + } + }; + return TenantServiceBlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static TenantServiceFutureStub newFutureStub(io.grpc.Channel channel) { - return new TenantServiceFutureStub(channel); + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TenantServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TenantServiceFutureStub(channel, callOptions); + } + }; + return TenantServiceFutureStub.newStub(factory, channel); } /** @@ -355,7 +323,7 @@ public abstract static class TenantServiceImplBase implements io.grpc.BindableSe public void createTenant( com.google.cloud.talent.v4beta1.CreateTenantRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateTenantMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getCreateTenantMethod(), responseObserver); } /** @@ -368,7 +336,7 @@ public void createTenant( public void getTenant( com.google.cloud.talent.v4beta1.GetTenantRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetTenantMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getGetTenantMethod(), responseObserver); } /** @@ -381,7 +349,7 @@ public void getTenant( public void updateTenant( com.google.cloud.talent.v4beta1.UpdateTenantRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateTenantMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getUpdateTenantMethod(), responseObserver); } /** @@ -394,7 +362,7 @@ public void updateTenant( public void deleteTenant( com.google.cloud.talent.v4beta1.DeleteTenantRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteTenantMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getDeleteTenantMethod(), responseObserver); } /** @@ -408,38 +376,38 @@ public void listTenants( com.google.cloud.talent.v4beta1.ListTenantsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getListTenantsMethodHelper(), responseObserver); + asyncUnimplementedUnaryCall(getListTenantsMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getCreateTenantMethodHelper(), + getCreateTenantMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.CreateTenantRequest, com.google.cloud.talent.v4beta1.Tenant>(this, METHODID_CREATE_TENANT))) .addMethod( - getGetTenantMethodHelper(), + getGetTenantMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.GetTenantRequest, com.google.cloud.talent.v4beta1.Tenant>(this, METHODID_GET_TENANT))) .addMethod( - getUpdateTenantMethodHelper(), + getUpdateTenantMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.UpdateTenantRequest, com.google.cloud.talent.v4beta1.Tenant>(this, METHODID_UPDATE_TENANT))) .addMethod( - getDeleteTenantMethodHelper(), + getDeleteTenantMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.DeleteTenantRequest, com.google.protobuf.Empty>(this, METHODID_DELETE_TENANT))) .addMethod( - getListTenantsMethodHelper(), + getListTenantsMethod(), asyncUnaryCall( new MethodHandlers< com.google.cloud.talent.v4beta1.ListTenantsRequest, @@ -456,11 +424,8 @@ public final io.grpc.ServerServiceDefinition bindService() { * A service that handles tenant management, including CRUD and enumeration. *
*/ - public static final class TenantServiceStub extends io.grpc.stub.AbstractStub { - private TenantServiceStub(io.grpc.Channel channel) { - super(channel); - } - + public static final class TenantServiceStub + extends io.grpc.stub.AbstractAsyncStub { private TenantServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -481,7 +446,7 @@ public void createTenant( com.google.cloud.talent.v4beta1.CreateTenantRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCreateTenantMethodHelper(), getCallOptions()), + getChannel().newCall(getCreateTenantMethod(), getCallOptions()), request, responseObserver); } @@ -497,9 +462,7 @@ public void getTenant( com.google.cloud.talent.v4beta1.GetTenantRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetTenantMethodHelper(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetTenantMethod(), getCallOptions()), request, responseObserver); } /** @@ -513,7 +476,7 @@ public void updateTenant( com.google.cloud.talent.v4beta1.UpdateTenantRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUpdateTenantMethodHelper(), getCallOptions()), + getChannel().newCall(getUpdateTenantMethod(), getCallOptions()), request, responseObserver); } @@ -529,7 +492,7 @@ public void deleteTenant( com.google.cloud.talent.v4beta1.DeleteTenantRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getDeleteTenantMethodHelper(), getCallOptions()), + getChannel().newCall(getDeleteTenantMethod(), getCallOptions()), request, responseObserver); } @@ -546,7 +509,7 @@ public void listTenants( io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getListTenantsMethodHelper(), getCallOptions()), + getChannel().newCall(getListTenantsMethod(), getCallOptions()), request, responseObserver); } @@ -560,11 +523,7 @@ public void listTenants( *
*/ public static final class TenantServiceBlockingStub - extends io.grpc.stub.AbstractStub { - private TenantServiceBlockingStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractBlockingStub { private TenantServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -584,8 +543,7 @@ protected TenantServiceBlockingStub build( */ public com.google.cloud.talent.v4beta1.Tenant createTenant( com.google.cloud.talent.v4beta1.CreateTenantRequest request) { - return blockingUnaryCall( - getChannel(), getCreateTenantMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getCreateTenantMethod(), getCallOptions(), request); } /** @@ -597,7 +555,7 @@ public com.google.cloud.talent.v4beta1.Tenant createTenant( */ public com.google.cloud.talent.v4beta1.Tenant getTenant( com.google.cloud.talent.v4beta1.GetTenantRequest request) { - return blockingUnaryCall(getChannel(), getGetTenantMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getGetTenantMethod(), getCallOptions(), request); } /** @@ -609,8 +567,7 @@ public com.google.cloud.talent.v4beta1.Tenant getTenant( */ public com.google.cloud.talent.v4beta1.Tenant updateTenant( com.google.cloud.talent.v4beta1.UpdateTenantRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateTenantMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getUpdateTenantMethod(), getCallOptions(), request); } /** @@ -622,8 +579,7 @@ public com.google.cloud.talent.v4beta1.Tenant updateTenant( */ public com.google.protobuf.Empty deleteTenant( com.google.cloud.talent.v4beta1.DeleteTenantRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteTenantMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getDeleteTenantMethod(), getCallOptions(), request); } /** @@ -635,8 +591,7 @@ public com.google.protobuf.Empty deleteTenant( */ public com.google.cloud.talent.v4beta1.ListTenantsResponse listTenants( com.google.cloud.talent.v4beta1.ListTenantsRequest request) { - return blockingUnaryCall( - getChannel(), getListTenantsMethodHelper(), getCallOptions(), request); + return blockingUnaryCall(getChannel(), getListTenantsMethod(), getCallOptions(), request); } } @@ -648,11 +603,7 @@ public com.google.cloud.talent.v4beta1.ListTenantsResponse listTenants( *
*/ public static final class TenantServiceFutureStub - extends io.grpc.stub.AbstractStub { - private TenantServiceFutureStub(io.grpc.Channel channel) { - super(channel); - } - + extends io.grpc.stub.AbstractFutureStub { private TenantServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -674,7 +625,7 @@ protected TenantServiceFutureStub build( com.google.cloud.talent.v4beta1.Tenant> createTenant(com.google.cloud.talent.v4beta1.CreateTenantRequest request) { return futureUnaryCall( - getChannel().newCall(getCreateTenantMethodHelper(), getCallOptions()), request); + getChannel().newCall(getCreateTenantMethod(), getCallOptions()), request); } /** @@ -687,8 +638,7 @@ protected TenantServiceFutureStub build( public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.talent.v4beta1.Tenant> getTenant(com.google.cloud.talent.v4beta1.GetTenantRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetTenantMethodHelper(), getCallOptions()), request); + return futureUnaryCall(getChannel().newCall(getGetTenantMethod(), getCallOptions()), request); } /** @@ -702,7 +652,7 @@ protected TenantServiceFutureStub build( com.google.cloud.talent.v4beta1.Tenant> updateTenant(com.google.cloud.talent.v4beta1.UpdateTenantRequest request) { return futureUnaryCall( - getChannel().newCall(getUpdateTenantMethodHelper(), getCallOptions()), request); + getChannel().newCall(getUpdateTenantMethod(), getCallOptions()), request); } /** @@ -715,7 +665,7 @@ protected TenantServiceFutureStub build( public com.google.common.util.concurrent.ListenableFuture deleteTenant(com.google.cloud.talent.v4beta1.DeleteTenantRequest request) { return futureUnaryCall( - getChannel().newCall(getDeleteTenantMethodHelper(), getCallOptions()), request); + getChannel().newCall(getDeleteTenantMethod(), getCallOptions()), request); } /** @@ -729,7 +679,7 @@ protected TenantServiceFutureStub build( com.google.cloud.talent.v4beta1.ListTenantsResponse> listTenants(com.google.cloud.talent.v4beta1.ListTenantsRequest request) { return futureUnaryCall( - getChannel().newCall(getListTenantsMethodHelper(), getCallOptions()), request); + getChannel().newCall(getListTenantsMethod(), getCallOptions()), request); } } @@ -849,11 +799,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new TenantServiceFileDescriptorSupplier()) - .addMethod(getCreateTenantMethodHelper()) - .addMethod(getGetTenantMethodHelper()) - .addMethod(getUpdateTenantMethodHelper()) - .addMethod(getDeleteTenantMethodHelper()) - .addMethod(getListTenantsMethodHelper()) + .addMethod(getCreateTenantMethod()) + .addMethod(getGetTenantMethod()) + .addMethod(getUpdateTenantMethod()) + .addMethod(getDeleteTenantMethod()) + .addMethod(getListTenantsMethod()) .build(); } } diff --git a/pom.xml b/pom.xml index 195a3e6a..2e1cfbab 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-talent-parent pom - 0.35.2-beta + 0.36.0 Google Cloud Talent Solution Parent https://github.com/googleapis/java-talent @@ -63,12 +63,12 @@ UTF-8 github google-cloud-talent-parent - 1.92.4 - 1.8.1 + 1.93.1 + 1.9.0 1.17.0 - 1.53.1 - 1.27.0 - 3.11.3 + 1.54.0 + 1.27.2 + 3.11.4 4.13 28.2-android 1.4.1 @@ -81,22 +81,22 @@ com.google.api.grpc proto-google-cloud-talent-v4beta1 - 0.35.2-beta + 0.36.0 com.google.api.grpc grpc-google-cloud-talent-v4beta1 - 0.35.2-beta + 0.36.0 com.google.cloud google-cloud-talent - 0.35.2-beta + 0.36.0 com.google.cloud google-cloud-talent-bom - 0.35.2-beta + 0.36.0 @@ -226,7 +226,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 html diff --git a/proto-google-cloud-talent-v4beta1/clirr-ignored-differences.xml b/proto-google-cloud-talent-v4beta1/clirr-ignored-differences.xml index 9fe3cad6..79eb7459 100644 --- a/proto-google-cloud-talent-v4beta1/clirr-ignored-differences.xml +++ b/proto-google-cloud-talent-v4beta1/clirr-ignored-differences.xml @@ -1,6 +1,7 @@ + 7012 com/google/cloud/talent/v4beta1/*OrBuilder @@ -16,4 +17,77 @@ com/google/cloud/talent/v4beta1/*OrBuilder boolean has*(*) + + 8001 + com/google/cloud/talent/v4beta1/TenantOrProjectName + + + 8001 + com/google/cloud/talent/v4beta1/TenantOrProjectNames + + + 8001 + com/google/cloud/talent/v4beta1/UntypedTenantOrProjectName + + + 8001 + com/google/cloud/talent/v4beta1/CompanyWithTenantName + + + 8001 + com/google/cloud/talent/v4beta1/CompanyWithoutTenantName + + + 8001 + com/google/cloud/talent/v4beta1/CompanyOldName + + + 8001 + com/google/cloud/talent/v4beta1/CompanyNewName + + + 8001 + com/google/cloud/talent/v4beta1/CompanyNames + + + 8001 + com/google/cloud/talent/v4beta1/UntypedCompanyName + + + 8001 + com/google/cloud/talent/v4beta1/JobWithTenantName + + + 8001 + com/google/cloud/talent/v4beta1/JobWithoutTenantName + + + 8001 + com/google/cloud/talent/v4beta1/JobOldName + + + 8001 + com/google/cloud/talent/v4beta1/JobNewName + + + 8001 + com/google/cloud/talent/v4beta1/UntypedJobName + + + 8001 + com/google/cloud/talent/v4beta1/JobNames + + + 8001 + com/google/cloud/talent/v4beta1/UntypedTenantName + + + 8001 + com/google/cloud/talent/v4beta1/*Name$Builder + + + 5001 + com/google/cloud/talent/v4beta1/*Name + com/google/cloud/talent/v4beta1/TenantOrProjectName + diff --git a/proto-google-cloud-talent-v4beta1/pom.xml b/proto-google-cloud-talent-v4beta1/pom.xml index 17f9d494..5443827b 100644 --- a/proto-google-cloud-talent-v4beta1/pom.xml +++ b/proto-google-cloud-talent-v4beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-talent-v4beta1 - 0.35.2-beta + 0.36.0 proto-google-cloud-talent-v4beta1 PROTO library for proto-google-cloud-talent-v4beta1 com.google.cloud google-cloud-talent-parent - 0.35.2-beta + 0.36.0 diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/Application.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/Application.java index e1c9d132..81a3eec7 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/Application.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/Application.java @@ -941,14 +941,15 @@ public com.google.protobuf.ByteString getProfileBytes() { * * *
-   * One of either a job or a company is required.
-   * Resource name of the job which the candidate applied for.
+   * Required. Resource name of the job which the candidate applied for.
    * The format is
    * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example,
    * "projects/foo/tenants/bar/jobs/baz".
    * 
* - * string job = 4 [(.google.api.resource_reference) = { ... } + * + * string job = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The job. */ @@ -967,14 +968,15 @@ public java.lang.String getJob() { * * *
-   * One of either a job or a company is required.
-   * Resource name of the job which the candidate applied for.
+   * Required. Resource name of the job which the candidate applied for.
    * The format is
    * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example,
    * "projects/foo/tenants/bar/jobs/baz".
    * 
* - * string job = 4 [(.google.api.resource_reference) = { ... } + * + * string job = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for job. */ @@ -996,7 +998,6 @@ public com.google.protobuf.ByteString getJobBytes() { * * *
-   * One of either a job or a company is required.
    * Resource name of the company which the candidate applied for.
    * The format is
    * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}".
@@ -1022,7 +1023,6 @@ public java.lang.String getCompany() {
    *
    *
    * 
-   * One of either a job or a company is required.
    * Resource name of the company which the candidate applied for.
    * The format is
    * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}".
@@ -1094,8 +1094,8 @@ public com.google.type.DateOrBuilder getApplicationDateOrBuilder() {
    *
    *
    * 
-   * Required. What is the most recent stage of the application (that is, new, screen,
-   * send cv, hired, finished work)?  This field is intentionally not
+   * Required. What is the most recent stage of the application (that is, new,
+   * screen, send cv, hired, finished work)?  This field is intentionally not
    * comprehensive of every possible status, but instead, represents statuses
    * that would be used to indicate to the ML models good / bad matches.
    * 
@@ -1113,8 +1113,8 @@ public int getStageValue() { * * *
-   * Required. What is the most recent stage of the application (that is, new, screen,
-   * send cv, hired, finished work)?  This field is intentionally not
+   * Required. What is the most recent stage of the application (that is, new,
+   * screen, send cv, hired, finished work)?  This field is intentionally not
    * comprehensive of every possible status, but instead, represents statuses
    * that would be used to indicate to the ML models good / bad matches.
    * 
@@ -2599,14 +2599,15 @@ public Builder setProfileBytes(com.google.protobuf.ByteString value) { * * *
-     * One of either a job or a company is required.
-     * Resource name of the job which the candidate applied for.
+     * Required. Resource name of the job which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example,
      * "projects/foo/tenants/bar/jobs/baz".
      * 
* - * string job = 4 [(.google.api.resource_reference) = { ... } + * + * string job = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The job. */ @@ -2625,14 +2626,15 @@ public java.lang.String getJob() { * * *
-     * One of either a job or a company is required.
-     * Resource name of the job which the candidate applied for.
+     * Required. Resource name of the job which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example,
      * "projects/foo/tenants/bar/jobs/baz".
      * 
* - * string job = 4 [(.google.api.resource_reference) = { ... } + * + * string job = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for job. */ @@ -2651,14 +2653,15 @@ public com.google.protobuf.ByteString getJobBytes() { * * *
-     * One of either a job or a company is required.
-     * Resource name of the job which the candidate applied for.
+     * Required. Resource name of the job which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example,
      * "projects/foo/tenants/bar/jobs/baz".
      * 
* - * string job = 4 [(.google.api.resource_reference) = { ... } + * + * string job = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The job to set. * @return This builder for chaining. @@ -2676,14 +2679,15 @@ public Builder setJob(java.lang.String value) { * * *
-     * One of either a job or a company is required.
-     * Resource name of the job which the candidate applied for.
+     * Required. Resource name of the job which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example,
      * "projects/foo/tenants/bar/jobs/baz".
      * 
* - * string job = 4 [(.google.api.resource_reference) = { ... } + * + * string job = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -2697,14 +2701,15 @@ public Builder clearJob() { * * *
-     * One of either a job or a company is required.
-     * Resource name of the job which the candidate applied for.
+     * Required. Resource name of the job which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example,
      * "projects/foo/tenants/bar/jobs/baz".
      * 
* - * string job = 4 [(.google.api.resource_reference) = { ... } + * + * string job = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for job to set. * @return This builder for chaining. @@ -2725,7 +2730,6 @@ public Builder setJobBytes(com.google.protobuf.ByteString value) { * * *
-     * One of either a job or a company is required.
      * Resource name of the company which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}".
@@ -2751,7 +2755,6 @@ public java.lang.String getCompany() {
      *
      *
      * 
-     * One of either a job or a company is required.
      * Resource name of the company which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}".
@@ -2777,7 +2780,6 @@ public com.google.protobuf.ByteString getCompanyBytes() {
      *
      *
      * 
-     * One of either a job or a company is required.
      * Resource name of the company which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}".
@@ -2802,7 +2804,6 @@ public Builder setCompany(java.lang.String value) {
      *
      *
      * 
-     * One of either a job or a company is required.
      * Resource name of the company which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}".
@@ -2823,7 +2824,6 @@ public Builder clearCompany() {
      *
      *
      * 
-     * One of either a job or a company is required.
      * Resource name of the company which the candidate applied for.
      * The format is
      * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}".
@@ -3028,8 +3028,8 @@ public com.google.type.DateOrBuilder getApplicationDateOrBuilder() {
      *
      *
      * 
-     * Required. What is the most recent stage of the application (that is, new, screen,
-     * send cv, hired, finished work)?  This field is intentionally not
+     * Required. What is the most recent stage of the application (that is, new,
+     * screen, send cv, hired, finished work)?  This field is intentionally not
      * comprehensive of every possible status, but instead, represents statuses
      * that would be used to indicate to the ML models good / bad matches.
      * 
@@ -3047,8 +3047,8 @@ public int getStageValue() { * * *
-     * Required. What is the most recent stage of the application (that is, new, screen,
-     * send cv, hired, finished work)?  This field is intentionally not
+     * Required. What is the most recent stage of the application (that is, new,
+     * screen, send cv, hired, finished work)?  This field is intentionally not
      * comprehensive of every possible status, but instead, represents statuses
      * that would be used to indicate to the ML models good / bad matches.
      * 
@@ -3069,8 +3069,8 @@ public Builder setStageValue(int value) { * * *
-     * Required. What is the most recent stage of the application (that is, new, screen,
-     * send cv, hired, finished work)?  This field is intentionally not
+     * Required. What is the most recent stage of the application (that is, new,
+     * screen, send cv, hired, finished work)?  This field is intentionally not
      * comprehensive of every possible status, but instead, represents statuses
      * that would be used to indicate to the ML models good / bad matches.
      * 
@@ -3093,8 +3093,8 @@ public com.google.cloud.talent.v4beta1.Application.ApplicationStage getStage() { * * *
-     * Required. What is the most recent stage of the application (that is, new, screen,
-     * send cv, hired, finished work)?  This field is intentionally not
+     * Required. What is the most recent stage of the application (that is, new,
+     * screen, send cv, hired, finished work)?  This field is intentionally not
      * comprehensive of every possible status, but instead, represents statuses
      * that would be used to indicate to the ML models good / bad matches.
      * 
@@ -3119,8 +3119,8 @@ public Builder setStage(com.google.cloud.talent.v4beta1.Application.ApplicationS * * *
-     * Required. What is the most recent stage of the application (that is, new, screen,
-     * send cv, hired, finished work)?  This field is intentionally not
+     * Required. What is the most recent stage of the application (that is, new,
+     * screen, send cv, hired, finished work)?  This field is intentionally not
      * comprehensive of every possible status, but instead, represents statuses
      * that would be used to indicate to the ML models good / bad matches.
      * 
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationOrBuilder.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationOrBuilder.java index 4830d364..964c08a0 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationOrBuilder.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationOrBuilder.java @@ -120,14 +120,15 @@ public interface ApplicationOrBuilder * * *
-   * One of either a job or a company is required.
-   * Resource name of the job which the candidate applied for.
+   * Required. Resource name of the job which the candidate applied for.
    * The format is
    * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example,
    * "projects/foo/tenants/bar/jobs/baz".
    * 
* - * string job = 4 [(.google.api.resource_reference) = { ... } + * + * string job = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The job. */ @@ -136,14 +137,15 @@ public interface ApplicationOrBuilder * * *
-   * One of either a job or a company is required.
-   * Resource name of the job which the candidate applied for.
+   * Required. Resource name of the job which the candidate applied for.
    * The format is
    * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example,
    * "projects/foo/tenants/bar/jobs/baz".
    * 
* - * string job = 4 [(.google.api.resource_reference) = { ... } + * + * string job = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for job. */ @@ -153,7 +155,6 @@ public interface ApplicationOrBuilder * * *
-   * One of either a job or a company is required.
    * Resource name of the company which the candidate applied for.
    * The format is
    * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}".
@@ -169,7 +170,6 @@ public interface ApplicationOrBuilder
    *
    *
    * 
-   * One of either a job or a company is required.
    * Resource name of the company which the candidate applied for.
    * The format is
    * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}".
@@ -221,8 +221,8 @@ public interface ApplicationOrBuilder
    *
    *
    * 
-   * Required. What is the most recent stage of the application (that is, new, screen,
-   * send cv, hired, finished work)?  This field is intentionally not
+   * Required. What is the most recent stage of the application (that is, new,
+   * screen, send cv, hired, finished work)?  This field is intentionally not
    * comprehensive of every possible status, but instead, represents statuses
    * that would be used to indicate to the ML models good / bad matches.
    * 
@@ -238,8 +238,8 @@ public interface ApplicationOrBuilder * * *
-   * Required. What is the most recent stage of the application (that is, new, screen,
-   * send cv, hired, finished work)?  This field is intentionally not
+   * Required. What is the most recent stage of the application (that is, new,
+   * screen, send cv, hired, finished work)?  This field is intentionally not
    * comprehensive of every possible status, but instead, represents statuses
    * that would be used to indicate to the ML models good / bad matches.
    * 
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationResourceProto.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationResourceProto.java index 3b7907c5..21f45de0 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationResourceProto.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationResourceProto.java @@ -41,58 +41,58 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n-google/cloud/talent/v4beta1/applicatio" - + "n.proto\022\033google.cloud.talent.v4beta1\032\037go" - + "ogle/api/field_behavior.proto\032\031google/ap" - + "i/resource.proto\032(google/cloud/talent/v4" - + "beta1/common.proto\032\037google/protobuf/time" - + "stamp.proto\032\036google/protobuf/wrappers.pr" - + "oto\032\026google/type/date.proto\032\034google/api/" - + "annotations.proto\"\231\t\n\013Application\022\014\n\004nam" + + "n.proto\022\033google.cloud.talent.v4beta1\032\034go" + + "ogle/api/annotations.proto\032\037google/api/f" + + "ield_behavior.proto\032\031google/api/resource" + + ".proto\032(google/cloud/talent/v4beta1/comm" + + "on.proto\032\037google/protobuf/timestamp.prot" + + "o\032\036google/protobuf/wrappers.proto\032\026googl" + + "e/type/date.proto\"\234\t\n\013Application\022\014\n\004nam" + "e\030\001 \001(\t\022\030\n\013external_id\030\037 \001(\tB\003\340A\002\022\024\n\007pro" - + "file\030\002 \001(\tB\003\340A\003\022)\n\003job\030\004 \001(\tB\034\372A\031\n\027jobs." - + "googleapis.com/Job\0221\n\007company\030\005 \001(\tB \372A\035" - + "\n\033jobs.googleapis.com/Company\022+\n\020applica" - + "tion_date\030\007 \001(\0132\021.google.type.Date\022M\n\005st" - + "age\030\013 \001(\01629.google.cloud.talent.v4beta1." - + "Application.ApplicationStageB\003\340A\002\022H\n\005sta" - + "te\030\r \001(\01629.google.cloud.talent.v4beta1.A" - + "pplication.ApplicationState\022:\n\ninterview" - + "s\030\020 \003(\0132&.google.cloud.talent.v4beta1.In" - + "terview\022,\n\010referral\030\022 \001(\0132\032.google.proto" - + "buf.BoolValue\0224\n\013create_time\030\023 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\002\022/\n\013update_ti" - + "me\030\024 \001(\0132\032.google.protobuf.Timestamp\022\025\n\r" - + "outcome_notes\030\025 \001(\t\0225\n\007outcome\030\026 \001(\0162$.g" - + "oogle.cloud.talent.v4beta1.Outcome\0221\n\010is" - + "_match\030\034 \001(\0132\032.google.protobuf.BoolValue" - + "B\003\340A\003\022\036\n\021job_title_snippet\030\035 \001(\tB\003\340A\003\"\220\001" - + "\n\020ApplicationState\022!\n\035APPLICATION_STATE_" - + "UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\026\n\022CANDID" - + "ATE_WITHDREW\020\002\022\025\n\021EMPLOYER_WITHDREW\020\003\022\r\n" - + "\tCOMPLETED\020\004\022\n\n\006CLOSED\020\005\"\251\001\n\020Application" - + "Stage\022!\n\035APPLICATION_STAGE_UNSPECIFIED\020\000" - + "\022\007\n\003NEW\020\001\022\n\n\006SCREEN\020\002\022\031\n\025HIRING_MANAGER_" - + "REVIEW\020\003\022\r\n\tINTERVIEW\020\004\022\022\n\016OFFER_EXTENDE" - + "D\020\005\022\022\n\016OFFER_ACCEPTED\020\006\022\013\n\007STARTED\020\007:w\352A" - + "t\n\037jobs.googleapis.com/Application\022Qproj" - + "ects/{project}/tenants/{tenant}/profiles" - + "/{profile}/applications/{application}B\206\001" - + "\n\037com.google.cloud.talent.v4beta1B\030Appli" - + "cationResourceProtoP\001ZAgoogle.golang.org" - + "/genproto/googleapis/cloud/talent/v4beta" - + "1;talent\242\002\003CTSb\006proto3" + + "file\030\002 \001(\tB\003\340A\003\022,\n\003job\030\004 \001(\tB\037\372A\031\n\027jobs." + + "googleapis.com/Job\340A\002\0221\n\007company\030\005 \001(\tB " + + "\372A\035\n\033jobs.googleapis.com/Company\022+\n\020appl" + + "ication_date\030\007 \001(\0132\021.google.type.Date\022M\n" + + "\005stage\030\013 \001(\01629.google.cloud.talent.v4bet" + + "a1.Application.ApplicationStageB\003\340A\002\022H\n\005" + + "state\030\r \001(\01629.google.cloud.talent.v4beta" + + "1.Application.ApplicationState\022:\n\ninterv" + + "iews\030\020 \003(\0132&.google.cloud.talent.v4beta1" + + ".Interview\022,\n\010referral\030\022 \001(\0132\032.google.pr" + + "otobuf.BoolValue\0224\n\013create_time\030\023 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\002\022/\n\013update" + + "_time\030\024 \001(\0132\032.google.protobuf.Timestamp\022" + + "\025\n\routcome_notes\030\025 \001(\t\0225\n\007outcome\030\026 \001(\0162" + + "$.google.cloud.talent.v4beta1.Outcome\0221\n" + + "\010is_match\030\034 \001(\0132\032.google.protobuf.BoolVa" + + "lueB\003\340A\003\022\036\n\021job_title_snippet\030\035 \001(\tB\003\340A\003" + + "\"\220\001\n\020ApplicationState\022!\n\035APPLICATION_STA" + + "TE_UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\026\n\022CAN" + + "DIDATE_WITHDREW\020\002\022\025\n\021EMPLOYER_WITHDREW\020\003" + + "\022\r\n\tCOMPLETED\020\004\022\n\n\006CLOSED\020\005\"\251\001\n\020Applicat" + + "ionStage\022!\n\035APPLICATION_STAGE_UNSPECIFIE" + + "D\020\000\022\007\n\003NEW\020\001\022\n\n\006SCREEN\020\002\022\031\n\025HIRING_MANAG" + + "ER_REVIEW\020\003\022\r\n\tINTERVIEW\020\004\022\022\n\016OFFER_EXTE" + + "NDED\020\005\022\022\n\016OFFER_ACCEPTED\020\006\022\013\n\007STARTED\020\007:" + + "w\352At\n\037jobs.googleapis.com/Application\022Qp" + + "rojects/{project}/tenants/{tenant}/profi" + + "les/{profile}/applications/{application}" + + "B\206\001\n\037com.google.cloud.talent.v4beta1B\030Ap" + + "plicationResourceProtoP\001ZAgoogle.golang." + + "org/genproto/googleapis/cloud/talent/v4b" + + "eta1;talent\242\002\003CTSb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.talent.v4beta1.CommonProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), com.google.type.DateProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_talent_v4beta1_Application_descriptor = getDescriptor().getMessageTypes().get(0); @@ -124,13 +124,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.talent.v4beta1.CommonProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.WrappersProto.getDescriptor(); com.google.type.DateProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyName.java index c400264a..0a068208 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyName.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyName.java @@ -16,10 +16,276 @@ package com.google.cloud.talent.v4beta1; +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.Map; +import java.util.Objects; /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class CompanyName implements ResourceName { +public class CompanyName implements ResourceName { + + @Deprecated protected CompanyName() {} + + private static final PathTemplate PROJECT_COMPANY_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/companies/{company}"); + private static final PathTemplate PROJECT_TENANT_COMPANY_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/tenants/{tenant}/companies/{company}"); + + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + + private String project; + private String company; + private String tenant; + + public String getProject() { + return project; + } + + public String getCompany() { + return company; + } + + public String getTenant() { + return tenant; + } + + private CompanyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + company = Preconditions.checkNotNull(builder.getCompany()); + pathTemplate = PROJECT_COMPANY_PATH_TEMPLATE; + } + + private CompanyName(ProjectTenantCompanyBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + tenant = Preconditions.checkNotNull(builder.getTenant()); + company = Preconditions.checkNotNull(builder.getCompany()); + pathTemplate = PROJECT_TENANT_COMPANY_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectCompanyBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectTenantCompanyBuilder newProjectTenantCompanyBuilder() { + return new ProjectTenantCompanyBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CompanyName of(String project, String company) { + return newProjectCompanyBuilder().setProject(project).setCompany(company).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static CompanyName ofProjectCompanyName(String project, String company) { + return newProjectCompanyBuilder().setProject(project).setCompany(company).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static CompanyName ofProjectTenantCompanyName( + String project, String tenant, String company) { + return newProjectTenantCompanyBuilder() + .setProject(project) + .setTenant(tenant) + .setCompany(company) + .build(); + } + + public static String format(String project, String company) { + return newBuilder().setProject(project).setCompany(company).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectCompanyName(String project, String company) { + return newBuilder().setProject(project).setCompany(company).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectTenantCompanyName( + String project, String tenant, String company) { + return newProjectTenantCompanyBuilder() + .setProject(project) + .setTenant(tenant) + .setCompany(company) + .build() + .toString(); + } + + public static CompanyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_COMPANY_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_COMPANY_PATH_TEMPLATE.match(formattedString); + return ofProjectCompanyName(matchMap.get("project"), matchMap.get("company")); + } else if (PROJECT_TENANT_COMPANY_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_TENANT_COMPANY_PATH_TEMPLATE.match(formattedString); + return ofProjectTenantCompanyName( + matchMap.get("project"), matchMap.get("tenant"), matchMap.get("company")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_COMPANY_PATH_TEMPLATE.matches(formattedString) + || PROJECT_TENANT_COMPANY_PATH_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (company != null) { + fieldMapBuilder.put("company", company); + } + if (tenant != null) { + fieldMapBuilder.put("tenant", tenant); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + /** Builder for projects/{project}/companies/{company}. */ + public static class Builder { + + private String project; + private String company; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getCompany() { + return company; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setCompany(String company) { + this.company = company; + return this; + } + + private Builder(CompanyName companyName) { + Preconditions.checkArgument( + companyName.pathTemplate == PROJECT_COMPANY_PATH_TEMPLATE, + "toBuilder is only supported when CompanyName has the pattern of " + + "projects/{project}/companies/{company}."); + project = companyName.project; + company = companyName.company; + } + + public CompanyName build() { + return new CompanyName(this); + } + } + + /** Builder for projects/{project}/tenants/{tenant}/companies/{company}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectTenantCompanyBuilder { + + private String project; + private String tenant; + private String company; + + private ProjectTenantCompanyBuilder() {} + + public String getProject() { + return project; + } + + public String getTenant() { + return tenant; + } + + public String getCompany() { + return company; + } + + public ProjectTenantCompanyBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectTenantCompanyBuilder setTenant(String tenant) { + this.tenant = tenant; + return this; + } + + public ProjectTenantCompanyBuilder setCompany(String company) { + this.company = company; + return this; + } + + public CompanyName build() { + return new CompanyName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + CompanyName that = (CompanyName) o; + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.company, that.company)) + && (Objects.equals(this.tenant, that.tenant)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(company); + h *= 1000003; + h ^= Objects.hashCode(tenant); + return h; + } } diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyNames.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyNames.java deleted file mode 100644 index d7e6d73c..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyNames.java +++ /dev/null @@ -1,38 +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 - * - * 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.talent.v4beta1; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class CompanyNames { - private CompanyNames() {} - - public static CompanyName parse(String resourceNameString) { - if (CompanyWithTenantName.isParsableFrom(resourceNameString)) { - return CompanyWithTenantName.parse(resourceNameString); - } - if (CompanyWithoutTenantName.isParsableFrom(resourceNameString)) { - return CompanyWithoutTenantName.parse(resourceNameString); - } - return UntypedCompanyName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyNewName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyNewName.java deleted file mode 100644 index 5a61a8d7..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyNewName.java +++ /dev/null @@ -1,209 +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 - * - * 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.talent.v4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -@javax.annotation.Generated("by GAPIC protoc plugin") -public class CompanyNewName extends CompanyName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/tenants/{tenant}/companies/{company}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String tenant; - private final String company; - - public String getProject() { - return project; - } - - public String getTenant() { - return tenant; - } - - public String getCompany() { - return company; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private CompanyNewName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - tenant = Preconditions.checkNotNull(builder.getTenant()); - company = Preconditions.checkNotNull(builder.getCompany()); - } - - public static CompanyNewName of(String project, String tenant, String company) { - return newBuilder().setProject(project).setTenant(tenant).setCompany(company).build(); - } - - public static String format(String project, String tenant, String company) { - return newBuilder() - .setProject(project) - .setTenant(tenant) - .setCompany(company) - .build() - .toString(); - } - - public static CompanyNewName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "CompanyNewName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("tenant"), matchMap.get("company")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (CompanyNewName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("tenant", tenant); - fieldMapBuilder.put("company", company); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "tenant", tenant, "company", company); - } - - /** Builder for CompanyNewName. */ - public static class Builder { - - private String project; - private String tenant; - private String company; - - public String getProject() { - return project; - } - - public String getTenant() { - return tenant; - } - - public String getCompany() { - return company; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setTenant(String tenant) { - this.tenant = tenant; - return this; - } - - public Builder setCompany(String company) { - this.company = company; - return this; - } - - private Builder() {} - - private Builder(CompanyNewName companyNewName) { - project = companyNewName.project; - tenant = companyNewName.tenant; - company = companyNewName.company; - } - - public CompanyNewName build() { - return new CompanyNewName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof CompanyNewName) { - CompanyNewName that = (CompanyNewName) o; - return (this.project.equals(that.project)) - && (this.tenant.equals(that.tenant)) - && (this.company.equals(that.company)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= tenant.hashCode(); - h *= 1000003; - h ^= company.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyOldName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyOldName.java deleted file mode 100644 index 4b05b8e1..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyOldName.java +++ /dev/null @@ -1,181 +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 - * - * 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.talent.v4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -@javax.annotation.Generated("by GAPIC protoc plugin") -public class CompanyOldName extends CompanyName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/companies/{company}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String company; - - public String getProject() { - return project; - } - - public String getCompany() { - return company; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private CompanyOldName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - company = Preconditions.checkNotNull(builder.getCompany()); - } - - public static CompanyOldName of(String project, String company) { - return newBuilder().setProject(project).setCompany(company).build(); - } - - public static String format(String project, String company) { - return newBuilder().setProject(project).setCompany(company).build().toString(); - } - - public static CompanyOldName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "CompanyOldName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("company")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (CompanyOldName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("company", company); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "company", company); - } - - /** Builder for CompanyOldName. */ - public static class Builder { - - private String project; - private String company; - - public String getProject() { - return project; - } - - public String getCompany() { - return company; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setCompany(String company) { - this.company = company; - return this; - } - - private Builder() {} - - private Builder(CompanyOldName companyOldName) { - project = companyOldName.project; - company = companyOldName.company; - } - - public CompanyOldName build() { - return new CompanyOldName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof CompanyOldName) { - CompanyOldName that = (CompanyOldName) o; - return (this.project.equals(that.project)) && (this.company.equals(that.company)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= company.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceProto.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceProto.java index a01cd92c..41feb9ae 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceProto.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceProto.java @@ -79,49 +79,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" + "eldMask\"I\n\024DeleteCompanyRequest\0221\n\004name\030" + "\001 \001(\tB#\340A\002\372A\035\n\033jobs.googleapis.com/Compa" - + "ny\"\225\001\n\024ListCompaniesRequest\022;\n\006parent\030\001 " - + "\001(\tB+\340A\002\372A%\n#jobs.googleapis.com/TenantO" - + "rProject\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_siz" - + "e\030\003 \001(\005\022\031\n\021require_open_jobs\030\004 \001(\010\"\252\001\n\025L" - + "istCompaniesResponse\0227\n\tcompanies\030\001 \003(\0132" - + "$.google.cloud.talent.v4beta1.Company\022\027\n" - + "\017next_page_token\030\002 \001(\t\022?\n\010metadata\030\003 \001(\013" - + "2-.google.cloud.talent.v4beta1.ResponseM" - + "etadata2\322\t\n\016CompanyService\022\343\001\n\rCreateCom" - + "pany\0221.google.cloud.talent.v4beta1.Creat" - + "eCompanyRequest\032$.google.cloud.talent.v4" - + "beta1.Company\"y\202\323\344\223\002b\"0/v4beta1/{parent=" - + "projects/*/tenants/*}/companies:\001*Z+\"&/v" - + "4beta1/{parent=projects/*}/companies:\001*\332" - + "A\016parent,company\022\315\001\n\nGetCompany\022..google" - + ".cloud.talent.v4beta1.GetCompanyRequest\032" - + "$.google.cloud.talent.v4beta1.Company\"i\202" - + "\323\344\223\002\\\0220/v4beta1/{name=projects/*/tenants" - + "/*/companies/*}Z(\022&/v4beta1/{name=projec" - + "ts/*/companies/*}\332A\004name\022\355\001\n\rUpdateCompa" - + "ny\0221.google.cloud.talent.v4beta1.UpdateC" - + "ompanyRequest\032$.google.cloud.talent.v4be" - + "ta1.Company\"\202\001\202\323\344\223\002r28/v4beta1/{company." - + "name=projects/*/tenants/*/companies/*}:\001" - + "*Z32./v4beta1/{company.name=projects/*/c" - + "ompanies/*}:\001*\332A\007company\022\305\001\n\rDeleteCompa" - + "ny\0221.google.cloud.talent.v4beta1.DeleteC" - + "ompanyRequest\032\026.google.protobuf.Empty\"i\202" - + "\323\344\223\002\\*0/v4beta1/{name=projects/*/tenants" - + "/*/companies/*}Z(*&/v4beta1/{name=projec" - + "ts/*/companies/*}\332A\004name\022\343\001\n\rListCompani" - + "es\0221.google.cloud.talent.v4beta1.ListCom" - + "paniesRequest\0322.google.cloud.talent.v4be" - + "ta1.ListCompaniesResponse\"k\202\323\344\223\002\\\0220/v4be" - + "ta1/{parent=projects/*/tenants/*}/compan" - + "iesZ(\022&/v4beta1/{parent=projects/*}/comp" - + "anies\332A\006parent\032l\312A\023jobs.googleapis.com\322A" - + "Shttps://www.googleapis.com/auth/cloud-p" - + "latform,https://www.googleapis.com/auth/" - + "jobsB\201\001\n\037com.google.cloud.talent.v4beta1" - + "B\023CompanyServiceProtoP\001ZAgoogle.golang.o" - + "rg/genproto/googleapis/cloud/talent/v4be" - + "ta1;talent\242\002\003CTSb\006proto3" + + "ny\"\215\001\n\024ListCompaniesRequest\0223\n\006parent\030\001 " + + "\001(\tB#\340A\002\372A\035\022\033jobs.googleapis.com/Company" + + "\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022" + + "\031\n\021require_open_jobs\030\004 \001(\010\"\252\001\n\025ListCompa" + + "niesResponse\0227\n\tcompanies\030\001 \003(\0132$.google" + + ".cloud.talent.v4beta1.Company\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t\022?\n\010metadata\030\003 \001(\0132-.googl" + + "e.cloud.talent.v4beta1.ResponseMetadata2" + + "\322\t\n\016CompanyService\022\343\001\n\rCreateCompany\0221.g" + + "oogle.cloud.talent.v4beta1.CreateCompany" + + "Request\032$.google.cloud.talent.v4beta1.Co" + + "mpany\"y\202\323\344\223\002b\"0/v4beta1/{parent=projects" + + "/*/tenants/*}/companies:\001*Z+\"&/v4beta1/{" + + "parent=projects/*}/companies:\001*\332A\016parent" + + ",company\022\315\001\n\nGetCompany\022..google.cloud.t" + + "alent.v4beta1.GetCompanyRequest\032$.google" + + ".cloud.talent.v4beta1.Company\"i\202\323\344\223\002\\\0220/" + + "v4beta1/{name=projects/*/tenants/*/compa" + + "nies/*}Z(\022&/v4beta1/{name=projects/*/com" + + "panies/*}\332A\004name\022\355\001\n\rUpdateCompany\0221.goo" + + "gle.cloud.talent.v4beta1.UpdateCompanyRe" + + "quest\032$.google.cloud.talent.v4beta1.Comp" + + "any\"\202\001\202\323\344\223\002r28/v4beta1/{company.name=pro" + + "jects/*/tenants/*/companies/*}:\001*Z32./v4" + + "beta1/{company.name=projects/*/companies" + + "/*}:\001*\332A\007company\022\305\001\n\rDeleteCompany\0221.goo" + + "gle.cloud.talent.v4beta1.DeleteCompanyRe" + + "quest\032\026.google.protobuf.Empty\"i\202\323\344\223\002\\*0/" + + "v4beta1/{name=projects/*/tenants/*/compa" + + "nies/*}Z(*&/v4beta1/{name=projects/*/com" + + "panies/*}\332A\004name\022\343\001\n\rListCompanies\0221.goo" + + "gle.cloud.talent.v4beta1.ListCompaniesRe" + + "quest\0322.google.cloud.talent.v4beta1.List" + + "CompaniesResponse\"k\202\323\344\223\002\\\0220/v4beta1/{par" + + "ent=projects/*/tenants/*}/companiesZ(\022&/" + + "v4beta1/{parent=projects/*}/companies\332A\006" + + "parent\032l\312A\023jobs.googleapis.com\322AShttps:/" + + "/www.googleapis.com/auth/cloud-platform," + + "https://www.googleapis.com/auth/jobsB\201\001\n" + + "\037com.google.cloud.talent.v4beta1B\023Compan" + + "yServiceProtoP\001ZAgoogle.golang.org/genpr" + + "oto/googleapis/cloud/talent/v4beta1;tale" + + "nt\242\002\003CTSb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyWithTenantName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyWithTenantName.java deleted file mode 100644 index ecef2fe1..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyWithTenantName.java +++ /dev/null @@ -1,214 +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 - * - * 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.talent.v4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class CompanyWithTenantName extends CompanyName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/tenants/{tenant}/companies/{company}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String tenant; - private final String company; - - public String getProject() { - return project; - } - - public String getTenant() { - return tenant; - } - - public String getCompany() { - return company; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private CompanyWithTenantName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - tenant = Preconditions.checkNotNull(builder.getTenant()); - company = Preconditions.checkNotNull(builder.getCompany()); - } - - public static CompanyWithTenantName of(String project, String tenant, String company) { - return newBuilder().setProject(project).setTenant(tenant).setCompany(company).build(); - } - - public static String format(String project, String tenant, String company) { - return newBuilder() - .setProject(project) - .setTenant(tenant) - .setCompany(company) - .build() - .toString(); - } - - public static CompanyWithTenantName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "CompanyWithTenantName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("tenant"), matchMap.get("company")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (CompanyWithTenantName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("tenant", tenant); - fieldMapBuilder.put("company", company); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "tenant", tenant, "company", company); - } - - /** Builder for CompanyWithTenantName. */ - public static class Builder { - - private String project; - private String tenant; - private String company; - - public String getProject() { - return project; - } - - public String getTenant() { - return tenant; - } - - public String getCompany() { - return company; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setTenant(String tenant) { - this.tenant = tenant; - return this; - } - - public Builder setCompany(String company) { - this.company = company; - return this; - } - - private Builder() {} - - private Builder(CompanyWithTenantName companyWithTenantName) { - project = companyWithTenantName.project; - tenant = companyWithTenantName.tenant; - company = companyWithTenantName.company; - } - - public CompanyWithTenantName build() { - return new CompanyWithTenantName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof CompanyWithTenantName) { - CompanyWithTenantName that = (CompanyWithTenantName) o; - return (this.project.equals(that.project)) - && (this.tenant.equals(that.tenant)) - && (this.company.equals(that.company)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= tenant.hashCode(); - h *= 1000003; - h ^= company.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyWithoutTenantName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyWithoutTenantName.java deleted file mode 100644 index 3aa59b78..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyWithoutTenantName.java +++ /dev/null @@ -1,186 +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 - * - * 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.talent.v4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class CompanyWithoutTenantName extends CompanyName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/companies/{company}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String company; - - public String getProject() { - return project; - } - - public String getCompany() { - return company; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private CompanyWithoutTenantName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - company = Preconditions.checkNotNull(builder.getCompany()); - } - - public static CompanyWithoutTenantName of(String project, String company) { - return newBuilder().setProject(project).setCompany(company).build(); - } - - public static String format(String project, String company) { - return newBuilder().setProject(project).setCompany(company).build().toString(); - } - - public static CompanyWithoutTenantName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "CompanyWithoutTenantName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("company")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (CompanyWithoutTenantName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("company", company); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "company", company); - } - - /** Builder for CompanyWithoutTenantName. */ - public static class Builder { - - private String project; - private String company; - - public String getProject() { - return project; - } - - public String getCompany() { - return company; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setCompany(String company) { - this.company = company; - return this; - } - - private Builder() {} - - private Builder(CompanyWithoutTenantName companyWithoutTenantName) { - project = companyWithoutTenantName.project; - company = companyWithoutTenantName.company; - } - - public CompanyWithoutTenantName build() { - return new CompanyWithoutTenantName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof CompanyWithoutTenantName) { - CompanyWithoutTenantName that = (CompanyWithoutTenantName) o; - return (this.project.equals(that.project)) && (this.company.equals(that.company)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= company.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompleteQueryRequest.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompleteQueryRequest.java index 9305471c..60459b39 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompleteQueryRequest.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompleteQueryRequest.java @@ -347,11 +347,8 @@ public enum CompletionType implements com.google.protobuf.ProtocolMessageEnum { * *
      * Suggest job titles for jobs autocomplete.
-     * For
-     * [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE]
-     * type, only open jobs with the same
-     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes]
-     * are returned.
+     * For [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE] type, only open jobs with the same
+     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned.
      * 
* * JOB_TITLE = 1; @@ -362,11 +359,9 @@ public enum CompletionType implements com.google.protobuf.ProtocolMessageEnum { * *
      * Suggest company names for jobs autocomplete.
-     * For
-     * [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME]
-     * type, only companies having open jobs with the same
-     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes]
-     * are returned.
+     * For [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME] type,
+     * only companies having open jobs with the same [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are
+     * returned.
      * 
* * COMPANY_NAME = 2; @@ -377,13 +372,9 @@ public enum CompletionType implements com.google.protobuf.ProtocolMessageEnum { * *
      * Suggest both job titles and company names for jobs autocomplete.
-     * For
-     * [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED]
-     * type, only open jobs with the same
-     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes]
-     * or companies having open jobs with the same
-     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes]
-     * are returned.
+     * For [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED] type, only open jobs with the same
+     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] or companies having open jobs with the same
+     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned.
      * 
* * COMBINED = 3; @@ -407,11 +398,8 @@ public enum CompletionType implements com.google.protobuf.ProtocolMessageEnum { * *
      * Suggest job titles for jobs autocomplete.
-     * For
-     * [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE]
-     * type, only open jobs with the same
-     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes]
-     * are returned.
+     * For [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE] type, only open jobs with the same
+     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned.
      * 
* * JOB_TITLE = 1; @@ -422,11 +410,9 @@ public enum CompletionType implements com.google.protobuf.ProtocolMessageEnum { * *
      * Suggest company names for jobs autocomplete.
-     * For
-     * [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME]
-     * type, only companies having open jobs with the same
-     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes]
-     * are returned.
+     * For [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME] type,
+     * only companies having open jobs with the same [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are
+     * returned.
      * 
* * COMPANY_NAME = 2; @@ -437,13 +423,9 @@ public enum CompletionType implements com.google.protobuf.ProtocolMessageEnum { * *
      * Suggest both job titles and company names for jobs autocomplete.
-     * For
-     * [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED]
-     * type, only open jobs with the same
-     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes]
-     * or companies having open jobs with the same
-     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes]
-     * are returned.
+     * For [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED] type, only open jobs with the same
+     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] or companies having open jobs with the same
+     * [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned.
      * 
* * COMBINED = 3; diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompletionServiceProto.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompletionServiceProto.java index a89a3ce4..63b52425 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompletionServiceProto.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompletionServiceProto.java @@ -54,40 +54,40 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e/api/field_behavior.proto\032\031google/api/r" + "esource.proto\032(google/cloud/talent/v4bet" + "a1/common.proto\032\027google/api/client.proto" - + "\"\233\004\n\024CompleteQueryRequest\022;\n\006parent\030\001 \001(" - + "\tB+\340A\002\372A%\n#jobs.googleapis.com/TenantOrP" - + "roject\022\022\n\005query\030\002 \001(\tB\003\340A\002\022\026\n\016language_c" - + "odes\030\003 \003(\t\022\026\n\tpage_size\030\004 \001(\005B\003\340A\002\0221\n\007co" - + "mpany\030\005 \001(\tB \372A\035\n\033jobs.googleapis.com/Co" - + "mpany\022P\n\005scope\030\006 \001(\0162A.google.cloud.tale" - + "nt.v4beta1.CompleteQueryRequest.Completi" - + "onScope\022N\n\004type\030\007 \001(\0162@.google.cloud.tal" - + "ent.v4beta1.CompleteQueryRequest.Complet" - + "ionType\"K\n\017CompletionScope\022 \n\034COMPLETION" - + "_SCOPE_UNSPECIFIED\020\000\022\n\n\006TENANT\020\001\022\n\n\006PUBL" - + "IC\020\002\"`\n\016CompletionType\022\037\n\033COMPLETION_TYP" - + "E_UNSPECIFIED\020\000\022\r\n\tJOB_TITLE\020\001\022\020\n\014COMPAN" - + "Y_NAME\020\002\022\014\n\010COMBINED\020\003\"\305\002\n\025CompleteQuery" - + "Response\022_\n\022completion_results\030\001 \003(\0132C.g" - + "oogle.cloud.talent.v4beta1.CompleteQuery" - + "Response.CompletionResult\022?\n\010metadata\030\002 " - + "\001(\0132-.google.cloud.talent.v4beta1.Respon" - + "seMetadata\032\211\001\n\020CompletionResult\022\022\n\nsugge" - + "stion\030\001 \001(\t\022N\n\004type\030\002 \001(\0162@.google.cloud" - + ".talent.v4beta1.CompleteQueryRequest.Com" - + "pletionType\022\021\n\timage_uri\030\003 \001(\t2\325\002\n\nCompl" - + "etion\022\330\001\n\rCompleteQuery\0221.google.cloud.t" - + "alent.v4beta1.CompleteQueryRequest\0322.goo" - + "gle.cloud.talent.v4beta1.CompleteQueryRe" - + "sponse\"`\202\323\344\223\002Z\022//v4beta1/{parent=project" - + "s/*/tenants/*}:completeZ\'\022%/v4beta1/{par" - + "ent=projects/*}:complete\032l\312A\023jobs.google" - + "apis.com\322AShttps://www.googleapis.com/au" - + "th/cloud-platform,https://www.googleapis" - + ".com/auth/jobsB\204\001\n\037com.google.cloud.tale" - + "nt.v4beta1B\026CompletionServiceProtoP\001ZAgo" - + "ogle.golang.org/genproto/googleapis/clou" - + "d/talent/v4beta1;talent\242\002\003CTSb\006proto3" + + "\"\223\004\n\024CompleteQueryRequest\0223\n\006parent\030\001 \001(" + + "\tB#\340A\002\372A\035\022\033jobs.googleapis.com/Company\022\022" + + "\n\005query\030\002 \001(\tB\003\340A\002\022\026\n\016language_codes\030\003 \003" + + "(\t\022\026\n\tpage_size\030\004 \001(\005B\003\340A\002\0221\n\007company\030\005 " + + "\001(\tB \372A\035\n\033jobs.googleapis.com/Company\022P\n" + + "\005scope\030\006 \001(\0162A.google.cloud.talent.v4bet" + + "a1.CompleteQueryRequest.CompletionScope\022" + + "N\n\004type\030\007 \001(\0162@.google.cloud.talent.v4be" + + "ta1.CompleteQueryRequest.CompletionType\"" + + "K\n\017CompletionScope\022 \n\034COMPLETION_SCOPE_U" + + "NSPECIFIED\020\000\022\n\n\006TENANT\020\001\022\n\n\006PUBLIC\020\002\"`\n\016" + + "CompletionType\022\037\n\033COMPLETION_TYPE_UNSPEC" + + "IFIED\020\000\022\r\n\tJOB_TITLE\020\001\022\020\n\014COMPANY_NAME\020\002" + + "\022\014\n\010COMBINED\020\003\"\305\002\n\025CompleteQueryResponse" + + "\022_\n\022completion_results\030\001 \003(\0132C.google.cl" + + "oud.talent.v4beta1.CompleteQueryResponse" + + ".CompletionResult\022?\n\010metadata\030\002 \001(\0132-.go" + + "ogle.cloud.talent.v4beta1.ResponseMetada" + + "ta\032\211\001\n\020CompletionResult\022\022\n\nsuggestion\030\001 " + + "\001(\t\022N\n\004type\030\002 \001(\0162@.google.cloud.talent." + + "v4beta1.CompleteQueryRequest.CompletionT" + + "ype\022\021\n\timage_uri\030\003 \001(\t2\325\002\n\nCompletion\022\330\001" + + "\n\rCompleteQuery\0221.google.cloud.talent.v4" + + "beta1.CompleteQueryRequest\0322.google.clou" + + "d.talent.v4beta1.CompleteQueryResponse\"`" + + "\202\323\344\223\002Z\022//v4beta1/{parent=projects/*/tena" + + "nts/*}:completeZ\'\022%/v4beta1/{parent=proj" + + "ects/*}:complete\032l\312A\023jobs.googleapis.com" + + "\322AShttps://www.googleapis.com/auth/cloud" + + "-platform,https://www.googleapis.com/aut" + + "h/jobsB\204\001\n\037com.google.cloud.talent.v4bet" + + "a1B\026CompletionServiceProtoP\001ZAgoogle.gol" + + "ang.org/genproto/googleapis/cloud/talent" + + "/v4beta1;talent\242\002\003CTSb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/EventServiceProto.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/EventServiceProto.java index 22bd6dab..9aeec390 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/EventServiceProto.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/EventServiceProto.java @@ -45,24 +45,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "google/api/annotations.proto\032\027google/api" + "/client.proto\032\037google/api/field_behavior" + ".proto\032\031google/api/resource.proto\032\'googl" - + "e/cloud/talent/v4beta1/event.proto\"\234\001\n\030C" - + "reateClientEventRequest\022;\n\006parent\030\001 \001(\tB" - + "+\340A\002\372A%\n#jobs.googleapis.com/TenantOrPro" - + "ject\022C\n\014client_event\030\002 \001(\0132(.google.clou" - + "d.talent.v4beta1.ClientEventB\003\340A\0022\372\002\n\014Ev" - + "entService\022\373\001\n\021CreateClientEvent\0225.googl" - + "e.cloud.talent.v4beta1.CreateClientEvent" - + "Request\032(.google.cloud.talent.v4beta1.Cl" - + "ientEvent\"\204\001\202\323\344\223\002h\"3/v4beta1/{parent=pro" - + "jects/*/tenants/*}/clientEvents:\001*Z.\")/v" - + "4beta1/{parent=projects/*}/clientEvents:" - + "\001*\332A\023parent,client_event\032l\312A\023jobs.google" - + "apis.com\322AShttps://www.googleapis.com/au" - + "th/cloud-platform,https://www.googleapis" - + ".com/auth/jobsB\177\n\037com.google.cloud.talen" - + "t.v4beta1B\021EventServiceProtoP\001ZAgoogle.g" - + "olang.org/genproto/googleapis/cloud/tale" - + "nt/v4beta1;talent\242\002\003CTSb\006proto3" + + "e/cloud/talent/v4beta1/event.proto\"\224\001\n\030C" + + "reateClientEventRequest\0223\n\006parent\030\001 \001(\tB" + + "#\340A\002\372A\035\022\033jobs.googleapis.com/Company\022C\n\014" + + "client_event\030\002 \001(\0132(.google.cloud.talent" + + ".v4beta1.ClientEventB\003\340A\0022\372\002\n\014EventServi" + + "ce\022\373\001\n\021CreateClientEvent\0225.google.cloud." + + "talent.v4beta1.CreateClientEventRequest\032" + + "(.google.cloud.talent.v4beta1.ClientEven" + + "t\"\204\001\202\323\344\223\002h\"3/v4beta1/{parent=projects/*/" + + "tenants/*}/clientEvents:\001*Z.\")/v4beta1/{" + + "parent=projects/*}/clientEvents:\001*\332A\023par" + + "ent,client_event\032l\312A\023jobs.googleapis.com" + + "\322AShttps://www.googleapis.com/auth/cloud" + + "-platform,https://www.googleapis.com/aut" + + "h/jobsB\177\n\037com.google.cloud.talent.v4beta" + + "1B\021EventServiceProtoP\001ZAgoogle.golang.or" + + "g/genproto/googleapis/cloud/talent/v4bet" + + "a1;talent\242\002\003CTSb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobName.java index c96169b4..89deb63c 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobName.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobName.java @@ -16,10 +16,269 @@ package com.google.cloud.talent.v4beta1; +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.Map; +import java.util.Objects; /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class JobName implements ResourceName { +public class JobName implements ResourceName { + + @Deprecated protected JobName() {} + + private static final PathTemplate PROJECT_JOB_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/jobs/{job}"); + private static final PathTemplate PROJECT_TENANT_JOB_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/tenants/{tenant}/jobs/{job}"); + + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + + private String project; + private String job; + private String tenant; + + public String getProject() { + return project; + } + + public String getJob() { + return job; + } + + public String getTenant() { + return tenant; + } + + private JobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + job = Preconditions.checkNotNull(builder.getJob()); + pathTemplate = PROJECT_JOB_PATH_TEMPLATE; + } + + private JobName(ProjectTenantJobBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + tenant = Preconditions.checkNotNull(builder.getTenant()); + job = Preconditions.checkNotNull(builder.getJob()); + pathTemplate = PROJECT_TENANT_JOB_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectJobBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectTenantJobBuilder newProjectTenantJobBuilder() { + return new ProjectTenantJobBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static JobName of(String project, String job) { + return newProjectJobBuilder().setProject(project).setJob(job).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static JobName ofProjectJobName(String project, String job) { + return newProjectJobBuilder().setProject(project).setJob(job).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static JobName ofProjectTenantJobName(String project, String tenant, String job) { + return newProjectTenantJobBuilder().setProject(project).setTenant(tenant).setJob(job).build(); + } + + public static String format(String project, String job) { + return newBuilder().setProject(project).setJob(job).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectJobName(String project, String job) { + return newBuilder().setProject(project).setJob(job).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectTenantJobName(String project, String tenant, String job) { + return newProjectTenantJobBuilder() + .setProject(project) + .setTenant(tenant) + .setJob(job) + .build() + .toString(); + } + + public static JobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_JOB_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_JOB_PATH_TEMPLATE.match(formattedString); + return ofProjectJobName(matchMap.get("project"), matchMap.get("job")); + } else if (PROJECT_TENANT_JOB_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_TENANT_JOB_PATH_TEMPLATE.match(formattedString); + return ofProjectTenantJobName( + matchMap.get("project"), matchMap.get("tenant"), matchMap.get("job")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_JOB_PATH_TEMPLATE.matches(formattedString) + || PROJECT_TENANT_JOB_PATH_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (job != null) { + fieldMapBuilder.put("job", job); + } + if (tenant != null) { + fieldMapBuilder.put("tenant", tenant); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + /** Builder for projects/{project}/jobs/{job}. */ + public static class Builder { + + private String project; + private String job; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getJob() { + return job; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setJob(String job) { + this.job = job; + return this; + } + + private Builder(JobName jobName) { + Preconditions.checkArgument( + jobName.pathTemplate == PROJECT_JOB_PATH_TEMPLATE, + "toBuilder is only supported when JobName has the pattern of " + + "projects/{project}/jobs/{job}."); + project = jobName.project; + job = jobName.job; + } + + public JobName build() { + return new JobName(this); + } + } + + /** Builder for projects/{project}/tenants/{tenant}/jobs/{job}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectTenantJobBuilder { + + private String project; + private String tenant; + private String job; + + private ProjectTenantJobBuilder() {} + + public String getProject() { + return project; + } + + public String getTenant() { + return tenant; + } + + public String getJob() { + return job; + } + + public ProjectTenantJobBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectTenantJobBuilder setTenant(String tenant) { + this.tenant = tenant; + return this; + } + + public ProjectTenantJobBuilder setJob(String job) { + this.job = job; + return this; + } + + public JobName build() { + return new JobName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + JobName that = (JobName) o; + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.job, that.job)) + && (Objects.equals(this.tenant, that.tenant)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(job); + h *= 1000003; + h ^= Objects.hashCode(tenant); + return h; + } } diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobNames.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobNames.java deleted file mode 100644 index 157a4535..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobNames.java +++ /dev/null @@ -1,38 +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 - * - * 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.talent.v4beta1; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class JobNames { - private JobNames() {} - - public static JobName parse(String resourceNameString) { - if (JobWithTenantName.isParsableFrom(resourceNameString)) { - return JobWithTenantName.parse(resourceNameString); - } - if (JobWithoutTenantName.isParsableFrom(resourceNameString)) { - return JobWithoutTenantName.parse(resourceNameString); - } - return UntypedJobName.parse(resourceNameString); - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobNewName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobNewName.java deleted file mode 100644 index 147fd797..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobNewName.java +++ /dev/null @@ -1,203 +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 - * - * 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.talent.v4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -@javax.annotation.Generated("by GAPIC protoc plugin") -public class JobNewName extends JobName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/tenants/{tenant}/jobs/{jobs}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String tenant; - private final String jobs; - - public String getProject() { - return project; - } - - public String getTenant() { - return tenant; - } - - public String getJobs() { - return jobs; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private JobNewName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - tenant = Preconditions.checkNotNull(builder.getTenant()); - jobs = Preconditions.checkNotNull(builder.getJobs()); - } - - public static JobNewName of(String project, String tenant, String jobs) { - return newBuilder().setProject(project).setTenant(tenant).setJobs(jobs).build(); - } - - public static String format(String project, String tenant, String jobs) { - return newBuilder().setProject(project).setTenant(tenant).setJobs(jobs).build().toString(); - } - - public static JobNewName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "JobNewName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("tenant"), matchMap.get("jobs")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (JobNewName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("tenant", tenant); - fieldMapBuilder.put("jobs", jobs); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "tenant", tenant, "jobs", jobs); - } - - /** Builder for JobNewName. */ - public static class Builder { - - private String project; - private String tenant; - private String jobs; - - public String getProject() { - return project; - } - - public String getTenant() { - return tenant; - } - - public String getJobs() { - return jobs; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setTenant(String tenant) { - this.tenant = tenant; - return this; - } - - public Builder setJobs(String jobs) { - this.jobs = jobs; - return this; - } - - private Builder() {} - - private Builder(JobNewName jobNewName) { - project = jobNewName.project; - tenant = jobNewName.tenant; - jobs = jobNewName.jobs; - } - - public JobNewName build() { - return new JobNewName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof JobNewName) { - JobNewName that = (JobNewName) o; - return (this.project.equals(that.project)) - && (this.tenant.equals(that.tenant)) - && (this.jobs.equals(that.jobs)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= tenant.hashCode(); - h *= 1000003; - h ^= jobs.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobOldName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobOldName.java deleted file mode 100644 index 08d69dc4..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobOldName.java +++ /dev/null @@ -1,181 +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 - * - * 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.talent.v4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -@javax.annotation.Generated("by GAPIC protoc plugin") -public class JobOldName extends JobName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/jobs/{jobs}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String jobs; - - public String getProject() { - return project; - } - - public String getJobs() { - return jobs; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private JobOldName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - jobs = Preconditions.checkNotNull(builder.getJobs()); - } - - public static JobOldName of(String project, String jobs) { - return newBuilder().setProject(project).setJobs(jobs).build(); - } - - public static String format(String project, String jobs) { - return newBuilder().setProject(project).setJobs(jobs).build().toString(); - } - - public static JobOldName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "JobOldName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("jobs")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (JobOldName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("jobs", jobs); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "jobs", jobs); - } - - /** Builder for JobOldName. */ - public static class Builder { - - private String project; - private String jobs; - - public String getProject() { - return project; - } - - public String getJobs() { - return jobs; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setJobs(String jobs) { - this.jobs = jobs; - return this; - } - - private Builder() {} - - private Builder(JobOldName jobOldName) { - project = jobOldName.project; - jobs = jobOldName.jobs; - } - - public JobOldName build() { - return new JobOldName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof JobOldName) { - JobOldName that = (JobOldName) o; - return (this.project.equals(that.project)) && (this.jobs.equals(that.jobs)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= jobs.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobWithTenantName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobWithTenantName.java deleted file mode 100644 index 59397168..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobWithTenantName.java +++ /dev/null @@ -1,208 +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 - * - * 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.talent.v4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class JobWithTenantName extends JobName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/tenants/{tenant}/jobs/{jobs}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String tenant; - private final String jobs; - - public String getProject() { - return project; - } - - public String getTenant() { - return tenant; - } - - public String getJobs() { - return jobs; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private JobWithTenantName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - tenant = Preconditions.checkNotNull(builder.getTenant()); - jobs = Preconditions.checkNotNull(builder.getJobs()); - } - - public static JobWithTenantName of(String project, String tenant, String jobs) { - return newBuilder().setProject(project).setTenant(tenant).setJobs(jobs).build(); - } - - public static String format(String project, String tenant, String jobs) { - return newBuilder().setProject(project).setTenant(tenant).setJobs(jobs).build().toString(); - } - - public static JobWithTenantName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "JobWithTenantName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("tenant"), matchMap.get("jobs")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (JobWithTenantName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("tenant", tenant); - fieldMapBuilder.put("jobs", jobs); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "tenant", tenant, "jobs", jobs); - } - - /** Builder for JobWithTenantName. */ - public static class Builder { - - private String project; - private String tenant; - private String jobs; - - public String getProject() { - return project; - } - - public String getTenant() { - return tenant; - } - - public String getJobs() { - return jobs; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setTenant(String tenant) { - this.tenant = tenant; - return this; - } - - public Builder setJobs(String jobs) { - this.jobs = jobs; - return this; - } - - private Builder() {} - - private Builder(JobWithTenantName jobWithTenantName) { - project = jobWithTenantName.project; - tenant = jobWithTenantName.tenant; - jobs = jobWithTenantName.jobs; - } - - public JobWithTenantName build() { - return new JobWithTenantName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof JobWithTenantName) { - JobWithTenantName that = (JobWithTenantName) o; - return (this.project.equals(that.project)) - && (this.tenant.equals(that.tenant)) - && (this.jobs.equals(that.jobs)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= tenant.hashCode(); - h *= 1000003; - h ^= jobs.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobWithoutTenantName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobWithoutTenantName.java deleted file mode 100644 index 64a872d8..00000000 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobWithoutTenantName.java +++ /dev/null @@ -1,186 +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 - * - * 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.talent.v4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ -@javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class JobWithoutTenantName extends JobName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/jobs/{jobs}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String jobs; - - public String getProject() { - return project; - } - - public String getJobs() { - return jobs; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private JobWithoutTenantName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - jobs = Preconditions.checkNotNull(builder.getJobs()); - } - - public static JobWithoutTenantName of(String project, String jobs) { - return newBuilder().setProject(project).setJobs(jobs).build(); - } - - public static String format(String project, String jobs) { - return newBuilder().setProject(project).setJobs(jobs).build().toString(); - } - - public static JobWithoutTenantName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "JobWithoutTenantName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("jobs")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (JobWithoutTenantName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("jobs", jobs); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "jobs", jobs); - } - - /** Builder for JobWithoutTenantName. */ - public static class Builder { - - private String project; - private String jobs; - - public String getProject() { - return project; - } - - public String getJobs() { - return jobs; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setJobs(String jobs) { - this.jobs = jobs; - return this; - } - - private Builder() {} - - private Builder(JobWithoutTenantName jobWithoutTenantName) { - project = jobWithoutTenantName.project; - jobs = jobWithoutTenantName.jobs; - } - - public JobWithoutTenantName build() { - return new JobWithoutTenantName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof JobWithoutTenantName) { - JobWithoutTenantName that = (JobWithoutTenantName) o; - return (this.project.equals(that.project)) && (this.jobs.equals(that.jobs)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= jobs.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ListProfilesRequest.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ListProfilesRequest.java index ddef0727..b42f132b 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ListProfilesRequest.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ListProfilesRequest.java @@ -158,7 +158,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * "projects/foo/tenants/bar". *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -182,7 +184,9 @@ public java.lang.String getParent() { * "projects/foo/tenants/bar". *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -789,7 +793,9 @@ public Builder mergeFrom( * "projects/foo/tenants/bar". *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -813,7 +819,9 @@ public java.lang.String getParent() { * "projects/foo/tenants/bar". *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -837,7 +845,9 @@ public com.google.protobuf.ByteString getParentBytes() { * "projects/foo/tenants/bar". *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -860,7 +870,9 @@ public Builder setParent(java.lang.String value) { * "projects/foo/tenants/bar". *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -879,7 +891,9 @@ public Builder clearParent() { * "projects/foo/tenants/bar". *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ListProfilesRequestOrBuilder.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ListProfilesRequestOrBuilder.java index 659aef78..ca080a4e 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ListProfilesRequestOrBuilder.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ListProfilesRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface ListProfilesRequestOrBuilder * "projects/foo/tenants/bar". *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -46,7 +48,9 @@ public interface ListProfilesRequestOrBuilder * "projects/foo/tenants/bar". *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceProto.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceProto.java index 0f3ec9dc..c0ff114d 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceProto.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceProto.java @@ -85,82 +85,83 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\032\031google/protobuf/any.proto\032\033google" + "/protobuf/empty.proto\032 google/protobuf/f" + "ield_mask.proto\032\027google/rpc/status.proto" - + "\"\220\001\n\023ListProfilesRequest\022\023\n\006parent\030\001 \001(\t" - + "B\003\340A\002\022\016\n\006filter\030\005 \001(\t\022\022\n\npage_token\030\002 \001(" - + "\t\022\021\n\tpage_size\030\003 \001(\005\022-\n\tread_mask\030\004 \001(\0132" - + "\032.google.protobuf.FieldMask\"g\n\024ListProfi" - + "lesResponse\0226\n\010profiles\030\001 \003(\0132$.google.c" - + "loud.talent.v4beta1.Profile\022\027\n\017next_page" - + "_token\030\002 \001(\t\"\206\001\n\024CreateProfileRequest\0222\n" - + "\006parent\030\001 \001(\tB\"\340A\002\372A\034\n\032jobs.googleapis.c" - + "om/Tenant\022:\n\007profile\030\002 \001(\0132$.google.clou" - + "d.talent.v4beta1.ProfileB\003\340A\002\"F\n\021GetProf" - + "ileRequest\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033jobs.g" - + "oogleapis.com/Profile\"\203\001\n\024UpdateProfileR" - + "equest\022:\n\007profile\030\001 \001(\0132$.google.cloud.t" - + "alent.v4beta1.ProfileB\003\340A\002\022/\n\013update_mas" - + "k\030\002 \001(\0132\032.google.protobuf.FieldMask\"I\n\024D" - + "eleteProfileRequest\0221\n\004name\030\001 \001(\tB#\340A\002\372A" - + "\035\n\033jobs.googleapis.com/Profile\"\334\003\n\025Searc" - + "hProfilesRequest\0222\n\006parent\030\001 \001(\tB\"\340A\002\372A\034" - + "\n\032jobs.googleapis.com/Tenant\022K\n\020request_" - + "metadata\030\002 \001(\0132,.google.cloud.talent.v4b" - + "eta1.RequestMetadataB\003\340A\002\022@\n\rprofile_que" - + "ry\030\003 \001(\0132).google.cloud.talent.v4beta1.P" - + "rofileQuery\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_t" - + "oken\030\005 \001(\t\022\016\n\006offset\030\006 \001(\005\022\033\n\023disable_sp" - + "ell_check\030\007 \001(\010\022\020\n\010order_by\030\010 \001(\t\022\033\n\023cas" - + "e_sensitive_sort\030\t \001(\010\022F\n\021histogram_quer" - + "ies\030\n \003(\0132+.google.cloud.talent.v4beta1." - + "HistogramQuery\022\025\n\rresult_set_id\030\014 \001(\t\022\036\n" - + "\026strict_keywords_search\030\r \001(\010\"\223\003\n\026Search" - + "ProfilesResponse\022\034\n\024estimated_total_size" - + "\030\001 \001(\003\022I\n\020spell_correction\030\002 \001(\0132/.googl" - + "e.cloud.talent.v4beta1.SpellingCorrectio" - + "n\022?\n\010metadata\030\003 \001(\0132-.google.cloud.talen" - + "t.v4beta1.ResponseMetadata\022\027\n\017next_page_" - + "token\030\004 \001(\t\022R\n\027histogram_query_results\030\005" - + " \003(\01321.google.cloud.talent.v4beta1.Histo" - + "gramQueryResult\022K\n\023summarized_profiles\030\006" - + " \003(\0132..google.cloud.talent.v4beta1.Summa" - + "rizedProfile\022\025\n\rresult_set_id\030\007 \001(\t\"\202\001\n\021" - + "SummarizedProfile\0226\n\010profiles\030\001 \003(\0132$.go" - + "ogle.cloud.talent.v4beta1.Profile\0225\n\007sum" - + "mary\030\002 \001(\0132$.google.cloud.talent.v4beta1" - + ".Profile2\237\t\n\016ProfileService\022\265\001\n\014ListProf" - + "iles\0220.google.cloud.talent.v4beta1.ListP" - + "rofilesRequest\0321.google.cloud.talent.v4b" - + "eta1.ListProfilesResponse\"@\202\323\344\223\0021\022//v4be" - + "ta1/{parent=projects/*/tenants/*}/profil" - + "es\332A\006parent\022\265\001\n\rCreateProfile\0221.google.c" - + "loud.talent.v4beta1.CreateProfileRequest" - + "\032$.google.cloud.talent.v4beta1.Profile\"K" - + "\202\323\344\223\0024\"//v4beta1/{parent=projects/*/tena" - + "nts/*}/profiles:\001*\332A\016parent,profile\022\242\001\n\n" - + "GetProfile\022..google.cloud.talent.v4beta1" - + ".GetProfileRequest\032$.google.cloud.talent" - + ".v4beta1.Profile\">\202\323\344\223\0021\022//v4beta1/{name" - + "=projects/*/tenants/*/profiles/*}\332A\004name" - + "\022\266\001\n\rUpdateProfile\0221.google.cloud.talent" - + ".v4beta1.UpdateProfileRequest\032$.google.c" - + "loud.talent.v4beta1.Profile\"L\202\323\344\223\002<27/v4" - + "beta1/{profile.name=projects/*/tenants/*" - + "/profiles/*}:\001*\332A\007profile\022\232\001\n\rDeleteProf" - + "ile\0221.google.cloud.talent.v4beta1.Delete" - + "ProfileRequest\032\026.google.protobuf.Empty\">" - + "\202\323\344\223\0021*//v4beta1/{name=projects/*/tenant" - + "s/*/profiles/*}\332A\004name\022\263\001\n\016SearchProfile" - + "s\0222.google.cloud.talent.v4beta1.SearchPr" - + "ofilesRequest\0323.google.cloud.talent.v4be" - + "ta1.SearchProfilesResponse\"8\202\323\344\223\0022\"-/v4b" - + "eta1/{parent=projects/*/tenants/*}:searc" - + "h:\001*\032l\312A\023jobs.googleapis.com\322AShttps://w" - + "ww.googleapis.com/auth/cloud-platform,ht" - + "tps://www.googleapis.com/auth/jobsB\201\001\n\037c" - + "om.google.cloud.talent.v4beta1B\023ProfileS" - + "erviceProtoP\001ZAgoogle.golang.org/genprot" - + "o/googleapis/cloud/talent/v4beta1;talent" - + "\242\002\003CTSb\006proto3" + + "\"\260\001\n\023ListProfilesRequest\0223\n\006parent\030\001 \001(\t" + + "B#\340A\002\372A\035\022\033jobs.googleapis.com/Profile\022\016\n" + + "\006filter\030\005 \001(\t\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpag" + + "e_size\030\003 \001(\005\022-\n\tread_mask\030\004 \001(\0132\032.google" + + ".protobuf.FieldMask\"g\n\024ListProfilesRespo" + + "nse\0226\n\010profiles\030\001 \003(\0132$.google.cloud.tal" + + "ent.v4beta1.Profile\022\027\n\017next_page_token\030\002" + + " \001(\t\"\206\001\n\024CreateProfileRequest\0222\n\006parent\030" + + "\001 \001(\tB\"\340A\002\372A\034\n\032jobs.googleapis.com/Tenan" + + "t\022:\n\007profile\030\002 \001(\0132$.google.cloud.talent" + + ".v4beta1.ProfileB\003\340A\002\"F\n\021GetProfileReque" + + "st\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033jobs.googleapi" + + "s.com/Profile\"\203\001\n\024UpdateProfileRequest\022:" + + "\n\007profile\030\001 \001(\0132$.google.cloud.talent.v4" + + "beta1.ProfileB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132" + + "\032.google.protobuf.FieldMask\"I\n\024DeletePro" + + "fileRequest\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033jobs." + + "googleapis.com/Profile\"\334\003\n\025SearchProfile" + + "sRequest\0222\n\006parent\030\001 \001(\tB\"\340A\002\372A\034\n\032jobs.g" + + "oogleapis.com/Tenant\022K\n\020request_metadata" + + "\030\002 \001(\0132,.google.cloud.talent.v4beta1.Req" + + "uestMetadataB\003\340A\002\022@\n\rprofile_query\030\003 \001(\013" + + "2).google.cloud.talent.v4beta1.ProfileQu" + + "ery\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_token\030\005 \001" + + "(\t\022\016\n\006offset\030\006 \001(\005\022\033\n\023disable_spell_chec" + + "k\030\007 \001(\010\022\020\n\010order_by\030\010 \001(\t\022\033\n\023case_sensit" + + "ive_sort\030\t \001(\010\022F\n\021histogram_queries\030\n \003(" + + "\0132+.google.cloud.talent.v4beta1.Histogra" + + "mQuery\022\025\n\rresult_set_id\030\014 \001(\t\022\036\n\026strict_" + + "keywords_search\030\r \001(\010\"\223\003\n\026SearchProfiles" + + "Response\022\034\n\024estimated_total_size\030\001 \001(\003\022I" + + "\n\020spell_correction\030\002 \001(\0132/.google.cloud." + + "talent.v4beta1.SpellingCorrection\022?\n\010met" + + "adata\030\003 \001(\0132-.google.cloud.talent.v4beta" + + "1.ResponseMetadata\022\027\n\017next_page_token\030\004 " + + "\001(\t\022R\n\027histogram_query_results\030\005 \003(\01321.g" + + "oogle.cloud.talent.v4beta1.HistogramQuer" + + "yResult\022K\n\023summarized_profiles\030\006 \003(\0132..g" + + "oogle.cloud.talent.v4beta1.SummarizedPro" + + "file\022\025\n\rresult_set_id\030\007 \001(\t\"\202\001\n\021Summariz" + + "edProfile\0226\n\010profiles\030\001 \003(\0132$.google.clo" + + "ud.talent.v4beta1.Profile\0225\n\007summary\030\002 \001" + + "(\0132$.google.cloud.talent.v4beta1.Profile" + + "2\237\t\n\016ProfileService\022\265\001\n\014ListProfiles\0220.g" + + "oogle.cloud.talent.v4beta1.ListProfilesR" + + "equest\0321.google.cloud.talent.v4beta1.Lis" + + "tProfilesResponse\"@\202\323\344\223\0021\022//v4beta1/{par" + + "ent=projects/*/tenants/*}/profiles\332A\006par" + + "ent\022\265\001\n\rCreateProfile\0221.google.cloud.tal" + + "ent.v4beta1.CreateProfileRequest\032$.googl" + + "e.cloud.talent.v4beta1.Profile\"K\202\323\344\223\0024\"/" + + "/v4beta1/{parent=projects/*/tenants/*}/p" + + "rofiles:\001*\332A\016parent,profile\022\242\001\n\nGetProfi" + + "le\022..google.cloud.talent.v4beta1.GetProf" + + "ileRequest\032$.google.cloud.talent.v4beta1" + + ".Profile\">\202\323\344\223\0021\022//v4beta1/{name=project" + + "s/*/tenants/*/profiles/*}\332A\004name\022\266\001\n\rUpd" + + "ateProfile\0221.google.cloud.talent.v4beta1" + + ".UpdateProfileRequest\032$.google.cloud.tal" + + "ent.v4beta1.Profile\"L\202\323\344\223\002<27/v4beta1/{p" + + "rofile.name=projects/*/tenants/*/profile" + + "s/*}:\001*\332A\007profile\022\232\001\n\rDeleteProfile\0221.go" + + "ogle.cloud.talent.v4beta1.DeleteProfileR" + + "equest\032\026.google.protobuf.Empty\">\202\323\344\223\0021*/" + + "/v4beta1/{name=projects/*/tenants/*/prof" + + "iles/*}\332A\004name\022\263\001\n\016SearchProfiles\0222.goog" + + "le.cloud.talent.v4beta1.SearchProfilesRe" + + "quest\0323.google.cloud.talent.v4beta1.Sear" + + "chProfilesResponse\"8\202\323\344\223\0022\"-/v4beta1/{pa" + + "rent=projects/*/tenants/*}:search:\001*\032l\312A" + + "\023jobs.googleapis.com\322AShttps://www.googl" + + "eapis.com/auth/cloud-platform,https://ww" + + "w.googleapis.com/auth/jobsB\201\001\n\037com.googl" + + "e.cloud.talent.v4beta1B\023ProfileServicePr" + + "otoP\001ZAgoogle.golang.org/genproto/google" + + "apis/cloud/talent/v4beta1;talent\242\002\003CTSb\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProjectName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProjectName.java index 9b02454e..4b81fb68 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProjectName.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProjectName.java @@ -17,20 +17,16 @@ package com.google.cloud.talent.v4beta1; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.List; import java.util.Map; -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated -public class ProjectName extends TenantOrProjectName { +public class ProjectName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("projects/{project}"); diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/SearchJobsRequest.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/SearchJobsRequest.java index e025c166..7a0fc9d1 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/SearchJobsRequest.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/SearchJobsRequest.java @@ -633,10 +633,10 @@ public interface CustomRankingInfoOrBuilder * * *
-     * Required. Controls over how job documents get ranked on top of existing
-     * relevance score (determined by API algorithm). A combination of the
-     * ranking expression and relevance score is used to determine job's final
-     * ranking position.
+     * Required. Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm). A combination of the ranking
+     * expression and relevance score is used to determine job's final ranking
+     * position.
      * The syntax for this expression is a subset of Google SQL syntax.
      * Supported operators are: +, -, *, /, where the left and right side of
      * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
@@ -660,10 +660,10 @@ public interface CustomRankingInfoOrBuilder
      *
      *
      * 
-     * Required. Controls over how job documents get ranked on top of existing
-     * relevance score (determined by API algorithm). A combination of the
-     * ranking expression and relevance score is used to determine job's final
-     * ranking position.
+     * Required. Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm). A combination of the ranking
+     * expression and relevance score is used to determine job's final ranking
+     * position.
      * The syntax for this expression is a subset of Google SQL syntax.
      * Supported operators are: +, -, *, /, where the left and right side of
      * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
@@ -1111,10 +1111,10 @@ public int getImportanceLevelValue() {
      *
      *
      * 
-     * Required. Controls over how job documents get ranked on top of existing
-     * relevance score (determined by API algorithm). A combination of the
-     * ranking expression and relevance score is used to determine job's final
-     * ranking position.
+     * Required. Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm). A combination of the ranking
+     * expression and relevance score is used to determine job's final ranking
+     * position.
      * The syntax for this expression is a subset of Google SQL syntax.
      * Supported operators are: +, -, *, /, where the left and right side of
      * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
@@ -1148,10 +1148,10 @@ public java.lang.String getRankingExpression() {
      *
      *
      * 
-     * Required. Controls over how job documents get ranked on top of existing
-     * relevance score (determined by API algorithm). A combination of the
-     * ranking expression and relevance score is used to determine job's final
-     * ranking position.
+     * Required. Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm). A combination of the ranking
+     * expression and relevance score is used to determine job's final ranking
+     * position.
      * The syntax for this expression is a subset of Google SQL syntax.
      * Supported operators are: +, -, *, /, where the left and right side of
      * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
@@ -1659,10 +1659,10 @@ public Builder clearImportanceLevel() {
        *
        *
        * 
-       * Required. Controls over how job documents get ranked on top of existing
-       * relevance score (determined by API algorithm). A combination of the
-       * ranking expression and relevance score is used to determine job's final
-       * ranking position.
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
        * The syntax for this expression is a subset of Google SQL syntax.
        * Supported operators are: +, -, *, /, where the left and right side of
        * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
@@ -1696,10 +1696,10 @@ public java.lang.String getRankingExpression() {
        *
        *
        * 
-       * Required. Controls over how job documents get ranked on top of existing
-       * relevance score (determined by API algorithm). A combination of the
-       * ranking expression and relevance score is used to determine job's final
-       * ranking position.
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
        * The syntax for this expression is a subset of Google SQL syntax.
        * Supported operators are: +, -, *, /, where the left and right side of
        * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
@@ -1733,10 +1733,10 @@ public com.google.protobuf.ByteString getRankingExpressionBytes() {
        *
        *
        * 
-       * Required. Controls over how job documents get ranked on top of existing
-       * relevance score (determined by API algorithm). A combination of the
-       * ranking expression and relevance score is used to determine job's final
-       * ranking position.
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
        * The syntax for this expression is a subset of Google SQL syntax.
        * Supported operators are: +, -, *, /, where the left and right side of
        * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
@@ -1769,10 +1769,10 @@ public Builder setRankingExpression(java.lang.String value) {
        *
        *
        * 
-       * Required. Controls over how job documents get ranked on top of existing
-       * relevance score (determined by API algorithm). A combination of the
-       * ranking expression and relevance score is used to determine job's final
-       * ranking position.
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
        * The syntax for this expression is a subset of Google SQL syntax.
        * Supported operators are: +, -, *, /, where the left and right side of
        * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
@@ -1801,10 +1801,10 @@ public Builder clearRankingExpression() {
        *
        *
        * 
-       * Required. Controls over how job documents get ranked on top of existing
-       * relevance score (determined by API algorithm). A combination of the
-       * ranking expression and relevance score is used to determine job's final
-       * ranking position.
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
        * The syntax for this expression is a subset of Google SQL syntax.
        * Supported operators are: +, -, *, /, where the left and right side of
        * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
@@ -2631,7 +2631,6 @@ public com.google.cloud.talent.v4beta1.JobView getJobView() {
    * location, amongst the jobs deemed by the API as relevant) in search
    * results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchJobsRequest.page_token] is unset.
    * The maximum allowed value is 5000. Otherwise an error is thrown.
-   * The maximum allowed value is 5000. Otherwise an error is thrown.
    * For example, 0 means to  return results starting from the first matching
    * job, and 10 means to return from the 11th job. This can be used for
    * pagination, (for example, pageSize = 10 and offset = 10 means to return
@@ -6253,7 +6252,6 @@ public Builder clearJobView() {
      * location, amongst the jobs deemed by the API as relevant) in search
      * results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchJobsRequest.page_token] is unset.
      * The maximum allowed value is 5000. Otherwise an error is thrown.
-     * The maximum allowed value is 5000. Otherwise an error is thrown.
      * For example, 0 means to  return results starting from the first matching
      * job, and 10 means to return from the 11th job. This can be used for
      * pagination, (for example, pageSize = 10 and offset = 10 means to return
@@ -6275,7 +6273,6 @@ public int getOffset() {
      * location, amongst the jobs deemed by the API as relevant) in search
      * results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchJobsRequest.page_token] is unset.
      * The maximum allowed value is 5000. Otherwise an error is thrown.
-     * The maximum allowed value is 5000. Otherwise an error is thrown.
      * For example, 0 means to  return results starting from the first matching
      * job, and 10 means to return from the 11th job. This can be used for
      * pagination, (for example, pageSize = 10 and offset = 10 means to return
@@ -6301,7 +6298,6 @@ public Builder setOffset(int value) {
      * location, amongst the jobs deemed by the API as relevant) in search
      * results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchJobsRequest.page_token] is unset.
      * The maximum allowed value is 5000. Otherwise an error is thrown.
-     * The maximum allowed value is 5000. Otherwise an error is thrown.
      * For example, 0 means to  return results starting from the first matching
      * job, and 10 means to return from the 11th job. This can be used for
      * pagination, (for example, pageSize = 10 and offset = 10 means to return
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/SearchJobsRequestOrBuilder.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/SearchJobsRequestOrBuilder.java
index f7b1a727..25f450aa 100644
--- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/SearchJobsRequestOrBuilder.java
+++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/SearchJobsRequestOrBuilder.java
@@ -679,7 +679,6 @@ public interface SearchJobsRequestOrBuilder
    * location, amongst the jobs deemed by the API as relevant) in search
    * results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchJobsRequest.page_token] is unset.
    * The maximum allowed value is 5000. Otherwise an error is thrown.
-   * The maximum allowed value is 5000. Otherwise an error is thrown.
    * For example, 0 means to  return results starting from the first matching
    * job, and 10 means to return from the 11th job. This can be used for
    * pagination, (for example, pageSize = 10 and offset = 10 means to return
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantName.java
index 8d74053b..fd4aaa65 100644
--- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantName.java
+++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantName.java
@@ -17,20 +17,16 @@
 package com.google.cloud.talent.v4beta1;
 
 import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
+/** AUTO-GENERATED DOCUMENTATION AND CLASS */
 @javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
-public class TenantName extends TenantOrProjectName {
+public class TenantName implements ResourceName {
 
   private static final PathTemplate PATH_TEMPLATE =
       PathTemplate.createWithoutUrlEncoding("projects/{project}/tenants/{tenant}");
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantOrProjectName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantOrProjectName.java
deleted file mode 100644
index 78ca98b2..00000000
--- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantOrProjectName.java
+++ /dev/null
@@ -1,25 +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
- *
- *     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.talent.v4beta1;
-
-import com.google.api.resourcenames.ResourceName;
-
-/** AUTO-GENERATED DOCUMENTATION AND CLASS */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-public abstract class TenantOrProjectName implements ResourceName {
-  protected TenantOrProjectName() {}
-}
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantOrProjectNames.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantOrProjectNames.java
deleted file mode 100644
index 32268c7e..00000000
--- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantOrProjectNames.java
+++ /dev/null
@@ -1,38 +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
- *
- *     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.talent.v4beta1;
-
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
-public class TenantOrProjectNames {
-  private TenantOrProjectNames() {}
-
-  public static TenantOrProjectName parse(String resourceNameString) {
-    if (TenantName.isParsableFrom(resourceNameString)) {
-      return TenantName.parse(resourceNameString);
-    }
-    if (ProjectName.isParsableFrom(resourceNameString)) {
-      return ProjectName.parse(resourceNameString);
-    }
-    return UntypedTenantOrProjectName.parse(resourceNameString);
-  }
-}
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantResourceProto.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantResourceProto.java
index 22f5a568..fefe7ea1 100644
--- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantResourceProto.java
+++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantResourceProto.java
@@ -53,12 +53,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "E_TYPE_UNSPECIFIED\020\000\022\016\n\nAGGREGATED\020\001\022\014\n\010"
           + "ISOLATED\020\002:D\352AA\n\032jobs.googleapis.com/Ten"
           + "ant\022#projects/{project}/tenants/{tenant}"
-          + "B\342\001\n\037com.google.cloud.talent.v4beta1B\023Te"
+          + "B\201\001\n\037com.google.cloud.talent.v4beta1B\023Te"
           + "nantResourceProtoP\001ZAgoogle.golang.org/g"
           + "enproto/googleapis/cloud/talent/v4beta1;"
-          + "talent\242\002\003CTS\352A^\n#jobs.googleapis.com/Ten"
-          + "antOrProject\022#projects/{project}/tenants"
-          + "/{tenant}\022\022projects/{project}b\006proto3"
+          + "talent\242\002\003CTSb\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -81,7 +79,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
         com.google.protobuf.ExtensionRegistry.newInstance();
     registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
     registry.add(com.google.api.ResourceProto.resource);
-    registry.add(com.google.api.ResourceProto.resourceDefinition);
     com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
         descriptor, registry);
     com.google.api.FieldBehaviorProto.getDescriptor();
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedCompanyName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedCompanyName.java
deleted file mode 100644
index 6bb11b22..00000000
--- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedCompanyName.java
+++ /dev/null
@@ -1,106 +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
- *
- *     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.talent.v4beta1;
-
-import com.google.api.resourcenames.ResourceName;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
-public class UntypedCompanyName extends CompanyName {
-
-  private final String rawValue;
-  private Map valueMap;
-
-  private UntypedCompanyName(String rawValue) {
-    this.rawValue = Preconditions.checkNotNull(rawValue);
-    this.valueMap = ImmutableMap.of("", rawValue);
-  }
-
-  public static UntypedCompanyName from(ResourceName resourceName) {
-    return new UntypedCompanyName(resourceName.toString());
-  }
-
-  public static UntypedCompanyName parse(String formattedString) {
-    return new UntypedCompanyName(formattedString);
-  }
-
-  public static List parseList(List formattedStrings) {
-    List list = new ArrayList<>(formattedStrings.size());
-    for (String formattedString : formattedStrings) {
-      list.add(parse(formattedString));
-    }
-    return list;
-  }
-
-  public static List toStringList(List values) {
-    List list = new ArrayList(values.size());
-    for (UntypedCompanyName value : values) {
-      if (value == null) {
-        list.add("");
-      } else {
-        list.add(value.toString());
-      }
-    }
-    return list;
-  }
-
-  public static boolean isParsableFrom(String formattedString) {
-    return true;
-  }
-
-  /** Return a map with a single value rawValue keyed on an empty String "". */
-  public Map getFieldValuesMap() {
-    return valueMap;
-  }
-
-  /** Return the initial rawValue if @param fieldName is an empty String, else return null. */
-  public String getFieldValue(String fieldName) {
-    return valueMap.get(fieldName);
-  }
-
-  @Override
-  public String toString() {
-    return rawValue;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == this) {
-      return true;
-    }
-    if (o instanceof UntypedCompanyName) {
-      UntypedCompanyName that = (UntypedCompanyName) o;
-      return this.rawValue.equals(that.rawValue);
-    }
-    return false;
-  }
-
-  @Override
-  public int hashCode() {
-    return rawValue.hashCode();
-  }
-}
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedJobName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedJobName.java
deleted file mode 100644
index a4fb17ce..00000000
--- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedJobName.java
+++ /dev/null
@@ -1,106 +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
- *
- *     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.talent.v4beta1;
-
-import com.google.api.resourcenames.ResourceName;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
-public class UntypedJobName extends JobName {
-
-  private final String rawValue;
-  private Map valueMap;
-
-  private UntypedJobName(String rawValue) {
-    this.rawValue = Preconditions.checkNotNull(rawValue);
-    this.valueMap = ImmutableMap.of("", rawValue);
-  }
-
-  public static UntypedJobName from(ResourceName resourceName) {
-    return new UntypedJobName(resourceName.toString());
-  }
-
-  public static UntypedJobName parse(String formattedString) {
-    return new UntypedJobName(formattedString);
-  }
-
-  public static List parseList(List formattedStrings) {
-    List list = new ArrayList<>(formattedStrings.size());
-    for (String formattedString : formattedStrings) {
-      list.add(parse(formattedString));
-    }
-    return list;
-  }
-
-  public static List toStringList(List values) {
-    List list = new ArrayList(values.size());
-    for (UntypedJobName value : values) {
-      if (value == null) {
-        list.add("");
-      } else {
-        list.add(value.toString());
-      }
-    }
-    return list;
-  }
-
-  public static boolean isParsableFrom(String formattedString) {
-    return true;
-  }
-
-  /** Return a map with a single value rawValue keyed on an empty String "". */
-  public Map getFieldValuesMap() {
-    return valueMap;
-  }
-
-  /** Return the initial rawValue if @param fieldName is an empty String, else return null. */
-  public String getFieldValue(String fieldName) {
-    return valueMap.get(fieldName);
-  }
-
-  @Override
-  public String toString() {
-    return rawValue;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == this) {
-      return true;
-    }
-    if (o instanceof UntypedJobName) {
-      UntypedJobName that = (UntypedJobName) o;
-      return this.rawValue.equals(that.rawValue);
-    }
-    return false;
-  }
-
-  @Override
-  public int hashCode() {
-    return rawValue.hashCode();
-  }
-}
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedTenantOrProjectName.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedTenantOrProjectName.java
deleted file mode 100644
index cc47de1e..00000000
--- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedTenantOrProjectName.java
+++ /dev/null
@@ -1,106 +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
- *
- *     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.talent.v4beta1;
-
-import com.google.api.resourcenames.ResourceName;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
-public class UntypedTenantOrProjectName extends TenantOrProjectName {
-
-  private final String rawValue;
-  private Map valueMap;
-
-  private UntypedTenantOrProjectName(String rawValue) {
-    this.rawValue = Preconditions.checkNotNull(rawValue);
-    this.valueMap = ImmutableMap.of("", rawValue);
-  }
-
-  public static UntypedTenantOrProjectName from(ResourceName resourceName) {
-    return new UntypedTenantOrProjectName(resourceName.toString());
-  }
-
-  public static UntypedTenantOrProjectName parse(String formattedString) {
-    return new UntypedTenantOrProjectName(formattedString);
-  }
-
-  public static List parseList(List formattedStrings) {
-    List list = new ArrayList<>(formattedStrings.size());
-    for (String formattedString : formattedStrings) {
-      list.add(parse(formattedString));
-    }
-    return list;
-  }
-
-  public static List toStringList(List values) {
-    List list = new ArrayList(values.size());
-    for (UntypedTenantOrProjectName value : values) {
-      if (value == null) {
-        list.add("");
-      } else {
-        list.add(value.toString());
-      }
-    }
-    return list;
-  }
-
-  public static boolean isParsableFrom(String formattedString) {
-    return true;
-  }
-
-  /** Return a map with a single value rawValue keyed on an empty String "". */
-  public Map getFieldValuesMap() {
-    return valueMap;
-  }
-
-  /** Return the initial rawValue if @param fieldName is an empty String, else return null. */
-  public String getFieldValue(String fieldName) {
-    return valueMap.get(fieldName);
-  }
-
-  @Override
-  public String toString() {
-    return rawValue;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == this) {
-      return true;
-    }
-    if (o instanceof UntypedTenantOrProjectName) {
-      UntypedTenantOrProjectName that = (UntypedTenantOrProjectName) o;
-      return this.rawValue.equals(that.rawValue);
-    }
-    return false;
-  }
-
-  @Override
-  public int hashCode() {
-    return rawValue.hashCode();
-  }
-}
diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UpdateProfileRequest.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UpdateProfileRequest.java
index 966a79e7..2631be82 100644
--- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UpdateProfileRequest.java
+++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UpdateProfileRequest.java
@@ -192,53 +192,6 @@ public com.google.cloud.talent.v4beta1.ProfileOrBuilder getProfileOrBuilder() {
    * 
    * A field mask to specify the profile fields to update.
    * A full update is performed if it is unset.
-   * Valid values are:
-   * * external_id
-   * * source
-   * * source_types
-   * * uri
-   * * is_hirable
-   * * create_time
-   * * update_time
-   * * candidate_update_time
-   * * resume_update_time
-   * * resume
-   * * person_names
-   * * addresses
-   * * email_addresses
-   * * phone_numbers
-   * * personal_uris
-   * * additional_contact_info
-   * * employment_records
-   * * education_records
-   * * skills
-   * * activities
-   * * publications
-   * * patents
-   * * certifications
-   * * recruiting_notes
-   * * custom_attributes
-   * * group_id
-   * * external_system
-   * * source_note
-   * * primary_responsibilities
-   * * citizenships
-   * * work_authorizations
-   * * employee_types
-   * * language_code
-   * * qualification_summary
-   * * allowed_contact_types
-   * * preferred_contact_types
-   * * contact_availability
-   * * language_fluencies
-   * * work_preference
-   * * industry_experiences
-   * * work_environment_experiences
-   * * work_availability
-   * * security_clearances
-   * * references
-   * * assessments
-   * * interviews
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -254,53 +207,6 @@ public boolean hasUpdateMask() { *
    * A field mask to specify the profile fields to update.
    * A full update is performed if it is unset.
-   * Valid values are:
-   * * external_id
-   * * source
-   * * source_types
-   * * uri
-   * * is_hirable
-   * * create_time
-   * * update_time
-   * * candidate_update_time
-   * * resume_update_time
-   * * resume
-   * * person_names
-   * * addresses
-   * * email_addresses
-   * * phone_numbers
-   * * personal_uris
-   * * additional_contact_info
-   * * employment_records
-   * * education_records
-   * * skills
-   * * activities
-   * * publications
-   * * patents
-   * * certifications
-   * * recruiting_notes
-   * * custom_attributes
-   * * group_id
-   * * external_system
-   * * source_note
-   * * primary_responsibilities
-   * * citizenships
-   * * work_authorizations
-   * * employee_types
-   * * language_code
-   * * qualification_summary
-   * * allowed_contact_types
-   * * preferred_contact_types
-   * * contact_availability
-   * * language_fluencies
-   * * work_preference
-   * * industry_experiences
-   * * work_environment_experiences
-   * * work_availability
-   * * security_clearances
-   * * references
-   * * assessments
-   * * interviews
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -316,53 +222,6 @@ public com.google.protobuf.FieldMask getUpdateMask() { *
    * A field mask to specify the profile fields to update.
    * A full update is performed if it is unset.
-   * Valid values are:
-   * * external_id
-   * * source
-   * * source_types
-   * * uri
-   * * is_hirable
-   * * create_time
-   * * update_time
-   * * candidate_update_time
-   * * resume_update_time
-   * * resume
-   * * person_names
-   * * addresses
-   * * email_addresses
-   * * phone_numbers
-   * * personal_uris
-   * * additional_contact_info
-   * * employment_records
-   * * education_records
-   * * skills
-   * * activities
-   * * publications
-   * * patents
-   * * certifications
-   * * recruiting_notes
-   * * custom_attributes
-   * * group_id
-   * * external_system
-   * * source_note
-   * * primary_responsibilities
-   * * citizenships
-   * * work_authorizations
-   * * employee_types
-   * * language_code
-   * * qualification_summary
-   * * allowed_contact_types
-   * * preferred_contact_types
-   * * contact_availability
-   * * language_fluencies
-   * * work_preference
-   * * industry_experiences
-   * * work_environment_experiences
-   * * work_availability
-   * * security_clearances
-   * * references
-   * * assessments
-   * * interviews
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -944,53 +803,6 @@ public com.google.cloud.talent.v4beta1.ProfileOrBuilder getProfileOrBuilder() { *
      * A field mask to specify the profile fields to update.
      * A full update is performed if it is unset.
-     * Valid values are:
-     * * external_id
-     * * source
-     * * source_types
-     * * uri
-     * * is_hirable
-     * * create_time
-     * * update_time
-     * * candidate_update_time
-     * * resume_update_time
-     * * resume
-     * * person_names
-     * * addresses
-     * * email_addresses
-     * * phone_numbers
-     * * personal_uris
-     * * additional_contact_info
-     * * employment_records
-     * * education_records
-     * * skills
-     * * activities
-     * * publications
-     * * patents
-     * * certifications
-     * * recruiting_notes
-     * * custom_attributes
-     * * group_id
-     * * external_system
-     * * source_note
-     * * primary_responsibilities
-     * * citizenships
-     * * work_authorizations
-     * * employee_types
-     * * language_code
-     * * qualification_summary
-     * * allowed_contact_types
-     * * preferred_contact_types
-     * * contact_availability
-     * * language_fluencies
-     * * work_preference
-     * * industry_experiences
-     * * work_environment_experiences
-     * * work_availability
-     * * security_clearances
-     * * references
-     * * assessments
-     * * interviews
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -1006,53 +818,6 @@ public boolean hasUpdateMask() { *
      * A field mask to specify the profile fields to update.
      * A full update is performed if it is unset.
-     * Valid values are:
-     * * external_id
-     * * source
-     * * source_types
-     * * uri
-     * * is_hirable
-     * * create_time
-     * * update_time
-     * * candidate_update_time
-     * * resume_update_time
-     * * resume
-     * * person_names
-     * * addresses
-     * * email_addresses
-     * * phone_numbers
-     * * personal_uris
-     * * additional_contact_info
-     * * employment_records
-     * * education_records
-     * * skills
-     * * activities
-     * * publications
-     * * patents
-     * * certifications
-     * * recruiting_notes
-     * * custom_attributes
-     * * group_id
-     * * external_system
-     * * source_note
-     * * primary_responsibilities
-     * * citizenships
-     * * work_authorizations
-     * * employee_types
-     * * language_code
-     * * qualification_summary
-     * * allowed_contact_types
-     * * preferred_contact_types
-     * * contact_availability
-     * * language_fluencies
-     * * work_preference
-     * * industry_experiences
-     * * work_environment_experiences
-     * * work_availability
-     * * security_clearances
-     * * references
-     * * assessments
-     * * interviews
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -1074,53 +839,6 @@ public com.google.protobuf.FieldMask getUpdateMask() { *
      * A field mask to specify the profile fields to update.
      * A full update is performed if it is unset.
-     * Valid values are:
-     * * external_id
-     * * source
-     * * source_types
-     * * uri
-     * * is_hirable
-     * * create_time
-     * * update_time
-     * * candidate_update_time
-     * * resume_update_time
-     * * resume
-     * * person_names
-     * * addresses
-     * * email_addresses
-     * * phone_numbers
-     * * personal_uris
-     * * additional_contact_info
-     * * employment_records
-     * * education_records
-     * * skills
-     * * activities
-     * * publications
-     * * patents
-     * * certifications
-     * * recruiting_notes
-     * * custom_attributes
-     * * group_id
-     * * external_system
-     * * source_note
-     * * primary_responsibilities
-     * * citizenships
-     * * work_authorizations
-     * * employee_types
-     * * language_code
-     * * qualification_summary
-     * * allowed_contact_types
-     * * preferred_contact_types
-     * * contact_availability
-     * * language_fluencies
-     * * work_preference
-     * * industry_experiences
-     * * work_environment_experiences
-     * * work_availability
-     * * security_clearances
-     * * references
-     * * assessments
-     * * interviews
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -1144,53 +862,6 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { *
      * A field mask to specify the profile fields to update.
      * A full update is performed if it is unset.
-     * Valid values are:
-     * * external_id
-     * * source
-     * * source_types
-     * * uri
-     * * is_hirable
-     * * create_time
-     * * update_time
-     * * candidate_update_time
-     * * resume_update_time
-     * * resume
-     * * person_names
-     * * addresses
-     * * email_addresses
-     * * phone_numbers
-     * * personal_uris
-     * * additional_contact_info
-     * * employment_records
-     * * education_records
-     * * skills
-     * * activities
-     * * publications
-     * * patents
-     * * certifications
-     * * recruiting_notes
-     * * custom_attributes
-     * * group_id
-     * * external_system
-     * * source_note
-     * * primary_responsibilities
-     * * citizenships
-     * * work_authorizations
-     * * employee_types
-     * * language_code
-     * * qualification_summary
-     * * allowed_contact_types
-     * * preferred_contact_types
-     * * contact_availability
-     * * language_fluencies
-     * * work_preference
-     * * industry_experiences
-     * * work_environment_experiences
-     * * work_availability
-     * * security_clearances
-     * * references
-     * * assessments
-     * * interviews
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -1211,53 +882,6 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal *
      * A field mask to specify the profile fields to update.
      * A full update is performed if it is unset.
-     * Valid values are:
-     * * external_id
-     * * source
-     * * source_types
-     * * uri
-     * * is_hirable
-     * * create_time
-     * * update_time
-     * * candidate_update_time
-     * * resume_update_time
-     * * resume
-     * * person_names
-     * * addresses
-     * * email_addresses
-     * * phone_numbers
-     * * personal_uris
-     * * additional_contact_info
-     * * employment_records
-     * * education_records
-     * * skills
-     * * activities
-     * * publications
-     * * patents
-     * * certifications
-     * * recruiting_notes
-     * * custom_attributes
-     * * group_id
-     * * external_system
-     * * source_note
-     * * primary_responsibilities
-     * * citizenships
-     * * work_authorizations
-     * * employee_types
-     * * language_code
-     * * qualification_summary
-     * * allowed_contact_types
-     * * preferred_contact_types
-     * * contact_availability
-     * * language_fluencies
-     * * work_preference
-     * * industry_experiences
-     * * work_environment_experiences
-     * * work_availability
-     * * security_clearances
-     * * references
-     * * assessments
-     * * interviews
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -1283,53 +907,6 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { *
      * A field mask to specify the profile fields to update.
      * A full update is performed if it is unset.
-     * Valid values are:
-     * * external_id
-     * * source
-     * * source_types
-     * * uri
-     * * is_hirable
-     * * create_time
-     * * update_time
-     * * candidate_update_time
-     * * resume_update_time
-     * * resume
-     * * person_names
-     * * addresses
-     * * email_addresses
-     * * phone_numbers
-     * * personal_uris
-     * * additional_contact_info
-     * * employment_records
-     * * education_records
-     * * skills
-     * * activities
-     * * publications
-     * * patents
-     * * certifications
-     * * recruiting_notes
-     * * custom_attributes
-     * * group_id
-     * * external_system
-     * * source_note
-     * * primary_responsibilities
-     * * citizenships
-     * * work_authorizations
-     * * employee_types
-     * * language_code
-     * * qualification_summary
-     * * allowed_contact_types
-     * * preferred_contact_types
-     * * contact_availability
-     * * language_fluencies
-     * * work_preference
-     * * industry_experiences
-     * * work_environment_experiences
-     * * work_availability
-     * * security_clearances
-     * * references
-     * * assessments
-     * * interviews
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -1351,53 +928,6 @@ public Builder clearUpdateMask() { *
      * A field mask to specify the profile fields to update.
      * A full update is performed if it is unset.
-     * Valid values are:
-     * * external_id
-     * * source
-     * * source_types
-     * * uri
-     * * is_hirable
-     * * create_time
-     * * update_time
-     * * candidate_update_time
-     * * resume_update_time
-     * * resume
-     * * person_names
-     * * addresses
-     * * email_addresses
-     * * phone_numbers
-     * * personal_uris
-     * * additional_contact_info
-     * * employment_records
-     * * education_records
-     * * skills
-     * * activities
-     * * publications
-     * * patents
-     * * certifications
-     * * recruiting_notes
-     * * custom_attributes
-     * * group_id
-     * * external_system
-     * * source_note
-     * * primary_responsibilities
-     * * citizenships
-     * * work_authorizations
-     * * employee_types
-     * * language_code
-     * * qualification_summary
-     * * allowed_contact_types
-     * * preferred_contact_types
-     * * contact_availability
-     * * language_fluencies
-     * * work_preference
-     * * industry_experiences
-     * * work_environment_experiences
-     * * work_availability
-     * * security_clearances
-     * * references
-     * * assessments
-     * * interviews
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -1413,53 +943,6 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { *
      * A field mask to specify the profile fields to update.
      * A full update is performed if it is unset.
-     * Valid values are:
-     * * external_id
-     * * source
-     * * source_types
-     * * uri
-     * * is_hirable
-     * * create_time
-     * * update_time
-     * * candidate_update_time
-     * * resume_update_time
-     * * resume
-     * * person_names
-     * * addresses
-     * * email_addresses
-     * * phone_numbers
-     * * personal_uris
-     * * additional_contact_info
-     * * employment_records
-     * * education_records
-     * * skills
-     * * activities
-     * * publications
-     * * patents
-     * * certifications
-     * * recruiting_notes
-     * * custom_attributes
-     * * group_id
-     * * external_system
-     * * source_note
-     * * primary_responsibilities
-     * * citizenships
-     * * work_authorizations
-     * * employee_types
-     * * language_code
-     * * qualification_summary
-     * * allowed_contact_types
-     * * preferred_contact_types
-     * * contact_availability
-     * * language_fluencies
-     * * work_preference
-     * * industry_experiences
-     * * work_environment_experiences
-     * * work_availability
-     * * security_clearances
-     * * references
-     * * assessments
-     * * interviews
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -1479,53 +962,6 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { *
      * A field mask to specify the profile fields to update.
      * A full update is performed if it is unset.
-     * Valid values are:
-     * * external_id
-     * * source
-     * * source_types
-     * * uri
-     * * is_hirable
-     * * create_time
-     * * update_time
-     * * candidate_update_time
-     * * resume_update_time
-     * * resume
-     * * person_names
-     * * addresses
-     * * email_addresses
-     * * phone_numbers
-     * * personal_uris
-     * * additional_contact_info
-     * * employment_records
-     * * education_records
-     * * skills
-     * * activities
-     * * publications
-     * * patents
-     * * certifications
-     * * recruiting_notes
-     * * custom_attributes
-     * * group_id
-     * * external_system
-     * * source_note
-     * * primary_responsibilities
-     * * citizenships
-     * * work_authorizations
-     * * employee_types
-     * * language_code
-     * * qualification_summary
-     * * allowed_contact_types
-     * * preferred_contact_types
-     * * contact_availability
-     * * language_fluencies
-     * * work_preference
-     * * industry_experiences
-     * * work_environment_experiences
-     * * work_availability
-     * * security_clearances
-     * * references
-     * * assessments
-     * * interviews
      * 
* * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UpdateProfileRequestOrBuilder.java b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UpdateProfileRequestOrBuilder.java index 9b04948d..6da9a056 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UpdateProfileRequestOrBuilder.java +++ b/proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UpdateProfileRequestOrBuilder.java @@ -70,53 +70,6 @@ public interface UpdateProfileRequestOrBuilder *
    * A field mask to specify the profile fields to update.
    * A full update is performed if it is unset.
-   * Valid values are:
-   * * external_id
-   * * source
-   * * source_types
-   * * uri
-   * * is_hirable
-   * * create_time
-   * * update_time
-   * * candidate_update_time
-   * * resume_update_time
-   * * resume
-   * * person_names
-   * * addresses
-   * * email_addresses
-   * * phone_numbers
-   * * personal_uris
-   * * additional_contact_info
-   * * employment_records
-   * * education_records
-   * * skills
-   * * activities
-   * * publications
-   * * patents
-   * * certifications
-   * * recruiting_notes
-   * * custom_attributes
-   * * group_id
-   * * external_system
-   * * source_note
-   * * primary_responsibilities
-   * * citizenships
-   * * work_authorizations
-   * * employee_types
-   * * language_code
-   * * qualification_summary
-   * * allowed_contact_types
-   * * preferred_contact_types
-   * * contact_availability
-   * * language_fluencies
-   * * work_preference
-   * * industry_experiences
-   * * work_environment_experiences
-   * * work_availability
-   * * security_clearances
-   * * references
-   * * assessments
-   * * interviews
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -130,53 +83,6 @@ public interface UpdateProfileRequestOrBuilder *
    * A field mask to specify the profile fields to update.
    * A full update is performed if it is unset.
-   * Valid values are:
-   * * external_id
-   * * source
-   * * source_types
-   * * uri
-   * * is_hirable
-   * * create_time
-   * * update_time
-   * * candidate_update_time
-   * * resume_update_time
-   * * resume
-   * * person_names
-   * * addresses
-   * * email_addresses
-   * * phone_numbers
-   * * personal_uris
-   * * additional_contact_info
-   * * employment_records
-   * * education_records
-   * * skills
-   * * activities
-   * * publications
-   * * patents
-   * * certifications
-   * * recruiting_notes
-   * * custom_attributes
-   * * group_id
-   * * external_system
-   * * source_note
-   * * primary_responsibilities
-   * * citizenships
-   * * work_authorizations
-   * * employee_types
-   * * language_code
-   * * qualification_summary
-   * * allowed_contact_types
-   * * preferred_contact_types
-   * * contact_availability
-   * * language_fluencies
-   * * work_preference
-   * * industry_experiences
-   * * work_environment_experiences
-   * * work_availability
-   * * security_clearances
-   * * references
-   * * assessments
-   * * interviews
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -190,53 +96,6 @@ public interface UpdateProfileRequestOrBuilder *
    * A field mask to specify the profile fields to update.
    * A full update is performed if it is unset.
-   * Valid values are:
-   * * external_id
-   * * source
-   * * source_types
-   * * uri
-   * * is_hirable
-   * * create_time
-   * * update_time
-   * * candidate_update_time
-   * * resume_update_time
-   * * resume
-   * * person_names
-   * * addresses
-   * * email_addresses
-   * * phone_numbers
-   * * personal_uris
-   * * additional_contact_info
-   * * employment_records
-   * * education_records
-   * * skills
-   * * activities
-   * * publications
-   * * patents
-   * * certifications
-   * * recruiting_notes
-   * * custom_attributes
-   * * group_id
-   * * external_system
-   * * source_note
-   * * primary_responsibilities
-   * * citizenships
-   * * work_authorizations
-   * * employee_types
-   * * language_code
-   * * qualification_summary
-   * * allowed_contact_types
-   * * preferred_contact_types
-   * * contact_availability
-   * * language_fluencies
-   * * work_preference
-   * * industry_experiences
-   * * work_environment_experiences
-   * * work_availability
-   * * security_clearances
-   * * references
-   * * assessments
-   * * interviews
    * 
* * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/application.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/application.proto index 3efcab00..ccb49208 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/application.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/application.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,19 +11,18 @@ // 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. -// syntax = "proto3"; package google.cloud.talent.v4beta1; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/type/date.proto"; -import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -116,33 +115,30 @@ message Application { // For example, "projects/foo/tenants/bar/profiles/baz". string profile = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // One of either a job or a company is required. - // - // Resource name of the job which the candidate applied for. + // Required. Resource name of the job which the candidate applied for. // // The format is // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, // "projects/foo/tenants/bar/jobs/baz". - string job = 4 [(google.api.resource_reference) = { - type: "jobs.googleapis.com/Job" - }]; + string job = 4 [ + (google.api.resource_reference).type = "jobs.googleapis.com/Job", + (google.api.field_behavior) = REQUIRED + ]; - // One of either a job or a company is required. - // // Resource name of the company which the candidate applied for. // // The format is // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". // For example, "projects/foo/tenants/bar/companies/baz". - string company = 5 [(google.api.resource_reference) = { - type: "jobs.googleapis.com/Company" - }]; + string company = 5 [ + (google.api.resource_reference) = { type: "jobs.googleapis.com/Company" } + ]; // The application date. google.type.Date application_date = 7; - // Required. What is the most recent stage of the application (that is, new, screen, - // send cv, hired, finished work)? This field is intentionally not + // Required. What is the most recent stage of the application (that is, new, + // screen, send cv, hired, finished work)? This field is intentionally not // comprehensive of every possible status, but instead, represents statuses // that would be used to indicate to the ML models good / bad matches. ApplicationStage stage = 11 [(google.api.field_behavior) = REQUIRED]; @@ -159,7 +155,8 @@ message Application { google.protobuf.BoolValue referral = 18; // Required. Reflects the time that the application was created. - google.protobuf.Timestamp create_time = 19 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp create_time = 19 + [(google.api.field_behavior) = REQUIRED]; // The last update timestamp. google.protobuf.Timestamp update_time = 20; @@ -176,7 +173,8 @@ message Application { // Output only. Indicates whether this job application is a match to // application related filters. This value is only applicable in profile // search response. - google.protobuf.BoolValue is_match = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.BoolValue is_match = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Job title snippet shows how the job title is related to a // search query. It's empty if the job title isn't related to the search diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/application_service.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/application_service.proto index bfa38296..c9f990da 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/application_service.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/application_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/batch.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/batch.proto index 577a304d..074e8705 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/batch.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/batch.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/common.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/common.proto index 2524a492..13f77421 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/common.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/company.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/company.proto index 74f0b889..4ab6aaa6 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/company.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/company.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/company_service.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/company_service.proto index daeb2cce..ac6a7d74 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/company_service.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/company_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -181,7 +180,7 @@ message ListCompaniesRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "jobs.googleapis.com/TenantOrProject" + child_type: "jobs.googleapis.com/Company" } ]; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/completion_service.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/completion_service.proto index d6fba95d..2e45ac7d 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/completion_service.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/completion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -70,31 +69,22 @@ message CompleteQueryRequest { // Suggest job titles for jobs autocomplete. // - // For - // [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE] - // type, only open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // are returned. + // For [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE] type, only open jobs with the same + // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned. JOB_TITLE = 1; // Suggest company names for jobs autocomplete. // - // For - // [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME] - // type, only companies having open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // are returned. + // For [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME] type, + // only companies having open jobs with the same [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are + // returned. COMPANY_NAME = 2; // Suggest both job titles and company names for jobs autocomplete. // - // For - // [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED] - // type, only open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // or companies having open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // are returned. + // For [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED] type, only open jobs with the same + // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] or companies having open jobs with the same + // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned. COMBINED = 3; } @@ -108,7 +98,7 @@ message CompleteQueryRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "jobs.googleapis.com/TenantOrProject" + child_type: "jobs.googleapis.com/Company" } ]; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/event.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/event.proto index 8af726a4..c5a71553 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/event.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/event.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/event_service.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/event_service.proto index b5da5f21..4577352e 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/event_service.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/event_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -66,7 +65,7 @@ message CreateClientEventRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "jobs.googleapis.com/TenantOrProject" + child_type: "jobs.googleapis.com/Company" } ]; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/filters.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/filters.proto index 46b26795..be457b43 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/filters.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/filters.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/histogram.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/histogram.proto index 467f8345..10938690 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/histogram.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/histogram.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/job.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/job.proto index 3746fa86..86a5c38f 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/job.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/job.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/job_service.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/job_service.proto index e2216aa6..148e6486 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/job_service.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/job_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -435,10 +434,10 @@ message SearchJobsRequest { // An error is thrown if not specified. ImportanceLevel importance_level = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Controls over how job documents get ranked on top of existing - // relevance score (determined by API algorithm). A combination of the - // ranking expression and relevance score is used to determine job's final - // ranking position. + // Required. Controls over how job documents get ranked on top of existing relevance + // score (determined by API algorithm). A combination of the ranking + // expression and relevance score is used to determine job's final ranking + // position. // // The syntax for this expression is a subset of Google SQL syntax. // @@ -648,8 +647,6 @@ message SearchJobsRequest { // // The maximum allowed value is 5000. Otherwise an error is thrown. // - // The maximum allowed value is 5000. Otherwise an error is thrown. - // // For example, 0 means to return results starting from the first matching // job, and 10 means to return from the 11th job. This can be used for // pagination, (for example, pageSize = 10 and offset = 10 means to return diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/profile.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/profile.proto index 16d4e714..e087a8cd 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/profile.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/profile.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/profile_service.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/profile_service.proto index f443511e..4a153fd2 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/profile_service.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/profile_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -109,7 +108,12 @@ message ListProfilesRequest { // // The format is "projects/{project_id}/tenants/{tenant_id}". For example, // "projects/foo/tenants/bar". - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Profile" + } + ]; // The filter string specifies the profiles to be enumerated. // @@ -200,55 +204,6 @@ message UpdateProfileRequest { // A field mask to specify the profile fields to update. // // A full update is performed if it is unset. - // - // Valid values are: - // - // * external_id - // * source - // * source_types - // * uri - // * is_hirable - // * create_time - // * update_time - // * candidate_update_time - // * resume_update_time - // * resume - // * person_names - // * addresses - // * email_addresses - // * phone_numbers - // * personal_uris - // * additional_contact_info - // * employment_records - // * education_records - // * skills - // * activities - // * publications - // * patents - // * certifications - // * recruiting_notes - // * custom_attributes - // * group_id - // * external_system - // * source_note - // * primary_responsibilities - // * citizenships - // * work_authorizations - // * employee_types - // * language_code - // * qualification_summary - // * allowed_contact_types - // * preferred_contact_types - // * contact_availability - // * language_fluencies - // * work_preference - // * industry_experiences - // * work_environment_experiences - // * work_availability - // * security_clearances - // * references - // * assessments - // * interviews google.protobuf.FieldMask update_mask = 2; } diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/tenant.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/tenant.proto index d0e7d585..0328c143 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/tenant.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/tenant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -27,11 +26,6 @@ option java_multiple_files = true; option java_outer_classname = "TenantResourceProto"; option java_package = "com.google.cloud.talent.v4beta1"; option objc_class_prefix = "CTS"; -option (google.api.resource_definition) = { - type: "jobs.googleapis.com/TenantOrProject" - pattern: "projects/{project}/tenants/{tenant}" - pattern: "projects/{project}" -}; // A Tenant resource represents a tenant in the service. A tenant is a group or // entity that shares common access with specific privileges for resources like diff --git a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/tenant_service.proto b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/tenant_service.proto index ab1dd2f5..3eb260d8 100644 --- a/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/tenant_service.proto +++ b/proto-google-cloud-talent-v4beta1/src/main/proto/google/cloud/talent/v4beta1/tenant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/renovate.json b/renovate.json index 268a4669..fd514d4c 100644 --- a/renovate.json +++ b/renovate.json @@ -54,6 +54,15 @@ "semanticCommitType": "build", "semanticCommitScope": "deps" }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-talent", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, { "packagePatterns": [ "^com.google.cloud:google-cloud-" @@ -68,4 +77,4 @@ } ], "semanticCommits": true -} +} \ No newline at end of file diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchAutocompleteJobTitle.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchAutocompleteJobTitle.java new file mode 100644 index 00000000..546585ae --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchAutocompleteJobTitle.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_autocomplete_job_title") +// sample-metadata: +// title: +// description: Complete job title given partial text (autocomplete) +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchAutocompleteJobTitle [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--query "[partially typed job title]"] [--num_results 5] [--language_code "en-US"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.CompleteQueryRequest; +import com.google.cloud.talent.v4beta1.CompleteQueryResponse; +import com.google.cloud.talent.v4beta1.CompleteQueryResponse.CompletionResult; +import com.google.cloud.talent.v4beta1.CompletionClient; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import java.util.Arrays; +import java.util.List; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchAutocompleteJobTitle { + // [START job_search_autocomplete_job_title] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.CompleteQueryRequest; + * import com.google.cloud.talent.v4beta1.CompleteQueryResponse; + * import com.google.cloud.talent.v4beta1.CompleteQueryResponse.CompletionResult; + * import com.google.cloud.talent.v4beta1.CompletionClient; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + * import java.util.Arrays; + * import java.util.List; + */ + + public static void sampleCompleteQuery() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String query = "[partially typed job title]"; + int numResults = 5; + String languageCode = "en-US"; + sampleCompleteQuery(projectId, tenantId, query, numResults, languageCode); + } + + /** + * Complete job title given partial text (autocomplete) + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenantd + */ + public static void sampleCompleteQuery( + String projectId, String tenantId, String query, int numResults, String languageCode) { + try (CompletionClient completionClient = CompletionClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + List languageCodes = Arrays.asList(languageCode); + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setParent(parent.toString()) + .setQuery(query) + .setPageSize(numResults) + .addAllLanguageCodes(languageCodes) + .build(); + CompleteQueryResponse response = completionClient.completeQuery(request); + for (CompleteQueryResponse.CompletionResult result : response.getCompletionResultsList()) { + System.out.printf("Suggested title: %s\n", result.getSuggestion()); + // Suggestion type is JOB_TITLE or COMPANY_TITLE + System.out.printf("Suggestion type: %s\n", result.getType()); + } + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_autocomplete_job_title] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("query").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("num_results").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("language_code").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String query = cl.getOptionValue("query", "[partially typed job title]"); + int numResults = + cl.getOptionValue("num_results") != null + ? Integer.parseInt(cl.getOptionValue("num_results")) + : 5; + String languageCode = cl.getOptionValue("language_code", "en-US"); + + sampleCompleteQuery(projectId, tenantId, query, numResults, languageCode); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchCreateJobs.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchCreateJobs.java new file mode 100644 index 00000000..d6547694 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchCreateJobs.java @@ -0,0 +1,242 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("LongRunningRequestAsync", "job_search_batch_create_jobs") +// sample-metadata: +// title: +// description: Batch Create Jobs +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchBatchCreateJobs [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--company_name_one "Company name, e.g. projects/your-project/companies/company-id"] [--requisition_id_one "Job requisition ID, aka Posting ID. Unique per job."] [--title_one "Software Engineer"] [--description_one "This is a description of this wonderful job!"] [--job_application_url_one "https://www.example.org/job-posting/123"] [--address_one "1600 Amphitheatre Parkway, Mountain View, CA 94043"] [--language_code_one "en-US"] [--company_name_two "Company name, e.g. projects/your-project/companies/company-id"] [--requisition_id_two "Job requisition ID, aka Posting ID. Unique per job."] [--title_two "Quality Assurance"] [--description_two "This is a description of this wonderful job!"] [--job_application_url_two "https://www.example.org/job-posting/123"] [--address_two "111 8th Avenue, New York, NY 10011"] [--language_code_two "en-US"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.talent.v4beta1.BatchCreateJobsRequest; +import com.google.cloud.talent.v4beta1.BatchOperationMetadata; +import com.google.cloud.talent.v4beta1.Job; +import com.google.cloud.talent.v4beta1.Job.ApplicationInfo; +import com.google.cloud.talent.v4beta1.JobOperationResult; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.TenantName; +import java.util.Arrays; +import java.util.List; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchBatchCreateJobs { + // [START job_search_batch_create_jobs] + /* + * Please include the following imports to run this sample. + * + * import com.google.api.gax.longrunning.OperationFuture; + * import com.google.cloud.talent.v4beta1.BatchCreateJobsRequest; + * import com.google.cloud.talent.v4beta1.BatchOperationMetadata; + * import com.google.cloud.talent.v4beta1.Job; + * import com.google.cloud.talent.v4beta1.Job.ApplicationInfo; + * import com.google.cloud.talent.v4beta1.JobOperationResult; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.TenantName; + * import java.util.Arrays; + * import java.util.List; + */ + + public static void sampleBatchCreateJobs() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String companyNameOne = "Company name, e.g. projects/your-project/companies/company-id"; + String requisitionIdOne = "Job requisition ID, aka Posting ID. Unique per job."; + String titleOne = "Software Engineer"; + String descriptionOne = "This is a description of this wonderful job!"; + String jobApplicationUrlOne = "https://www.example.org/job-posting/123"; + String addressOne = "1600 Amphitheatre Parkway, Mountain View, CA 94043"; + String languageCodeOne = "en-US"; + String companyNameTwo = "Company name, e.g. projects/your-project/companies/company-id"; + String requisitionIdTwo = "Job requisition ID, aka Posting ID. Unique per job."; + String titleTwo = "Quality Assurance"; + String descriptionTwo = "This is a description of this wonderful job!"; + String jobApplicationUrlTwo = "https://www.example.org/job-posting/123"; + String addressTwo = "111 8th Avenue, New York, NY 10011"; + String languageCodeTwo = "en-US"; + sampleBatchCreateJobs( + projectId, + tenantId, + companyNameOne, + requisitionIdOne, + titleOne, + descriptionOne, + jobApplicationUrlOne, + addressOne, + languageCodeOne, + companyNameTwo, + requisitionIdTwo, + titleTwo, + descriptionTwo, + jobApplicationUrlTwo, + addressTwo, + languageCodeTwo); + } + + /** + * Batch Create Jobs + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenant + */ + public static void sampleBatchCreateJobs( + String projectId, + String tenantId, + String companyNameOne, + String requisitionIdOne, + String titleOne, + String descriptionOne, + String jobApplicationUrlOne, + String addressOne, + String languageCodeOne, + String companyNameTwo, + String requisitionIdTwo, + String titleTwo, + String descriptionTwo, + String jobApplicationUrlTwo, + String addressTwo, + String languageCodeTwo) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + String formattedParent = TenantName.format(projectId, tenantId); + List uris = Arrays.asList(jobApplicationUrlOne); + Job.ApplicationInfo applicationInfo = + Job.ApplicationInfo.newBuilder().addAllUris(uris).build(); + List addresses = Arrays.asList(addressOne); + Job jobsElement = + Job.newBuilder() + .setCompany(companyNameOne) + .setRequisitionId(requisitionIdOne) + .setTitle(titleOne) + .setDescription(descriptionOne) + .setApplicationInfo(applicationInfo) + .addAllAddresses(addresses) + .setLanguageCode(languageCodeOne) + .build(); + List uris2 = Arrays.asList(jobApplicationUrlTwo); + Job.ApplicationInfo applicationInfo2 = + Job.ApplicationInfo.newBuilder().addAllUris(uris2).build(); + List addresses2 = Arrays.asList(addressTwo); + Job jobsElement2 = + Job.newBuilder() + .setCompany(companyNameTwo) + .setRequisitionId(requisitionIdTwo) + .setTitle(titleTwo) + .setDescription(descriptionTwo) + .setApplicationInfo(applicationInfo2) + .addAllAddresses(addresses2) + .setLanguageCode(languageCodeTwo) + .build(); + List jobs = Arrays.asList(jobsElement, jobsElement2); + BatchCreateJobsRequest request = + BatchCreateJobsRequest.newBuilder().setParent(formattedParent).addAllJobs(jobs).build(); + OperationFuture future = + jobServiceClient.batchCreateJobsAsync(request); + + System.out.println("Waiting for operation to complete..."); + JobOperationResult response = future.get(); + System.out.printf("Batch response: %s\n", response); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_batch_create_jobs] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("company_name_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("requisition_id_one").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("title_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("description_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("job_application_url_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("address_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("language_code_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("company_name_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("requisition_id_two").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("title_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("description_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("job_application_url_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("address_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("language_code_two").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String companyNameOne = + cl.getOptionValue( + "company_name_one", "Company name, e.g. projects/your-project/companies/company-id"); + String requisitionIdOne = + cl.getOptionValue( + "requisition_id_one", "Job requisition ID, aka Posting ID. Unique per job."); + String titleOne = cl.getOptionValue("title_one", "Software Engineer"); + String descriptionOne = + cl.getOptionValue("description_one", "This is a description of this wonderful job!"); + String jobApplicationUrlOne = + cl.getOptionValue("job_application_url_one", "https://www.example.org/job-posting/123"); + String addressOne = + cl.getOptionValue("address_one", "1600 Amphitheatre Parkway, Mountain View, CA 94043"); + String languageCodeOne = cl.getOptionValue("language_code_one", "en-US"); + String companyNameTwo = + cl.getOptionValue( + "company_name_two", "Company name, e.g. projects/your-project/companies/company-id"); + String requisitionIdTwo = + cl.getOptionValue( + "requisition_id_two", "Job requisition ID, aka Posting ID. Unique per job."); + String titleTwo = cl.getOptionValue("title_two", "Quality Assurance"); + String descriptionTwo = + cl.getOptionValue("description_two", "This is a description of this wonderful job!"); + String jobApplicationUrlTwo = + cl.getOptionValue("job_application_url_two", "https://www.example.org/job-posting/123"); + String addressTwo = cl.getOptionValue("address_two", "111 8th Avenue, New York, NY 10011"); + String languageCodeTwo = cl.getOptionValue("language_code_two", "en-US"); + + sampleBatchCreateJobs( + projectId, + tenantId, + companyNameOne, + requisitionIdOne, + titleOne, + descriptionOne, + jobApplicationUrlOne, + addressOne, + languageCodeOne, + companyNameTwo, + requisitionIdTwo, + titleTwo, + descriptionTwo, + jobApplicationUrlTwo, + addressTwo, + languageCodeTwo); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchDeleteJob.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchDeleteJob.java new file mode 100644 index 00000000..88ab7406 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchDeleteJob.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_batch_delete_job") +// sample-metadata: +// title: +// description: Batch delete jobs using a filter +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchBatchDeleteJob [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--filter "[Query]"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchBatchDeleteJob { + // [START job_search_batch_delete_job] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.BatchDeleteJobsRequest; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + */ + + public static void sampleBatchDeleteJobs() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String filter = "[Query]"; + sampleBatchDeleteJobs(projectId, tenantId, filter); + } + + /** + * Batch delete jobs using a filter + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenantd + * @param filter The filter string specifies the jobs to be deleted. For example: companyName = + * "projects/api-test-project/companies/123" AND equisitionId = "req-1" + */ + public static void sampleBatchDeleteJobs(String projectId, String tenantId, String filter) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + BatchDeleteJobsRequest request = + BatchDeleteJobsRequest.newBuilder() + .setParent(parent.toString()) + .setFilter(filter) + .build(); + jobServiceClient.batchDeleteJobs(request); + System.out.println("Batch deleted jobs from filter"); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_batch_delete_job] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("filter").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String filter = cl.getOptionValue("filter", "[Query]"); + + sampleBatchDeleteJobs(projectId, tenantId, filter); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchUpdateJobs.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchUpdateJobs.java new file mode 100644 index 00000000..74682ed0 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchBatchUpdateJobs.java @@ -0,0 +1,262 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("LongRunningRequestAsync", "job_search_batch_update_jobs") +// sample-metadata: +// title: +// description: Batch Update Jobs +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchBatchUpdateJobs [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--job_name_one "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id"] [--company_name_one "Company name, e.g. projects/your-project/companies/company-id"] [--requisition_id_one "Job requisition ID, aka Posting ID. Unique per job."] [--title_one "Software Engineer"] [--description_one "This is a description of this wonderful job!"] [--job_application_url_one "https://www.example.org/job-posting/123"] [--address_one "1600 Amphitheatre Parkway, Mountain View, CA 94043"] [--language_code_one "en-US"] [--job_name_two "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id"] [--company_name_two "Company name, e.g. projects/your-project/companies/company-id"] [--requisition_id_two "Job requisition ID, aka Posting ID. Unique per job."] [--title_two "Quality Assurance"] [--description_two "This is a description of this wonderful job!"] [--job_application_url_two "https://www.example.org/job-posting/123"] [--address_two "111 8th Avenue, New York, NY 10011"] [--language_code_two "en-US"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.talent.v4beta1.BatchOperationMetadata; +import com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest; +import com.google.cloud.talent.v4beta1.Job; +import com.google.cloud.talent.v4beta1.Job.ApplicationInfo; +import com.google.cloud.talent.v4beta1.JobOperationResult; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.TenantName; +import java.util.Arrays; +import java.util.List; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchBatchUpdateJobs { + // [START job_search_batch_update_jobs] + /* + * Please include the following imports to run this sample. + * + * import com.google.api.gax.longrunning.OperationFuture; + * import com.google.cloud.talent.v4beta1.BatchOperationMetadata; + * import com.google.cloud.talent.v4beta1.BatchUpdateJobsRequest; + * import com.google.cloud.talent.v4beta1.Job; + * import com.google.cloud.talent.v4beta1.Job.ApplicationInfo; + * import com.google.cloud.talent.v4beta1.JobOperationResult; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.TenantName; + * import java.util.Arrays; + * import java.util.List; + */ + + public static void sampleBatchUpdateJobs() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String jobNameOne = "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id"; + String companyNameOne = "Company name, e.g. projects/your-project/companies/company-id"; + String requisitionIdOne = "Job requisition ID, aka Posting ID. Unique per job."; + String titleOne = "Software Engineer"; + String descriptionOne = "This is a description of this wonderful job!"; + String jobApplicationUrlOne = "https://www.example.org/job-posting/123"; + String addressOne = "1600 Amphitheatre Parkway, Mountain View, CA 94043"; + String languageCodeOne = "en-US"; + String jobNameTwo = "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id"; + String companyNameTwo = "Company name, e.g. projects/your-project/companies/company-id"; + String requisitionIdTwo = "Job requisition ID, aka Posting ID. Unique per job."; + String titleTwo = "Quality Assurance"; + String descriptionTwo = "This is a description of this wonderful job!"; + String jobApplicationUrlTwo = "https://www.example.org/job-posting/123"; + String addressTwo = "111 8th Avenue, New York, NY 10011"; + String languageCodeTwo = "en-US"; + sampleBatchUpdateJobs( + projectId, + tenantId, + jobNameOne, + companyNameOne, + requisitionIdOne, + titleOne, + descriptionOne, + jobApplicationUrlOne, + addressOne, + languageCodeOne, + jobNameTwo, + companyNameTwo, + requisitionIdTwo, + titleTwo, + descriptionTwo, + jobApplicationUrlTwo, + addressTwo, + languageCodeTwo); + } + + /** + * Batch Update Jobs + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenant + */ + public static void sampleBatchUpdateJobs( + String projectId, + String tenantId, + String jobNameOne, + String companyNameOne, + String requisitionIdOne, + String titleOne, + String descriptionOne, + String jobApplicationUrlOne, + String addressOne, + String languageCodeOne, + String jobNameTwo, + String companyNameTwo, + String requisitionIdTwo, + String titleTwo, + String descriptionTwo, + String jobApplicationUrlTwo, + String addressTwo, + String languageCodeTwo) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + String formattedParent = TenantName.format(projectId, tenantId); + List uris = Arrays.asList(jobApplicationUrlOne); + Job.ApplicationInfo applicationInfo = + Job.ApplicationInfo.newBuilder().addAllUris(uris).build(); + List addresses = Arrays.asList(addressOne); + Job jobsElement = + Job.newBuilder() + .setName(jobNameOne) + .setCompany(companyNameOne) + .setRequisitionId(requisitionIdOne) + .setTitle(titleOne) + .setDescription(descriptionOne) + .setApplicationInfo(applicationInfo) + .addAllAddresses(addresses) + .setLanguageCode(languageCodeOne) + .build(); + List uris2 = Arrays.asList(jobApplicationUrlTwo); + Job.ApplicationInfo applicationInfo2 = + Job.ApplicationInfo.newBuilder().addAllUris(uris2).build(); + List addresses2 = Arrays.asList(addressTwo); + Job jobsElement2 = + Job.newBuilder() + .setName(jobNameTwo) + .setCompany(companyNameTwo) + .setRequisitionId(requisitionIdTwo) + .setTitle(titleTwo) + .setDescription(descriptionTwo) + .setApplicationInfo(applicationInfo2) + .addAllAddresses(addresses2) + .setLanguageCode(languageCodeTwo) + .build(); + List jobs = Arrays.asList(jobsElement, jobsElement2); + BatchUpdateJobsRequest request = + BatchUpdateJobsRequest.newBuilder().setParent(formattedParent).addAllJobs(jobs).build(); + OperationFuture future = + jobServiceClient.batchUpdateJobsAsync(request); + + System.out.println("Waiting for operation to complete..."); + JobOperationResult response = future.get(); + System.out.printf("Batch response: %s\n", response); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_batch_update_jobs] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("job_name_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("company_name_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("requisition_id_one").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("title_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("description_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("job_application_url_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("address_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("language_code_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("job_name_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("company_name_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("requisition_id_two").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("title_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("description_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("job_application_url_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("address_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("language_code_two").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String jobNameOne = + cl.getOptionValue( + "job_name_one", "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id"); + String companyNameOne = + cl.getOptionValue( + "company_name_one", "Company name, e.g. projects/your-project/companies/company-id"); + String requisitionIdOne = + cl.getOptionValue( + "requisition_id_one", "Job requisition ID, aka Posting ID. Unique per job."); + String titleOne = cl.getOptionValue("title_one", "Software Engineer"); + String descriptionOne = + cl.getOptionValue("description_one", "This is a description of this wonderful job!"); + String jobApplicationUrlOne = + cl.getOptionValue("job_application_url_one", "https://www.example.org/job-posting/123"); + String addressOne = + cl.getOptionValue("address_one", "1600 Amphitheatre Parkway, Mountain View, CA 94043"); + String languageCodeOne = cl.getOptionValue("language_code_one", "en-US"); + String jobNameTwo = + cl.getOptionValue( + "job_name_two", "job name, e.g. projects/your-project/tenants/tenant-id/jobs/job-id"); + String companyNameTwo = + cl.getOptionValue( + "company_name_two", "Company name, e.g. projects/your-project/companies/company-id"); + String requisitionIdTwo = + cl.getOptionValue( + "requisition_id_two", "Job requisition ID, aka Posting ID. Unique per job."); + String titleTwo = cl.getOptionValue("title_two", "Quality Assurance"); + String descriptionTwo = + cl.getOptionValue("description_two", "This is a description of this wonderful job!"); + String jobApplicationUrlTwo = + cl.getOptionValue("job_application_url_two", "https://www.example.org/job-posting/123"); + String addressTwo = cl.getOptionValue("address_two", "111 8th Avenue, New York, NY 10011"); + String languageCodeTwo = cl.getOptionValue("language_code_two", "en-US"); + + sampleBatchUpdateJobs( + projectId, + tenantId, + jobNameOne, + companyNameOne, + requisitionIdOne, + titleOne, + descriptionOne, + jobApplicationUrlOne, + addressOne, + languageCodeOne, + jobNameTwo, + companyNameTwo, + requisitionIdTwo, + titleTwo, + descriptionTwo, + jobApplicationUrlTwo, + addressTwo, + languageCodeTwo); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCommuteSearch.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCommuteSearch.java new file mode 100644 index 00000000..7413eb8b --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCommuteSearch.java @@ -0,0 +1,126 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("RequestPaged", "job_search_commute_search") +// sample-metadata: +// title: +// description: Search Jobs using commute distance +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchCommuteSearch [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.CommuteFilter; +import com.google.cloud.talent.v4beta1.CommuteMethod; +import com.google.cloud.talent.v4beta1.Job; +import com.google.cloud.talent.v4beta1.JobQuery; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.RequestMetadata; +import com.google.cloud.talent.v4beta1.SearchJobsRequest; +import com.google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import com.google.protobuf.Duration; +import com.google.type.LatLng; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchCommuteSearch { + // [START job_search_commute_search] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.CommuteFilter; + * import com.google.cloud.talent.v4beta1.CommuteMethod; + * import com.google.cloud.talent.v4beta1.Job; + * import com.google.cloud.talent.v4beta1.JobQuery; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.RequestMetadata; + * import com.google.cloud.talent.v4beta1.SearchJobsRequest; + * import com.google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + * import com.google.protobuf.Duration; + * import com.google.type.LatLng; + */ + + public static void sampleSearchJobs() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + sampleSearchJobs(projectId, tenantId); + } + + /** Search Jobs using commute distance */ + public static void sampleSearchJobs(String projectId, String tenantId) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + String domain = "www.example.com"; + String sessionId = "Hashed session identifier"; + String userId = "Hashed user identifier"; + RequestMetadata requestMetadata = + RequestMetadata.newBuilder() + .setDomain(domain) + .setSessionId(sessionId) + .setUserId(userId) + .build(); + CommuteMethod commuteMethod = CommuteMethod.TRANSIT; + long seconds = 1800L; + Duration travelDuration = Duration.newBuilder().setSeconds(seconds).build(); + double latitude = 37.422408; + double longitude = -122.084068; + LatLng startCoordinates = + LatLng.newBuilder().setLatitude(latitude).setLongitude(longitude).build(); + CommuteFilter commuteFilter = + CommuteFilter.newBuilder() + .setCommuteMethod(commuteMethod) + .setTravelDuration(travelDuration) + .setStartCoordinates(startCoordinates) + .build(); + JobQuery jobQuery = JobQuery.newBuilder().setCommuteFilter(commuteFilter).build(); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .setJobQuery(jobQuery) + .build(); + for (SearchJobsResponse.MatchingJob responseItem : + jobServiceClient.searchJobs(request).iterateAll()) { + System.out.printf("Job summary: %s\n", responseItem.getJobSummary()); + System.out.printf("Job title snippet: %s\n", responseItem.getJobTitleSnippet()); + Job job = responseItem.getJob(); + System.out.printf("Job name: %s\n", job.getName()); + System.out.printf("Job title: %s\n", job.getTitle()); + } + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_commute_search] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + + sampleSearchJobs(projectId, tenantId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateClientEvent.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateClientEvent.java new file mode 100644 index 00000000..b1b15ad6 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateClientEvent.java @@ -0,0 +1,128 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_create_client_event") +// sample-metadata: +// title: +// description: Creates a client event +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchCreateClientEvent [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--request_id "[request_id from ResponseMetadata]"] [--event_id "[Set this to a unique identifier]"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.ClientEvent; +import com.google.cloud.talent.v4beta1.CreateClientEventRequest; +import com.google.cloud.talent.v4beta1.EventServiceClient; +import com.google.cloud.talent.v4beta1.JobEvent; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import com.google.protobuf.Timestamp; +import java.util.Arrays; +import java.util.List; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchCreateClientEvent { + // [START job_search_create_client_event] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.ClientEvent; + * import com.google.cloud.talent.v4beta1.CreateClientEventRequest; + * import com.google.cloud.talent.v4beta1.EventServiceClient; + * import com.google.cloud.talent.v4beta1.JobEvent; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + * import com.google.protobuf.Timestamp; + * import java.util.Arrays; + * import java.util.List; + */ + + public static void sampleCreateClientEvent() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String requestId = "[request_id from ResponseMetadata]"; + String eventId = "[Set this to a unique identifier]"; + sampleCreateClientEvent(projectId, tenantId, requestId, eventId); + } + + /** + * Creates a client event + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenant + * @param requestId A unique ID generated in the API responses. Value should be set to the + * request_id from an API response. + * @param eventId A unique identifier, generated by the client application + */ + public static void sampleCreateClientEvent( + String projectId, String tenantId, String requestId, String eventId) { + try (EventServiceClient eventServiceClient = EventServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + + // The timestamp of the event as seconds of UTC time since Unix epoch + // For more information on how to create google.protobuf.Timestamps + // See: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/timestamp.proto + long seconds = 0L; + Timestamp createTime = Timestamp.newBuilder().setSeconds(seconds).build(); + + // The type of event attributed to the behavior of the end user + JobEvent.JobEventType type = JobEvent.JobEventType.VIEW; + + // List of job names associated with this event + String jobsElement = "projects/[Project ID]/tenants/[Tenant ID]/jobs/[Job ID]"; + String jobsElement2 = "projects/[Project ID]/tenants/[Tenant ID]/jobs/[Job ID]"; + List jobs = Arrays.asList(jobsElement, jobsElement2); + JobEvent jobEvent = JobEvent.newBuilder().setType(type).addAllJobs(jobs).build(); + ClientEvent clientEvent = + ClientEvent.newBuilder() + .setRequestId(requestId) + .setEventId(eventId) + .setCreateTime(createTime) + .setJobEvent(jobEvent) + .build(); + CreateClientEventRequest request = + CreateClientEventRequest.newBuilder() + .setParent(parent.toString()) + .setClientEvent(clientEvent) + .build(); + ClientEvent response = eventServiceClient.createClientEvent(request); + System.out.println("Created client event"); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_create_client_event] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("request_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("event_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String requestId = cl.getOptionValue("request_id", "[request_id from ResponseMetadata]"); + String eventId = cl.getOptionValue("event_id", "[Set this to a unique identifier]"); + + sampleCreateClientEvent(projectId, tenantId, requestId, eventId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateCompany.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateCompany.java new file mode 100644 index 00000000..4f862a3c --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateCompany.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_create_company") +// sample-metadata: +// title: +// description: Create Company +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchCreateCompany [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--display_name "My Company Name"] [--external_id "Identifier of this company in my system"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.Company; +import com.google.cloud.talent.v4beta1.CompanyServiceClient; +import com.google.cloud.talent.v4beta1.CreateCompanyRequest; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchCreateCompany { + // [START job_search_create_company] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.Company; + * import com.google.cloud.talent.v4beta1.CompanyServiceClient; + * import com.google.cloud.talent.v4beta1.CreateCompanyRequest; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + */ + + public static void sampleCreateCompany() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String displayName = "My Company Name"; + String externalId = "Identifier of this company in my system"; + sampleCreateCompany(projectId, tenantId, displayName, externalId); + } + + /** + * Create Company + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenant + */ + public static void sampleCreateCompany( + String projectId, String tenantId, String displayName, String externalId) { + try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + Company company = + Company.newBuilder().setDisplayName(displayName).setExternalId(externalId).build(); + CreateCompanyRequest request = + CreateCompanyRequest.newBuilder() + .setParent(parent.toString()) + .setCompany(company) + .build(); + Company response = companyServiceClient.createCompany(request); + System.out.println("Created Company"); + System.out.printf("Name: %s\n", response.getName()); + System.out.printf("Display Name: %s\n", response.getDisplayName()); + System.out.printf("External ID: %s\n", response.getExternalId()); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_create_company] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("display_name").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("external_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String displayName = cl.getOptionValue("display_name", "My Company Name"); + String externalId = cl.getOptionValue("external_id", "Identifier of this company in my system"); + + sampleCreateCompany(projectId, tenantId, displayName, externalId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJob.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJob.java new file mode 100644 index 00000000..03168b6b --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJob.java @@ -0,0 +1,171 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_create_job") +// sample-metadata: +// title: +// description: Create Job +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchCreateJob [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--company_name "Company name, e.g. projects/your-project/companies/company-id"] [--requisition_id "Job requisition ID, aka Posting ID. Unique per job."] [--title "Software Engineer"] [--description "This is a description of this wonderful job!"] [--job_application_url "https://www.example.org/job-posting/123"] [--address_one "1600 Amphitheatre Parkway, Mountain View, CA 94043"] [--address_two "111 8th Avenue, New York, NY 10011"] [--language_code "en-US"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.CreateJobRequest; +import com.google.cloud.talent.v4beta1.Job; +import com.google.cloud.talent.v4beta1.Job.ApplicationInfo; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import java.util.Arrays; +import java.util.List; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchCreateJob { + // [START job_search_create_job] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.CreateJobRequest; + * import com.google.cloud.talent.v4beta1.Job; + * import com.google.cloud.talent.v4beta1.Job.ApplicationInfo; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + * import java.util.Arrays; + * import java.util.List; + */ + + public static void sampleCreateJob() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String companyName = "Company name, e.g. projects/your-project/companies/company-id"; + String requisitionId = "Job requisition ID, aka Posting ID. Unique per job."; + String title = "Software Engineer"; + String description = "This is a description of this wonderful job!"; + String jobApplicationUrl = "https://www.example.org/job-posting/123"; + String addressOne = "1600 Amphitheatre Parkway, Mountain View, CA 94043"; + String addressTwo = "111 8th Avenue, New York, NY 10011"; + String languageCode = "en-US"; + sampleCreateJob( + projectId, + tenantId, + companyName, + requisitionId, + title, + description, + jobApplicationUrl, + addressOne, + addressTwo, + languageCode); + } + + /** + * Create Job + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenant + */ + public static void sampleCreateJob( + String projectId, + String tenantId, + String companyName, + String requisitionId, + String title, + String description, + String jobApplicationUrl, + String addressOne, + String addressTwo, + String languageCode) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + List uris = Arrays.asList(jobApplicationUrl); + Job.ApplicationInfo applicationInfo = + Job.ApplicationInfo.newBuilder().addAllUris(uris).build(); + List addresses = Arrays.asList(addressOne, addressTwo); + Job job = + Job.newBuilder() + .setCompany(companyName) + .setRequisitionId(requisitionId) + .setTitle(title) + .setDescription(description) + .setApplicationInfo(applicationInfo) + .addAllAddresses(addresses) + .setLanguageCode(languageCode) + .build(); + CreateJobRequest request = + CreateJobRequest.newBuilder().setParent(parent.toString()).setJob(job).build(); + Job response = jobServiceClient.createJob(request); + System.out.printf("Created job: %s\n", response.getName()); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_create_job] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("company_name").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("requisition_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("title").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("description").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("job_application_url").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("address_one").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("address_two").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("language_code").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String companyName = + cl.getOptionValue( + "company_name", "Company name, e.g. projects/your-project/companies/company-id"); + String requisitionId = + cl.getOptionValue("requisition_id", "Job requisition ID, aka Posting ID. Unique per job."); + String title = cl.getOptionValue("title", "Software Engineer"); + String description = + cl.getOptionValue("description", "This is a description of this wonderful job!"); + String jobApplicationUrl = + cl.getOptionValue("job_application_url", "https://www.example.org/job-posting/123"); + String addressOne = + cl.getOptionValue("address_one", "1600 Amphitheatre Parkway, Mountain View, CA 94043"); + String addressTwo = cl.getOptionValue("address_two", "111 8th Avenue, New York, NY 10011"); + String languageCode = cl.getOptionValue("language_code", "en-US"); + + sampleCreateJob( + projectId, + tenantId, + companyName, + requisitionId, + title, + description, + jobApplicationUrl, + addressOne, + addressTwo, + languageCode); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJobCustomAttributes.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJobCustomAttributes.java new file mode 100644 index 00000000..0077e2c0 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateJobCustomAttributes.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_create_job_custom_attributes") +// sample-metadata: +// title: +// description: Create Job with Custom Attributes +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchCreateJobCustomAttributes [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--company_name "Company name, e.g. projects/your-project/companies/company-id"] [--requisition_id "Job requisition ID, aka Posting ID. Unique per job."] [--language_code "en-US"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.CreateJobRequest; +import com.google.cloud.talent.v4beta1.Job; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchCreateJobCustomAttributes { + // [START job_search_create_job_custom_attributes] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.CreateJobRequest; + * import com.google.cloud.talent.v4beta1.Job; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + */ + + public static void sampleCreateJob() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String companyName = "Company name, e.g. projects/your-project/companies/company-id"; + String requisitionId = "Job requisition ID, aka Posting ID. Unique per job."; + String languageCode = "en-US"; + sampleCreateJob(projectId, tenantId, companyName, requisitionId, languageCode); + } + + /** + * Create Job with Custom Attributes + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenantd + */ + public static void sampleCreateJob( + String projectId, + String tenantId, + String companyName, + String requisitionId, + String languageCode) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + Job job = + Job.newBuilder() + .setCompany(companyName) + .setRequisitionId(requisitionId) + .setLanguageCode(languageCode) + .build(); + CreateJobRequest request = + CreateJobRequest.newBuilder().setParent(parent.toString()).setJob(job).build(); + Job response = jobServiceClient.createJob(request); + System.out.printf("Created job: %s\n", response.getName()); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_create_job_custom_attributes] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("company_name").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("requisition_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("language_code").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String companyName = + cl.getOptionValue( + "company_name", "Company name, e.g. projects/your-project/companies/company-id"); + String requisitionId = + cl.getOptionValue("requisition_id", "Job requisition ID, aka Posting ID. Unique per job."); + String languageCode = cl.getOptionValue("language_code", "en-US"); + + sampleCreateJob(projectId, tenantId, companyName, requisitionId, languageCode); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateTenant.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateTenant.java new file mode 100644 index 00000000..b631d5be --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCreateTenant.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_create_tenant") +// sample-metadata: +// title: +// description: Create Tenant for scoping resources, e.g. companies and jobs +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchCreateTenant [--args='[--project_id "Your Google Cloud Project ID"] [--external_id "Your Unique Identifier for Tenant"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.CreateTenantRequest; +import com.google.cloud.talent.v4beta1.ProjectName; +import com.google.cloud.talent.v4beta1.Tenant; +import com.google.cloud.talent.v4beta1.TenantServiceClient; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchCreateTenant { + // [START job_search_create_tenant] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.CreateTenantRequest; + * import com.google.cloud.talent.v4beta1.ProjectName; + * import com.google.cloud.talent.v4beta1.Tenant; + * import com.google.cloud.talent.v4beta1.TenantServiceClient; + */ + + public static void sampleCreateTenant() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String externalId = "Your Unique Identifier for Tenant"; + sampleCreateTenant(projectId, externalId); + } + + /** Create Tenant for scoping resources, e.g. companies and jobs */ + public static void sampleCreateTenant(String projectId, String externalId) { + try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) { + ProjectName parent = ProjectName.of(projectId); + Tenant tenant = Tenant.newBuilder().setExternalId(externalId).build(); + CreateTenantRequest request = + CreateTenantRequest.newBuilder().setParent(parent.toString()).setTenant(tenant).build(); + Tenant response = tenantServiceClient.createTenant(request); + System.out.println("Created Tenant"); + System.out.printf("Name: %s\n", response.getName()); + System.out.printf("External ID: %s\n", response.getExternalId()); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_create_tenant] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("external_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String externalId = cl.getOptionValue("external_id", "Your Unique Identifier for Tenant"); + + sampleCreateTenant(projectId, externalId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCustomRankingSearch.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCustomRankingSearch.java new file mode 100644 index 00000000..495bb648 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchCustomRankingSearch.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("RequestPaged", "job_search_custom_ranking_search") +// sample-metadata: +// title: +// description: Search Jobs using custom rankings +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchCustomRankingSearch [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.Job; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.RequestMetadata; +import com.google.cloud.talent.v4beta1.SearchJobsRequest; +import com.google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo; +import com.google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchCustomRankingSearch { + // [START job_search_custom_ranking_search] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.Job; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.RequestMetadata; + * import com.google.cloud.talent.v4beta1.SearchJobsRequest; + * import com.google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo; + * import com.google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + */ + + public static void sampleSearchJobs() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + sampleSearchJobs(projectId, tenantId); + } + + /** + * Search Jobs using custom rankings + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenantd + */ + public static void sampleSearchJobs(String projectId, String tenantId) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + String domain = "www.example.com"; + String sessionId = "Hashed session identifier"; + String userId = "Hashed user identifier"; + RequestMetadata requestMetadata = + RequestMetadata.newBuilder() + .setDomain(domain) + .setSessionId(sessionId) + .setUserId(userId) + .build(); + SearchJobsRequest.CustomRankingInfo.ImportanceLevel importanceLevel = + SearchJobsRequest.CustomRankingInfo.ImportanceLevel.EXTREME; + String rankingExpression = "(someFieldLong + 25) * 0.25"; + SearchJobsRequest.CustomRankingInfo customRankingInfo = + SearchJobsRequest.CustomRankingInfo.newBuilder() + .setImportanceLevel(importanceLevel) + .setRankingExpression(rankingExpression) + .build(); + String orderBy = "custom_ranking desc"; + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .setCustomRankingInfo(customRankingInfo) + .setOrderBy(orderBy) + .build(); + for (SearchJobsResponse.MatchingJob responseItem : + jobServiceClient.searchJobs(request).iterateAll()) { + System.out.printf("Job summary: %s\n", responseItem.getJobSummary()); + System.out.printf("Job title snippet: %s\n", responseItem.getJobTitleSnippet()); + Job job = responseItem.getJob(); + System.out.printf("Job name: %s\n", job.getName()); + System.out.printf("Job title: %s\n", job.getTitle()); + } + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_custom_ranking_search] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + + sampleSearchJobs(projectId, tenantId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteCompany.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteCompany.java new file mode 100644 index 00000000..3dc7aa49 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteCompany.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_delete_company") +// sample-metadata: +// title: +// description: Delete Company +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchDeleteCompany [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--company_id "ID of the company to delete"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.CompanyName; +import com.google.cloud.talent.v4beta1.CompanyServiceClient; +import com.google.cloud.talent.v4beta1.CompanyWithTenantName; +import com.google.cloud.talent.v4beta1.DeleteCompanyRequest; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchDeleteCompany { + // [START job_search_delete_company] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.CompanyName; + * import com.google.cloud.talent.v4beta1.CompanyServiceClient; + * import com.google.cloud.talent.v4beta1.CompanyWithTenantName; + * import com.google.cloud.talent.v4beta1.DeleteCompanyRequest; + */ + + public static void sampleDeleteCompany() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String companyId = "ID of the company to delete"; + sampleDeleteCompany(projectId, tenantId, companyId); + } + + /** Delete Company */ + public static void sampleDeleteCompany(String projectId, String tenantId, String companyId) { + try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) { + CompanyName name = CompanyWithTenantName.of(projectId, tenantId, companyId); + DeleteCompanyRequest request = + DeleteCompanyRequest.newBuilder().setName(name.toString()).build(); + companyServiceClient.deleteCompany(request); + System.out.println("Deleted company"); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_delete_company] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("company_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String companyId = cl.getOptionValue("company_id", "ID of the company to delete"); + + sampleDeleteCompany(projectId, tenantId, companyId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteJob.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteJob.java new file mode 100644 index 00000000..6464f41a --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteJob.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_delete_job") +// sample-metadata: +// title: +// description: Delete Job +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchDeleteJob [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--job_id "Company ID"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.DeleteJobRequest; +import com.google.cloud.talent.v4beta1.JobName; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.JobWithTenantName; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchDeleteJob { + // [START job_search_delete_job] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.DeleteJobRequest; + * import com.google.cloud.talent.v4beta1.JobName; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.JobWithTenantName; + */ + + public static void sampleDeleteJob() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String jobId = "Company ID"; + sampleDeleteJob(projectId, tenantId, jobId); + } + + /** Delete Job */ + public static void sampleDeleteJob(String projectId, String tenantId, String jobId) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + JobName name = JobWithTenantName.of(projectId, tenantId, jobId); + DeleteJobRequest request = DeleteJobRequest.newBuilder().setName(name.toString()).build(); + jobServiceClient.deleteJob(request); + System.out.println("Deleted job."); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_delete_job] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("job_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String jobId = cl.getOptionValue("job_id", "Company ID"); + + sampleDeleteJob(projectId, tenantId, jobId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteTenant.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteTenant.java new file mode 100644 index 00000000..4c683b5c --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchDeleteTenant.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_delete_tenant") +// sample-metadata: +// title: +// description: Delete Tenant +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchDeleteTenant [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID)"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.DeleteTenantRequest; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantServiceClient; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchDeleteTenant { + // [START job_search_delete_tenant] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.DeleteTenantRequest; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantServiceClient; + */ + + public static void sampleDeleteTenant() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID)"; + sampleDeleteTenant(projectId, tenantId); + } + + /** Delete Tenant */ + public static void sampleDeleteTenant(String projectId, String tenantId) { + try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) { + TenantName name = TenantName.of(projectId, tenantId); + DeleteTenantRequest request = + DeleteTenantRequest.newBuilder().setName(name.toString()).build(); + tenantServiceClient.deleteTenant(request); + System.out.println("Deleted Tenant."); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_delete_tenant] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID)"); + + sampleDeleteTenant(projectId, tenantId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetCompany.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetCompany.java new file mode 100644 index 00000000..6eda4dd0 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetCompany.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_get_company") +// sample-metadata: +// title: +// description: Get Company +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchGetCompany [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--company_id "Company ID"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.Company; +import com.google.cloud.talent.v4beta1.CompanyName; +import com.google.cloud.talent.v4beta1.CompanyServiceClient; +import com.google.cloud.talent.v4beta1.CompanyWithTenantName; +import com.google.cloud.talent.v4beta1.GetCompanyRequest; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchGetCompany { + // [START job_search_get_company] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.Company; + * import com.google.cloud.talent.v4beta1.CompanyName; + * import com.google.cloud.talent.v4beta1.CompanyServiceClient; + * import com.google.cloud.talent.v4beta1.CompanyWithTenantName; + * import com.google.cloud.talent.v4beta1.GetCompanyRequest; + */ + + public static void sampleGetCompany() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String companyId = "Company ID"; + sampleGetCompany(projectId, tenantId, companyId); + } + + /** Get Company */ + public static void sampleGetCompany(String projectId, String tenantId, String companyId) { + try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) { + CompanyName name = CompanyWithTenantName.of(projectId, tenantId, companyId); + GetCompanyRequest request = GetCompanyRequest.newBuilder().setName(name.toString()).build(); + Company response = companyServiceClient.getCompany(request); + System.out.printf("Company name: %s\n", response.getName()); + System.out.printf("Display name: %s\n", response.getDisplayName()); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_get_company] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("company_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String companyId = cl.getOptionValue("company_id", "Company ID"); + + sampleGetCompany(projectId, tenantId, companyId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetJob.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetJob.java new file mode 100644 index 00000000..4673feec --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetJob.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_get_job") +// sample-metadata: +// title: +// description: Get Job +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchGetJob [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--job_id "Job ID"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.GetJobRequest; +import com.google.cloud.talent.v4beta1.Job; +import com.google.cloud.talent.v4beta1.JobName; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.JobWithTenantName; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchGetJob { + // [START job_search_get_job] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.GetJobRequest; + * import com.google.cloud.talent.v4beta1.Job; + * import com.google.cloud.talent.v4beta1.JobName; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.JobWithTenantName; + */ + + public static void sampleGetJob() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String jobId = "Job ID"; + sampleGetJob(projectId, tenantId, jobId); + } + + /** Get Job */ + public static void sampleGetJob(String projectId, String tenantId, String jobId) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + JobName name = JobWithTenantName.of(projectId, tenantId, jobId); + GetJobRequest request = GetJobRequest.newBuilder().setName(name.toString()).build(); + Job response = jobServiceClient.getJob(request); + System.out.printf("Job name: %s\n", response.getName()); + System.out.printf("Requisition ID: %s\n", response.getRequisitionId()); + System.out.printf("Title: %s\n", response.getTitle()); + System.out.printf("Description: %s\n", response.getDescription()); + System.out.printf("Posting language: %s\n", response.getLanguageCode()); + for (String address : response.getAddressesList()) { + System.out.printf("Address: %s\n", address); + } + for (String email : response.getApplicationInfo().getEmailsList()) { + System.out.printf("Email: %s\n", email); + } + for (String websiteUri : response.getApplicationInfo().getUrisList()) { + System.out.printf("Website: %s\n", websiteUri); + } + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_get_job] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("job_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String jobId = cl.getOptionValue("job_id", "Job ID"); + + sampleGetJob(projectId, tenantId, jobId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetTenant.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetTenant.java new file mode 100644 index 00000000..91780ab8 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchGetTenant.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("Request", "job_search_get_tenant") +// sample-metadata: +// title: +// description: Get Tenant by name +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchGetTenant [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.GetTenantRequest; +import com.google.cloud.talent.v4beta1.Tenant; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantServiceClient; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchGetTenant { + // [START job_search_get_tenant] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.GetTenantRequest; + * import com.google.cloud.talent.v4beta1.Tenant; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantServiceClient; + */ + + public static void sampleGetTenant() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID"; + sampleGetTenant(projectId, tenantId); + } + + /** Get Tenant by name */ + public static void sampleGetTenant(String projectId, String tenantId) { + try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) { + TenantName name = TenantName.of(projectId, tenantId); + GetTenantRequest request = GetTenantRequest.newBuilder().setName(name.toString()).build(); + Tenant response = tenantServiceClient.getTenant(request); + System.out.printf("Name: %s\n", response.getName()); + System.out.printf("External ID: %s\n", response.getExternalId()); + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_get_tenant] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID"); + + sampleGetTenant(projectId, tenantId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchHistogramSearch.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchHistogramSearch.java new file mode 100644 index 00000000..850bc9e3 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchHistogramSearch.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("RequestPaged", "job_search_histogram_search") +// sample-metadata: +// title: +// description: Search Jobs with histogram queries +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchHistogramSearch [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--query "count(base_compensation, [bucket(12, 20)])"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.HistogramQuery; +import com.google.cloud.talent.v4beta1.Job; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.RequestMetadata; +import com.google.cloud.talent.v4beta1.SearchJobsRequest; +import com.google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import java.util.Arrays; +import java.util.List; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchHistogramSearch { + // [START job_search_histogram_search] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.HistogramQuery; + * import com.google.cloud.talent.v4beta1.Job; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.RequestMetadata; + * import com.google.cloud.talent.v4beta1.SearchJobsRequest; + * import com.google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + * import java.util.Arrays; + * import java.util.List; + */ + + public static void sampleSearchJobs() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String query = "count(base_compensation, [bucket(12, 20)])"; + sampleSearchJobs(projectId, tenantId, query); + } + + /** + * Search Jobs with histogram queries + * + * @param query Histogram query More info on histogram facets, constants, and built-in functions: + * https://godoc.org/google.golang.org/genproto/googleapis/cloud/talent/v4beta1#SearchJobsRequest + */ + public static void sampleSearchJobs(String projectId, String tenantId, String query) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + String domain = "www.example.com"; + String sessionId = "Hashed session identifier"; + String userId = "Hashed user identifier"; + RequestMetadata requestMetadata = + RequestMetadata.newBuilder() + .setDomain(domain) + .setSessionId(sessionId) + .setUserId(userId) + .build(); + HistogramQuery histogramQueriesElement = + HistogramQuery.newBuilder().setHistogramQuery(query).build(); + List histogramQueries = Arrays.asList(histogramQueriesElement); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .addAllHistogramQueries(histogramQueries) + .build(); + for (SearchJobsResponse.MatchingJob responseItem : + jobServiceClient.searchJobs(request).iterateAll()) { + System.out.printf("Job summary: %s\n", responseItem.getJobSummary()); + System.out.printf("Job title snippet: %s\n", responseItem.getJobTitleSnippet()); + Job job = responseItem.getJob(); + System.out.printf("Job name: %s\n", job.getName()); + System.out.printf("Job title: %s\n", job.getTitle()); + } + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_histogram_search] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("query").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String query = cl.getOptionValue("query", "count(base_compensation, [bucket(12, 20)])"); + + sampleSearchJobs(projectId, tenantId, query); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListCompanies.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListCompanies.java new file mode 100644 index 00000000..612bded5 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListCompanies.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("RequestPaged", "job_search_list_companies") +// sample-metadata: +// title: +// description: List Companies +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchListCompanies [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.Company; +import com.google.cloud.talent.v4beta1.CompanyServiceClient; +import com.google.cloud.talent.v4beta1.ListCompaniesRequest; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchListCompanies { + // [START job_search_list_companies] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.Company; + * import com.google.cloud.talent.v4beta1.CompanyServiceClient; + * import com.google.cloud.talent.v4beta1.ListCompaniesRequest; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + */ + + public static void sampleListCompanies() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + sampleListCompanies(projectId, tenantId); + } + + /** + * List Companies + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenant + */ + public static void sampleListCompanies(String projectId, String tenantId) { + try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + ListCompaniesRequest request = + ListCompaniesRequest.newBuilder().setParent(parent.toString()).build(); + for (Company responseItem : companyServiceClient.listCompanies(request).iterateAll()) { + System.out.printf("Company Name: %s\n", responseItem.getName()); + System.out.printf("Display Name: %s\n", responseItem.getDisplayName()); + System.out.printf("External ID: %s\n", responseItem.getExternalId()); + } + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_list_companies] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + + sampleListCompanies(projectId, tenantId); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListJobs.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListJobs.java new file mode 100644 index 00000000..623d0109 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListJobs.java @@ -0,0 +1,92 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("RequestPaged", "job_search_list_jobs") +// sample-metadata: +// title: +// description: List Jobs +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchListJobs [--args='[--project_id "Your Google Cloud Project ID"] [--tenant_id "Your Tenant ID (using tenancy is optional)"] [--filter "companyName=projects/my-project/companies/company-id"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.Job; +import com.google.cloud.talent.v4beta1.JobServiceClient; +import com.google.cloud.talent.v4beta1.ListJobsRequest; +import com.google.cloud.talent.v4beta1.TenantName; +import com.google.cloud.talent.v4beta1.TenantOrProjectName; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchListJobs { + // [START job_search_list_jobs] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.Job; + * import com.google.cloud.talent.v4beta1.JobServiceClient; + * import com.google.cloud.talent.v4beta1.ListJobsRequest; + * import com.google.cloud.talent.v4beta1.TenantName; + * import com.google.cloud.talent.v4beta1.TenantOrProjectName; + */ + + public static void sampleListJobs() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + String tenantId = "Your Tenant ID (using tenancy is optional)"; + String filter = "companyName=projects/my-project/companies/company-id"; + sampleListJobs(projectId, tenantId, filter); + } + + /** + * List Jobs + * + * @param projectId Your Google Cloud Project ID + * @param tenantId Identifier of the Tenant + */ + public static void sampleListJobs(String projectId, String tenantId, String filter) { + try (JobServiceClient jobServiceClient = JobServiceClient.create()) { + TenantOrProjectName parent = TenantName.of(projectId, tenantId); + ListJobsRequest request = + ListJobsRequest.newBuilder().setParent(parent.toString()).setFilter(filter).build(); + for (Job responseItem : jobServiceClient.listJobs(request).iterateAll()) { + System.out.printf("Job name: %s\n", responseItem.getName()); + System.out.printf("Job requisition ID: %s\n", responseItem.getRequisitionId()); + System.out.printf("Job title: %s\n", responseItem.getTitle()); + System.out.printf("Job description: %s\n", responseItem.getDescription()); + } + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_list_jobs] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("tenant_id").build()); + options.addOption(Option.builder("").required(false).hasArg(true).longOpt("filter").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + String tenantId = cl.getOptionValue("tenant_id", "Your Tenant ID (using tenancy is optional)"); + String filter = + cl.getOptionValue("filter", "companyName=projects/my-project/companies/company-id"); + + sampleListJobs(projectId, tenantId, filter); + } +} diff --git a/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListTenants.java b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListTenants.java new file mode 100644 index 00000000..ba8d77a6 --- /dev/null +++ b/samples/generated/src/main/java/com/google/cloud/examples/talent/v4beta1/JobSearchListTenants.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// DO NOT EDIT! This is a generated sample ("RequestPaged", "job_search_list_tenants") +// sample-metadata: +// title: +// description: List Tenants +// usage: gradle run -PmainClass=com.google.cloud.examples.talent.v4beta1.JobSearchListTenants [--args='[--project_id "Your Google Cloud Project ID"]'] + +package com.google.cloud.examples.talent.v4beta1; + +import com.google.cloud.talent.v4beta1.ListTenantsRequest; +import com.google.cloud.talent.v4beta1.ProjectName; +import com.google.cloud.talent.v4beta1.Tenant; +import com.google.cloud.talent.v4beta1.TenantServiceClient; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class JobSearchListTenants { + // [START job_search_list_tenants] + /* + * Please include the following imports to run this sample. + * + * import com.google.cloud.talent.v4beta1.ListTenantsRequest; + * import com.google.cloud.talent.v4beta1.ProjectName; + * import com.google.cloud.talent.v4beta1.Tenant; + * import com.google.cloud.talent.v4beta1.TenantServiceClient; + */ + + public static void sampleListTenants() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "Your Google Cloud Project ID"; + sampleListTenants(projectId); + } + + /** List Tenants */ + public static void sampleListTenants(String projectId) { + try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) { + ProjectName parent = ProjectName.of(projectId); + ListTenantsRequest request = + ListTenantsRequest.newBuilder().setParent(parent.toString()).build(); + for (Tenant responseItem : tenantServiceClient.listTenants(request).iterateAll()) { + System.out.printf("Tenant Name: %s\n", responseItem.getName()); + System.out.printf("External ID: %s\n", responseItem.getExternalId()); + } + } catch (Exception exception) { + System.err.println("Failed to create the client due to: " + exception); + } + } + // [END job_search_list_tenants] + + public static void main(String[] args) throws Exception { + Options options = new Options(); + options.addOption( + Option.builder("").required(false).hasArg(true).longOpt("project_id").build()); + + CommandLine cl = (new DefaultParser()).parse(options, args); + String projectId = cl.getOptionValue("project_id", "Your Google Cloud Project ID"); + + sampleListTenants(projectId); + } +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 00000000..56c366f5 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + talent-install-without-bom + jar + Google Talent Solution Install Without Bom + https://github.com/googleapis/java-talent + + + + com.google.cloud.samples + shared-configuration + 1.0.13 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-talent + 0.35.2-beta + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 00000000..3e1608f5 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-talent-samples + 0.0.1-SNAPSHOT + pom + Google Talent Solution Samples Parent + https://github.com/googleapis/java-talent + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.13 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 00000000..86421f7e --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + talent-snapshot + jar + Google Talent Solution Snapshot Samples + https://github.com/googleapis/java-talent + + + + com.google.cloud.samples + shared-configuration + 1.0.13 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-talent + 0.35.2-beta + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 00000000..183bd850 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + com.google.cloud + talent-snippets + jar + Google Talent Solution Snippets + https://github.com/googleapis/java-talent + + + + com.google.cloud.samples + shared-configuration + 1.0.13 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + + com.google.cloud + libraries-bom + 4.3.0 + pom + import + + + + + + + com.google.cloud + google-cloud-talent + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/synth.metadata b/synth.metadata index c6f891b5..24ddc571 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,27 +1,21 @@ { - "updateTime": "2020-02-03T23:33:55.179922Z", + "updateTime": "2020-03-26T22:48:24.018150Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "0.44.4", - "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "29d40b78e3dc1579b0b209463fbcb76e5767f72a", - "internalRef": "292979741", - "log": "29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\n" + "sha": "8bea81bfa461698981b3d3a488a95633d2f6e9ff", + "internalRef": "303197602", + "log": "8bea81bfa461698981b3d3a488a95633d2f6e9ff\nchore: use latest protoc-java-resource-name-plugin in bazel WORKSPACE.\nnew commits:\n- fix: stop generating `parseList` and `toStringList` if a multi-pattern resource name has subclasses (#79)\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 303197602\n\nb14af92e565264675d6b12cd2c0ded6c94ddd7f8\nfix talent API incorrect placeholders in two resource name patterns.\ncommitter: @hzyi-google\n\nPiperOrigin-RevId: 303189497\n\n8e22db908ae09e1f7e2802c03b4563fd6b524e0e\nchore(google/maps): Update postprocessing script for Java.\n\n- Update root build.gradle to load local plugin\n- Change com.google.api.grpc group to com.google.maps\n\nPiperOrigin-RevId: 303176850\n\n65816afa71e588252b7119dc723592abe51ea106\nbazel: update gapic-generator-go to v0.12.5 and gapic-generator hash\n\nChanges to gapic-generator-go include:\n* feat: strip invalid link references in comments\n* chore: updating Go deps in bazel repositories\n\nChanges to gapic-generator include:\n* fix: bazel go build gen check for cloud in proto pkg name\n* Revert \"feat: allow static substitution for group name\"\n\nPiperOrigin-RevId: 303150338\n\nd4aa417ed2bba89c2d216900282bddfdafef6128\nFix incorrect retry config in gapic v2 for kms.\n\nPiperOrigin-RevId: 303010132\n\nfd08334533204fdd1b33f79fcb263dbb5bf13de0\nfix: osconfig/v1 update go_gapic_library target to microgen interface\n\nPiperOrigin-RevId: 303007866\n\ne2c0f2a0e06d86b50aba98f67f9f291587d986b3\nUpdate comments for google/rpc/error_details.proto.\n\nPiperOrigin-RevId: 303002528\n\nf786c7586748e78a286b1620ff3ddbf7b4dcab92\nfeat: Add OsConfigService v1 patch APIs.\n\nPiperOrigin-RevId: 302999346\n\n0341fa3fc2f4073a1b1f260d37b2ce620799f545\nTurn on gapic config v2 for kms.\n\nCommitter: @hzyi-google\nPiperOrigin-RevId: 302980301\n\n32dc6e832039b61ac3fb82c72eb0a27570aebcd6\nredis: v1beta1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes\n\nPiperOrigin-RevId: 302958009\n\n685f16483cc4d87c35051f21f8f13ef4fdc919b4\nredis: v1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes\n\nPiperOrigin-RevId: 302957729\n\n733cb282ae5e64673ef86c9a5dff647df803d8b7\nAdd GAPIC cofiguration for v1 client library genetration.\n\nPiperOrigin-RevId: 302928200\n\n1b0fff5f2ec6dc4a9443d9b50e70e9c94c30c45b\ndocs: remove an internal lint declaration\n\nPiperOrigin-RevId: 302928106\n\n2be23f3f3036a6f7ce0844def3d2d3da74e5d415\nfix(google/maps): Add post-processing rules for Google Maps APIs\n\nPiperOrigin-RevId: 302925222\n\nfd83ab212176a1042e8d45ea90766b3bf59ac679\nfix: migrate osconfig/agentendpoint/v1 go_gapic_library target to microgen impl\n\nPiperOrigin-RevId: 302913609\n\n0e07113e776bdd8fcc0783372e08bb6e76cb1b5b\ndocs: Update documentation with links to smart home developer guides and reference pages. Remove outdated authorization instructions.\n\nPiperOrigin-RevId: 302892245\n\n551cf1e6e3addcc63740427c4f9b40dedd3dac27\nfeat: Add OS Config AgentEndpointService v1 PatchJobs and Tasks APIs.\n\nPiperOrigin-RevId: 302792195\n\n1df117114c73299b614dfd3ba3632bf246669336\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 302753982\n\n71d6c56a14bb433beb1237dccb48dabcd9597924\nRefresh monitoring client libraries.\nRename to Cloud Monitoring API.\nAdded support for TimeSeriesQueryLanguageCondition condition type in alert policies.\n\nPiperOrigin-RevId: 302735422\n\n25a1781c096974df99d556cc5888fefa82bc6425\nbazel: migrate all go_gapic_library targets to microgenerator implementation\n\n* update rules_go and gazelle bazel dependencies\n* update gapic-generator bazel dependency (with build file generator changes)\n\nPiperOrigin-RevId: 302730217\n\n36c0febd0fa7267ab66d14408eec2afd1b6bec4e\nUpdate GAPIC configurations to v2 .yaml.\n\nPiperOrigin-RevId: 302639621\n\n078f222366ed344509a48f2f084944ef61476613\nFix containeranalysis v1beta1 assembly target name\n\nPiperOrigin-RevId: 302529186\n\n0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n" } }, { - "template": { - "name": "java_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "e36822bfa0acb355502dab391b8ef9c4f30208d8", + "log": "e36822bfa0acb355502dab391b8ef9c4f30208d8\nchore(java): treat samples shared configuration dependency update as chore (#457)\n\n\n1b4cc80a7aaf164f6241937dd87f3bd1f4149e0c\nfix: do not run node 8 CI (#456)\n\n\nee4330a0e5f4b93978e8683fbda8e6d4148326b7\nchore(java_templates): mark version bumps of current library as a chore (#452)\n\nWith the samples/install-without-bom/pom.xml referencing the latest released library, we want to mark updates of this version as a chore for renovate bot.\na0d3133a5d45544a66345059eebf76933265c099\nfix(java): run mvn install with retry (#453)\n\n* fix(java): run mvn install with retry\n\n* fix invocation of command\n6a17abc7652e2fe563e1288c6e8c23fc260dda97\ndocs: document the release schedule we follow (#454)\n\n\n7e98e1609c91082f4eeb63b530c6468aefd18cfd\nbuild: use checkout@v2, not v1, as this allows manual re-running of tests (#451)\n\nhttps://github.com/actions/checkout/issues/23\n" } } ], @@ -32,8 +26,7 @@ "apiName": "talent", "apiVersion": "v4beta1", "language": "java", - "generator": "gapic", - "config": "google/cloud/talent/artman_talent_v4beta1.yaml" + "generator": "bazel" } } ] diff --git a/synth.py b/synth.py index 48245016..509a5e4c 100644 --- a/synth.py +++ b/synth.py @@ -14,23 +14,18 @@ """This script is used to synthesize generated parts of this library.""" -import synthtool as s -import synthtool.gcp as gcp import synthtool.languages.java as java -gapic = gcp.GAPICGenerator() -common_templates = gcp.CommonTemplates() +AUTOSYNTH_MULTIPLE_COMMITS = True versions = ['v4beta1'] service = 'talent' for version in versions: - java.gapic_library( - service=service, - version=version, - config_pattern='/google/cloud/talent/artman_talent_{version}.yaml', - package_pattern='com.google.cloud.{service}.{version}', - gapic=gapic, + library = java.bazel_library( + service=service, + version=version, + bazel_target=f'//google/cloud/{service}/{version}:google-cloud-{service}-{version}-java', ) java.common_templates() diff --git a/versions.txt b/versions.txt index 4535556c..11d22c65 100644 --- a/versions.txt +++ b/versions.txt @@ -1,7 +1,7 @@ # Format: # module:released-version:current-version -proto-google-cloud-talent-v4beta1:0.35.2-beta:0.35.2-beta -grpc-google-cloud-talent-v4beta1:0.35.2-beta:0.35.2-beta -google-cloud-talent:0.35.2-beta:0.35.2-beta -google-cloud-talent-bom:0.35.2-beta:0.35.2-beta +proto-google-cloud-talent-v4beta1:0.36.0:0.36.0 +grpc-google-cloud-talent-v4beta1:0.36.0:0.36.0 +google-cloud-talent:0.36.0:0.36.0 +google-cloud-talent-bom:0.36.0:0.36.0