diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..4e460dd10 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,51 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/automl/issues + - Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform + +If you are still having issues, please include as much information as possible: + +#### Environment details + +1. Specify the API at the beginning of the title. For example, "BigQuery: ..."). + General, Core, and Other are also allowed as types +2. OS type and version: +3. Java version: +4. automl version(s): + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```java +// example +``` + +#### Stack trace +``` +Any relevant stacktrace here. +``` + +#### External references such as API reference guides + +- ? + +#### Any additional information below + + +Following these steps guarantees the quickest resolution possible. + +Thanks! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..754e30c68 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 000000000..995869032 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..0bd0ee062 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1 @@ +Fixes # (it's a good idea to open an issue first for context and/or discussion) \ No newline at end of file diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1 @@ + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..fadd6afc2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Maven +target/ + +# Eclipse +.classpath +.project +.settings + +# Intellij +*.iml +.idea/ + +# python utilities +*.pyc +__pycache__ diff --git a/.kokoro/build.bat b/.kokoro/build.bat new file mode 100644 index 000000000..8ad540167 --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" github/java-automl/.kokoro/build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 000000000..2ffb5ef7f --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +## 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}/.. + +# Print out Java version +java -version +echo ${JOB_TYPE} + +mvn install -B -V \ + -DskipTests=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 + +case ${JOB_TYPE} in +test) + mvn test -B + bash ${KOKORO_GFILE_DIR}/codecov.sh + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify + ;; +*) + ;; +esac \ No newline at end of file diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg new file mode 100644 index 000000000..fad0a7b31 --- /dev/null +++ b/.kokoro/common.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# All builds use the trampoline script to run in docker. +build_file: "java-automl/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/build.sh" +} diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 000000000..4ba41c49b --- /dev/null +++ b/.kokoro/continuous/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-automl/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/continuous/dependencies.cfg b/.kokoro/continuous/dependencies.cfg new file mode 100644 index 000000000..7f1c29ef3 --- /dev/null +++ b/.kokoro/continuous/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/dependencies.sh" +} diff --git a/.kokoro/continuous/integration.cfg b/.kokoro/continuous/integration.cfg new file mode 100644 index 000000000..3b017fc80 --- /dev/null +++ b/.kokoro/continuous/integration.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} diff --git a/.kokoro/continuous/java11.cfg b/.kokoro/continuous/java11.cfg new file mode 100644 index 000000000..709f2b4c7 --- /dev/null +++ b/.kokoro/continuous/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/continuous/java7.cfg b/.kokoro/continuous/java7.cfg new file mode 100644 index 000000000..cb24f44ee --- /dev/null +++ b/.kokoro/continuous/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/continuous/java8-osx.cfg b/.kokoro/continuous/java8-osx.cfg new file mode 100644 index 000000000..8508120f5 --- /dev/null +++ b/.kokoro/continuous/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-automl/.kokoro/build.sh" diff --git a/.kokoro/continuous/java8-win.cfg b/.kokoro/continuous/java8-win.cfg new file mode 100644 index 000000000..4584183e7 --- /dev/null +++ b/.kokoro/continuous/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-automl/.kokoro/build.bat" diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg new file mode 100644 index 000000000..3b017fc80 --- /dev/null +++ b/.kokoro/continuous/java8.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} diff --git a/.kokoro/continuous/lint.cfg b/.kokoro/continuous/lint.cfg new file mode 100644 index 000000000..6d323c8ae --- /dev/null +++ b/.kokoro/continuous/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/continuous/propose_release.cfg b/.kokoro/continuous/propose_release.cfg new file mode 100644 index 000000000..4c3b85417 --- /dev/null +++ b/.kokoro/continuous/propose_release.cfg @@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-automl/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/continuous/propose_release.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/continuous/propose_release.sh b/.kokoro/continuous/propose_release.sh new file mode 100755 index 000000000..abed164bc --- /dev/null +++ b/.kokoro/continuous/propose_release.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# 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. + +set -eo pipefail + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then + # Groom the release PR as new commits are merged. + npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ + --repo-url=googleapis/java-automl \ + --package-name="automl" \ + --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ + --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ + --release-type=java-yoshi +fi diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 000000000..8ea1df853 --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +cd github/java-automl/ + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +mvn install -DskipTests=true -B -V +mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh new file mode 100755 index 000000000..051763aae --- /dev/null +++ b/.kokoro/linkage-monitor.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail +# Display commands being run. +set -x + +cd github/java-automl/ + +# Print out Java version +java -version +echo ${JOB_TYPE} + +mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V + +# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR +JAR=linkage-monitor-latest-all-deps.jar +curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" + +# Fails if there's new linkage errors compared with baseline +java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg new file mode 100644 index 000000000..4ba41c49b --- /dev/null +++ b/.kokoro/nightly/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-automl/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/dependencies.cfg b/.kokoro/nightly/dependencies.cfg new file mode 100644 index 000000000..7f1c29ef3 --- /dev/null +++ b/.kokoro/nightly/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/dependencies.sh" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 000000000..3b017fc80 --- /dev/null +++ b/.kokoro/nightly/integration.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg new file mode 100644 index 000000000..709f2b4c7 --- /dev/null +++ b/.kokoro/nightly/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg new file mode 100644 index 000000000..cb24f44ee --- /dev/null +++ b/.kokoro/nightly/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 000000000..8508120f5 --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-automl/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 000000000..4584183e7 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-automl/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 000000000..3b017fc80 --- /dev/null +++ b/.kokoro/nightly/java8.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} diff --git a/.kokoro/nightly/lint.cfg b/.kokoro/nightly/lint.cfg new file mode 100644 index 000000000..6d323c8ae --- /dev/null +++ b/.kokoro/nightly/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 000000000..31bf08e0a --- /dev/null +++ b/.kokoro/presubmit/common.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-automl/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 000000000..7f1c29ef3 --- /dev/null +++ b/.kokoro/presubmit/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 000000000..141f90c13 --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,31 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg new file mode 100644 index 000000000..709f2b4c7 --- /dev/null +++ b/.kokoro/presubmit/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg new file mode 100644 index 000000000..cb24f44ee --- /dev/null +++ b/.kokoro/presubmit/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 000000000..8508120f5 --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-automl/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 000000000..4584183e7 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-automl/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 000000000..3b017fc80 --- /dev/null +++ b/.kokoro/presubmit/java8.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 000000000..63c9ea705 --- /dev/null +++ b/.kokoro/presubmit/linkage-monitor.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/linkage-monitor.sh" +} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg new file mode 100644 index 000000000..6d323c8ae --- /dev/null +++ b/.kokoro/presubmit/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 000000000..a5b029bb4 --- /dev/null +++ b/.kokoro/release/bump_snapshot.cfg @@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-automl/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/release/bump_snapshot.sh b/.kokoro/release/bump_snapshot.sh new file mode 100755 index 000000000..dedea020d --- /dev/null +++ b/.kokoro/release/bump_snapshot.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# 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. + +set -eo pipefail + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then + # Groom the snapshot release PR immediately after publishing a release + npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ + --repo-url=googleapis/java-automl \ + --package-name="automl" \ + --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ + --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ + --snapshot \ + --release-type=java-auth-yoshi +fi diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 000000000..b5bfb9435 --- /dev/null +++ b/.kokoro/release/common.cfg @@ -0,0 +1,49 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-automl/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100755 index 000000000..6e3f65999 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# 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 + +# Get secrets from keystore and set and environment variables +setup_environment_secrets() { + export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_TTY=$(tty) + export GPG_HOMEDIR=/gpg + mkdir $GPG_HOMEDIR + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg + export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') +} + +create_settings_xml_file() { + echo " + + + ossrh + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-staging + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-snapshots + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + +" > $1 +} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg new file mode 100644 index 000000000..1abad6cfa --- /dev/null +++ b/.kokoro/release/drop.cfg @@ -0,0 +1,9 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/release/drop.sh" +} + +# Download staging properties file. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-automl" \ No newline at end of file diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 000000000..5c4551efa --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# 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 + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:drop -B \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg new file mode 100644 index 000000000..1c379178a --- /dev/null +++ b/.kokoro/release/promote.cfg @@ -0,0 +1,10 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/release/promote.sh" +} + +# Download staging properties file. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-automl" + diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 000000000..1fa95fa53 --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# 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 + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg new file mode 100644 index 000000000..ae161e860 --- /dev/null +++ b/.kokoro/release/publish_javadoc.cfg @@ -0,0 +1,19 @@ +# Format: //devtools/kokoro/config/proto/build.proto +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/release/publish_javadoc.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh new file mode 100755 index 000000000..1bce1562d --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# 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 + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET}" ]]; then + echo "Need to set STAGING_BUCKET environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -DskipTests=true + +NAME=automl +VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B + +pushd target/site/apidocs + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET} + +popd diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 000000000..543d7ca57 --- /dev/null +++ b/.kokoro/release/snapshot.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/release/snapshot.sh" +} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh new file mode 100755 index 000000000..bf738c56d --- /dev/null +++ b/.kokoro/release/snapshot.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} \ No newline at end of file diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 000000000..116844d21 --- /dev/null +++ b/.kokoro/release/stage.cfg @@ -0,0 +1,44 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-automl/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-automl/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-automl" + } +} + +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + +# Fetch magictoken to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "releasetool-magictoken" + } + } +} + +# Fetch api key to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "magic-github-proxy-api-key" + } + } +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 000000000..b1b1b01c6 --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# 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 + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh new file mode 100644 index 000000000..ba17ce014 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# 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 +# Always run the cleanup script, regardless of the success of bouncing into +# the container. +function cleanup() { + chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + echo "cleanup"; +} +trap cleanup EXIT +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/google-cloud-automl/.repo-metadata.json b/.repo-metadata.json similarity index 55% rename from google-cloud-automl/.repo-metadata.json rename to .repo-metadata.json index 7e894964c..3f0868cad 100644 --- a/google-cloud-automl/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,13 +1,13 @@ { "name": "automl", - "name_pretty": "AutoML", + "name_pretty": "Cloud Auto ML", "product_documentation": "https://cloud.google.com/automl/docs/", - "client_documentation": "https://googleapis.dev/java/google-cloud-clients/latest/index.html?com/google/cloud/automl/v1beta1/package-summary.html", + "client_documentation": "https://googleapis.dev/java/java-automl/latest/index.html", "issue_tracker": "https://issuetracker.google.com/savedsearches/559744", "release_level": "beta", "language": "java", - "repo": "googleapis/google-cloud-java", - "repo_short": "google-cloud-java", + "repo": "googleapis/java-automl", + "repo_short": "java-automl", "distribution_name": "com.google.cloud:google-cloud-automl", "api_id": "automl.googleapis.com" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..1b1aa6cb0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog + +## [0.112.0](https://www.github.com/googleapis/java-automl/compare/0.111.0...v0.112.0) (2019-09-30) + + +### Bug Fixes + +* license headers on generated files ([#2](https://www.github.com/googleapis/java-automl/issues/2)) ([d41a369](https://www.github.com/googleapis/java-automl/commit/d41a369)) + + +### Dependencies + +* fix declared dependencies ([#8](https://www.github.com/googleapis/java-automl/issues/8)) ([c30763b](https://www.github.com/googleapis/java-automl/commit/c30763b)) +* update gax.version to v1.49.0 ([#9](https://www.github.com/googleapis/java-automl/issues/9)) ([c0a49b5](https://www.github.com/googleapis/java-automl/commit/c0a49b5)) + + +### Documentation + +* add stability image ([#10](https://www.github.com/googleapis/java-automl/issues/10)) ([645d387](https://www.github.com/googleapis/java-automl/commit/645d387)) +* fix location of README ([#7](https://www.github.com/googleapis/java-automl/issues/7)) ([79d3bae](https://www.github.com/googleapis/java-automl/commit/79d3bae)) + + +### Features + +* add parent pom ([#1](https://www.github.com/googleapis/java-automl/issues/1)) ([26c07bf](https://www.github.com/googleapis/java-automl/commit/26c07bf)) +* add v1 protos ([#11](https://www.github.com/googleapis/java-automl/issues/11)) ([de1e274](https://www.github.com/googleapis/java-automl/commit/de1e274)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..6b2238bb7 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,93 @@ +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the +Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..ebbb59e53 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). \ No newline at end of file diff --git a/LICENSE b/LICENSE index 4eedc0116..d64569567 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ -Apache License + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ Apache License APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a diff --git a/README.md b/README.md new file mode 100644 index 000000000..6826c7f42 --- /dev/null +++ b/README.md @@ -0,0 +1,127 @@ +# Google Cloud Java Client for Cloud Auto ML + +Java idiomatic client for [Cloud Auto ML][api-reference]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +## Quickstart + +[//]: # ({x-version-update-start:automl:released}) +If you are using Maven, add this to your pom.xml file +```xml + + com.google.cloud + google-cloud-automl + 0.111.0-beta + +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-automl:0.111.0-beta' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-automl" % "0.111.0-beta" +``` +[//]: # ({x-version-update-end}) + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## About Cloud Auto ML + +[Cloud Auto ML][api-reference] is a suite of Machine Learning products. + +See the [Cloud Auto ML client library docs][javadocs] to learn how to +use this Cloud Auto ML Client Library. + +## Getting Started + +### Prerequisites + +You will need a [Google Developers Console][developer-console] project with the +Cloud Auto ML API enabled. [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]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-automl` library. See the [Quickstart](#quickstart) section +to add `google-cloud-automl` as a dependency in your code. + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Cloud Auto ML uses gRPC for the transport layer. + +## Java Versions + +Java 7 or above is required for using this client. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + +## Contributing + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING.md][contributing] documentation for more information on how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +[api-reference]: https://cloud.google.com/automl/ +[product-docs]: https://cloud.google.com/automl/docs/ +[javadocs]: https://googleapis.dev/java/java-automl/latest/index.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-automl/java11.html +[stability-image]: https://img.shields.io/badge/stability-beta-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-automl.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-automl&core=gav +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-sdk]: https://cloud.google.com/sdk/ +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-automl/blob/master/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-automl/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-automl/blob/master/LICENSE \ No newline at end of file diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 000000000..5724ea947 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-cloud-automl/README.md b/google-cloud-automl/README.md deleted file mode 100644 index 2b1469a76..000000000 --- a/google-cloud-automl/README.md +++ /dev/null @@ -1,100 +0,0 @@ -Google Cloud Java Client for Cloud Auto ML -=================================================== - -Java idiomatic client for [Cloud Auto ML][cloud-automl]. - -[![Kokoro CI](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.svg)](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.html) -[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-automl.svg)](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-automl.svg) -[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java) - -- [Product Documentation][automl-product-docs] -- [Client Library Documentation][automl-client-lib-docs] - -> Note: This client is a work-in-progress, and may occasionally -> make backwards-incompatible changes. - -Quickstart ----------- - -[//]: # ({x-version-update-start:google-cloud-automl:released}) -If you are using Maven, add this to your pom.xml file -```xml - - com.google.cloud - google-cloud-automl - 0.111.0-beta - -``` -If you are using Gradle, add this to your dependencies -```Groovy -compile 'com.google.cloud:google-cloud-automl:0.111.0-beta' -``` -If you are using SBT, add this to your dependencies -```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-automl" % "0.111.0-beta" -``` -[//]: # ({x-version-update-end}) - -Authentication --------------- - -See the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) section in the base directory's README. - -About Cloud Auto ML ----------------------------- - -[Cloud Auto ML][cloud-automl] is a suite of Machine Learning products. - -See the [Cloud Auto ML client library docs][automl-client-lib-docs] to learn how to use this Cloud Auto ML Client Library. - -Getting Started ---------------- -#### Prerequisites -You will need a [Google Developers Console](https://console.developers.google.com/) project with the Cloud Auto ML API enabled. [Follow these instructions](https://cloud.google.com/resource-manager/docs/creating-managing-projects) to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. - -#### Installation and setup -You'll need to obtain the `google-cloud-automl` library. See the [Quickstart](#quickstart) section to add `google-cloud-automl` as a dependency in your code. - -Troubleshooting ---------------- - -To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting). - -Transport ---------- -Cloud Auto ML uses gRPC for the transport layer. - -Java Versions -------------- - -Java 7 or above is required for using this client. - -Versioning ----------- - -This library follows [Semantic Versioning](http://semver.org/). - -It is currently in major version zero (``0.y.z``), which means that anything may change at any time and the public API should not be considered stable. - -Contributing ------------- - -Contributions to this library are always welcome and highly encouraged. - -See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/googleapis/google-cloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started. - -Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. - -License -------- - -Apache 2.0 - See [LICENSE] for more information. - - -[CONTRIBUTING]:https://github.com/googleapis/google-cloud-java/blob/master/CONTRIBUTING.md -[code-of-conduct]:https://github.com/googleapis/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct -[LICENSE]: https://github.com/googleapis/google-cloud-java/blob/master/LICENSE -[cloud-platform]: https://cloud.google.com/ -[cloud-automl]: https://cloud.google.com/automl -[automl-product-docs]: https://cloud.google.com/automl/ -[automl-client-lib-docs]: https://googleapis.dev/java/google-cloud-clients/latest/index.html?com/google/cloud/automl/v1beta1/package-summary.html diff --git a/google-cloud-automl/pom.xml b/google-cloud-automl/pom.xml index 41d54b563..d305d1759 100644 --- a/google-cloud-automl/pom.xml +++ b/google-cloud-automl/pom.xml @@ -1,46 +1,89 @@ 4.0.0 + com.google.cloud google-cloud-automl - 0.111.0-beta + 0.112.0-beta jar - Google Cloud Auto ML - https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-automl - - Java idiomatic client for Google Cloud Auto ML - + Google Cloud AutoML + https://github.com/googleapis/java-automl + Java idiomatic client for Google Cloud Auto ML com.google.cloud - google-cloud-clients - 0.111.0-alpha + google-cloud-automl-parent + 0.112.0-beta google-cloud-automl - ${project.groupId} - google-cloud-core + io.grpc + grpc-api - ${project.groupId} - google-cloud-core-grpc + io.grpc + grpc-stub + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + com.google.api.grpc proto-google-cloud-automl-v1beta1 + + com.google.api.grpc + proto-google-cloud-automl-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + org.threeten + threetenbp + + junit junit test + com.google.api.grpc grpc-google-cloud-automl-v1beta1 test + + com.google.api.grpc + grpc-google-cloud-automl-v1 + test + com.google.api @@ -50,29 +93,18 @@ - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - protected - true - none - true - - - ${project.javadoc.protobufBaseURL} - ../../../../../google-api-grpc/proto-google-cloud-automl-v1beta1/target/site/apidocs/ - - - ${project.javadoc.protobufBaseURL} - ../../../../../google-api-grpc/grpc-google-cloud-automl-v1beta1/target/site/apidocs/ - - - - - - - + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + \ No newline at end of file diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/AutoMlClient.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/AutoMlClient.java new file mode 100644 index 000000000..b45798fcf --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/AutoMlClient.java @@ -0,0 +1,2095 @@ +/* + * 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.automl.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.automl.v1.stub.AutoMlStub; +import com.google.cloud.automl.v1.stub.AutoMlStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: AutoML Server API. + * + *

The resource names are assigned by the server. The server never reuses names that it has + * created after the resources with those names are deleted. + * + *

An ID of a resource is the last element of the item's resource name. For + * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then the id for the item + * is `{dataset_id}`. + * + *

Currently the only supported `location_id` is "us-central1". + * + *

On any input that is documented to expect a string parameter in snake_case or kebab-case, + * either of those cases is accepted. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Dataset dataset = Dataset.newBuilder().build();
+ *   Operation response = autoMlClient.createDataset(parent, dataset);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the autoMlClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of AutoMlSettings to create(). + * For example: + * + *

To customize credentials: + * + *

+ * 
+ * AutoMlSettings autoMlSettings =
+ *     AutoMlSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AutoMlClient autoMlClient =
+ *     AutoMlClient.create(autoMlSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * AutoMlSettings autoMlSettings =
+ *     AutoMlSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AutoMlClient autoMlClient =
+ *     AutoMlClient.create(autoMlSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class AutoMlClient implements BackgroundResource { + private final AutoMlSettings settings; + private final AutoMlStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of AutoMlClient with default settings. */ + public static final AutoMlClient create() throws IOException { + return create(AutoMlSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AutoMlClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AutoMlClient create(AutoMlSettings settings) throws IOException { + return new AutoMlClient(settings); + } + + /** + * Constructs an instance of AutoMlClient, using the given stub for making calls. This is for + * advanced usage - prefer to use AutoMlSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final AutoMlClient create(AutoMlStub stub) { + return new AutoMlClient(stub); + } + + /** + * Constructs an instance of AutoMlClient, using the given settings. This is protected so that it + * is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected AutoMlClient(AutoMlSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AutoMlStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected AutoMlClient(AutoMlStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final AutoMlSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public AutoMlStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   Operation response = autoMlClient.createDataset(parent, dataset);
+   * }
+   * 
+ * + * @param parent The resource name of the project to create the dataset for. + * @param dataset The dataset to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation createDataset(LocationName parent, Dataset dataset) { + + CreateDatasetRequest request = + CreateDatasetRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataset(dataset) + .build(); + return createDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   Operation response = autoMlClient.createDataset(parent.toString(), dataset);
+   * }
+   * 
+ * + * @param parent The resource name of the project to create the dataset for. + * @param dataset The dataset to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation createDataset(String parent, Dataset dataset) { + + CreateDatasetRequest request = + CreateDatasetRequest.newBuilder().setParent(parent).setDataset(dataset).build(); + return createDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   CreateDatasetRequest request = CreateDatasetRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setDataset(dataset)
+   *     .build();
+   *   Operation response = autoMlClient.createDataset(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 Operation createDataset(CreateDatasetRequest request) { + return createDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   CreateDatasetRequest request = CreateDatasetRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setDataset(dataset)
+   *     .build();
+   *   ApiFuture<Operation> future = autoMlClient.createDatasetCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createDatasetCallable() { + return stub.createDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Dataset response = autoMlClient.updateDataset(dataset, updateMask);
+   * }
+   * 
+ * + * @param dataset The dataset which replaces the resource on the server. + * @param updateMask Required. The update mask applies to the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset updateDataset(Dataset dataset, FieldMask updateMask) { + + UpdateDatasetRequest request = + UpdateDatasetRequest.newBuilder().setDataset(dataset).setUpdateMask(updateMask).build(); + return updateDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateDatasetRequest request = UpdateDatasetRequest.newBuilder()
+   *     .setDataset(dataset)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   Dataset response = autoMlClient.updateDataset(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 Dataset updateDataset(UpdateDatasetRequest request) { + return updateDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateDatasetRequest request = UpdateDatasetRequest.newBuilder()
+   *     .setDataset(dataset)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   ApiFuture<Dataset> future = autoMlClient.updateDatasetCallable().futureCall(request);
+   *   // Do something
+   *   Dataset response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateDatasetCallable() { + return stub.updateDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   Dataset response = autoMlClient.getDataset(name);
+   * }
+   * 
+ * + * @param name The resource name of the dataset to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset getDataset(DatasetName name) { + + GetDatasetRequest request = + GetDatasetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   Dataset response = autoMlClient.getDataset(name.toString());
+   * }
+   * 
+ * + * @param name The resource name of the dataset to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset getDataset(String name) { + + GetDatasetRequest request = GetDatasetRequest.newBuilder().setName(name).build(); + return getDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   GetDatasetRequest request = GetDatasetRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Dataset response = autoMlClient.getDataset(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 Dataset getDataset(GetDatasetRequest request) { + return getDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   GetDatasetRequest request = GetDatasetRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Dataset> future = autoMlClient.getDatasetCallable().futureCall(request);
+   *   // Do something
+   *   Dataset response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getDatasetCallable() { + return stub.getDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists datasets in a project. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Dataset element : autoMlClient.listDatasets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent The resource name of the project from which to list datasets. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatasetsPagedResponse listDatasets(LocationName parent) { + ListDatasetsRequest request = + ListDatasetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDatasets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists datasets in a project. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Dataset element : autoMlClient.listDatasets(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent The resource name of the project from which to list datasets. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatasetsPagedResponse listDatasets(String parent) { + ListDatasetsRequest request = ListDatasetsRequest.newBuilder().setParent(parent).build(); + return listDatasets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists datasets in a project. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Dataset element : autoMlClient.listDatasets(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 ListDatasetsPagedResponse listDatasets(ListDatasetsRequest request) { + return listDatasetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists datasets in a project. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListDatasetsPagedResponse> future = autoMlClient.listDatasetsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Dataset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listDatasetsPagedCallable() { + return stub.listDatasetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists datasets in a project. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListDatasetsResponse response = autoMlClient.listDatasetsCallable().call(request);
+   *     for (Dataset element : response.getDatasetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listDatasetsCallable() { + return stub.listDatasetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a dataset and all of its contents. Returns empty response in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   autoMlClient.deleteDatasetAsync(name).get();
+   * }
+   * 
+ * + * @param name The resource name of the dataset to delete. + * @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 deleteDatasetAsync(DatasetName name) { + + DeleteDatasetRequest request = + DeleteDatasetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteDatasetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a dataset and all of its contents. Returns empty response in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   autoMlClient.deleteDatasetAsync(name.toString()).get();
+   * }
+   * 
+ * + * @param name The resource name of the dataset to delete. + * @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 deleteDatasetAsync(String name) { + + DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder().setName(name).build(); + return deleteDatasetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a dataset and all of its contents. Returns empty response in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   autoMlClient.deleteDatasetAsync(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 deleteDatasetAsync( + DeleteDatasetRequest request) { + return deleteDatasetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a dataset and all of its contents. Returns empty response in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.deleteDatasetOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + deleteDatasetOperationCallable() { + return stub.deleteDatasetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a dataset and all of its contents. Returns empty response in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Operation> future = autoMlClient.deleteDatasetCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteDatasetCallable() { + return stub.deleteDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports data into a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   InputConfig inputConfig = InputConfig.newBuilder().build();
+   *   autoMlClient.importDataAsync(name, inputConfig).get();
+   * }
+   * 
+ * + * @param name Required. Dataset name. Dataset must already exist. All imported annotations and + * examples will be added. + * @param inputConfig Required. The desired input location and its domain specific semantics, if + * any. + * @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 importDataAsync( + DatasetName name, InputConfig inputConfig) { + + ImportDataRequest request = + ImportDataRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setInputConfig(inputConfig) + .build(); + return importDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports data into a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   InputConfig inputConfig = InputConfig.newBuilder().build();
+   *   autoMlClient.importDataAsync(name.toString(), inputConfig).get();
+   * }
+   * 
+ * + * @param name Required. Dataset name. Dataset must already exist. All imported annotations and + * examples will be added. + * @param inputConfig Required. The desired input location and its domain specific semantics, if + * any. + * @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 importDataAsync( + String name, InputConfig inputConfig) { + + ImportDataRequest request = + ImportDataRequest.newBuilder().setName(name).setInputConfig(inputConfig).build(); + return importDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports data into a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   InputConfig inputConfig = InputConfig.newBuilder().build();
+   *   ImportDataRequest request = ImportDataRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setInputConfig(inputConfig)
+   *     .build();
+   *   autoMlClient.importDataAsync(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 importDataAsync( + ImportDataRequest request) { + return importDataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports data into a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   InputConfig inputConfig = InputConfig.newBuilder().build();
+   *   ImportDataRequest request = ImportDataRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setInputConfig(inputConfig)
+   *     .build();
+   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.importDataOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + importDataOperationCallable() { + return stub.importDataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports data into a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   InputConfig inputConfig = InputConfig.newBuilder().build();
+   *   ImportDataRequest request = ImportDataRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setInputConfig(inputConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = autoMlClient.importDataCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable importDataCallable() { + return stub.importDataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports dataset's data to the provided output location. Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   autoMlClient.exportDataAsync(name, outputConfig).get();
+   * }
+   * 
+ * + * @param name Required. The resource name of the dataset. + * @param outputConfig Required. The desired output location. + * @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 exportDataAsync( + DatasetName name, OutputConfig outputConfig) { + + ExportDataRequest request = + ExportDataRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setOutputConfig(outputConfig) + .build(); + return exportDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports dataset's data to the provided output location. Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   autoMlClient.exportDataAsync(name.toString(), outputConfig).get();
+   * }
+   * 
+ * + * @param name Required. The resource name of the dataset. + * @param outputConfig Required. The desired output location. + * @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 exportDataAsync( + String name, OutputConfig outputConfig) { + + ExportDataRequest request = + ExportDataRequest.newBuilder().setName(name).setOutputConfig(outputConfig).build(); + return exportDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports dataset's data to the provided output location. Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   ExportDataRequest request = ExportDataRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   autoMlClient.exportDataAsync(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 exportDataAsync( + ExportDataRequest request) { + return exportDataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports dataset's data to the provided output location. Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   ExportDataRequest request = ExportDataRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.exportDataOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + exportDataOperationCallable() { + return stub.exportDataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports dataset's data to the provided output location. Returns an empty response in the + * [response][google.longrunning.Operation.response] field when it completes. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   ExportDataRequest request = ExportDataRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = autoMlClient.exportDataCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable exportDataCallable() { + return stub.exportDataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field + * when it completes. When you create a model, several model evaluations are created for it: a + * global evaluation, and one evaluation for each annotation spec. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Model model = Model.newBuilder().build();
+   *   Model response = autoMlClient.createModelAsync(parent, model).get();
+   * }
+   * 
+ * + * @param parent Resource name of the parent project where the model is being created. + * @param model The model to create. + * @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 createModelAsync( + LocationName parent, Model model) { + + CreateModelRequest request = + CreateModelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setModel(model) + .build(); + return createModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field + * when it completes. When you create a model, several model evaluations are created for it: a + * global evaluation, and one evaluation for each annotation spec. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Model model = Model.newBuilder().build();
+   *   Model response = autoMlClient.createModelAsync(parent.toString(), model).get();
+   * }
+   * 
+ * + * @param parent Resource name of the parent project where the model is being created. + * @param model The model to create. + * @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 createModelAsync( + String parent, Model model) { + + CreateModelRequest request = + CreateModelRequest.newBuilder().setParent(parent).setModel(model).build(); + return createModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field + * when it completes. When you create a model, several model evaluations are created for it: a + * global evaluation, and one evaluation for each annotation spec. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Model model = Model.newBuilder().build();
+   *   CreateModelRequest request = CreateModelRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setModel(model)
+   *     .build();
+   *   Model response = autoMlClient.createModelAsync(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 createModelAsync( + CreateModelRequest request) { + return createModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field + * when it completes. When you create a model, several model evaluations are created for it: a + * global evaluation, and one evaluation for each annotation spec. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Model model = Model.newBuilder().build();
+   *   CreateModelRequest request = CreateModelRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setModel(model)
+   *     .build();
+   *   OperationFuture<Model, OperationMetadata> future = autoMlClient.createModelOperationCallable().futureCall(request);
+   *   // Do something
+   *   Model response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + createModelOperationCallable() { + return stub.createModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field + * when it completes. When you create a model, several model evaluations are created for it: a + * global evaluation, and one evaluation for each annotation spec. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Model model = Model.newBuilder().build();
+   *   CreateModelRequest request = CreateModelRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setModel(model)
+   *     .build();
+   *   ApiFuture<Operation> future = autoMlClient.createModelCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createModelCallable() { + return stub.createModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a model. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   Model response = autoMlClient.getModel(name);
+   * }
+   * 
+ * + * @param name Resource name of the model. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model getModel(ModelName name) { + + GetModelRequest request = + GetModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a model. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   Model response = autoMlClient.getModel(name.toString());
+   * }
+   * 
+ * + * @param name Resource name of the model. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model getModel(String name) { + + GetModelRequest request = GetModelRequest.newBuilder().setName(name).build(); + return getModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a model. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   GetModelRequest request = GetModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Model response = autoMlClient.getModel(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 Model getModel(GetModelRequest request) { + return getModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a model. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   GetModelRequest request = GetModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Model> future = autoMlClient.getModelCallable().futureCall(request);
+   *   // Do something
+   *   Model response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getModelCallable() { + return stub.getModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a model. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   Model model = Model.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Model response = autoMlClient.updateModel(model, updateMask);
+   * }
+   * 
+ * + * @param model The model which replaces the resource on the server. + * @param updateMask Required. The update mask applies to the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model updateModel(Model model, FieldMask updateMask) { + + UpdateModelRequest request = + UpdateModelRequest.newBuilder().setModel(model).setUpdateMask(updateMask).build(); + return updateModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a model. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   Model model = Model.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateModelRequest request = UpdateModelRequest.newBuilder()
+   *     .setModel(model)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   Model response = autoMlClient.updateModel(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 Model updateModel(UpdateModelRequest request) { + return updateModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a model. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   Model model = Model.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateModelRequest request = UpdateModelRequest.newBuilder()
+   *     .setModel(model)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   ApiFuture<Model> future = autoMlClient.updateModelCallable().futureCall(request);
+   *   // Do something
+   *   Model response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateModelCallable() { + return stub.updateModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists models. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Model element : autoMlClient.listModels(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Resource name of the project, from which to list the models. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelsPagedResponse listModels(LocationName parent) { + ListModelsRequest request = + ListModelsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listModels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists models. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Model element : autoMlClient.listModels(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Resource name of the project, from which to list the models. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelsPagedResponse listModels(String parent) { + ListModelsRequest request = ListModelsRequest.newBuilder().setParent(parent).build(); + return listModels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists models. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListModelsRequest request = ListModelsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Model element : autoMlClient.listModels(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 ListModelsPagedResponse listModels(ListModelsRequest request) { + return listModelsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists models. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListModelsRequest request = ListModelsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListModelsPagedResponse> future = autoMlClient.listModelsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Model element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listModelsPagedCallable() { + return stub.listModelsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists models. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListModelsRequest request = ListModelsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListModelsResponse response = autoMlClient.listModelsCallable().call(request);
+   *     for (Model element : response.getModelList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listModelsCallable() { + return stub.listModelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a model. Returns `google.protobuf.Empty` in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   autoMlClient.deleteModelAsync(name).get();
+   * }
+   * 
+ * + * @param name Resource name of the model being deleted. + * @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 deleteModelAsync(ModelName name) { + + DeleteModelRequest request = + DeleteModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a model. Returns `google.protobuf.Empty` in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   autoMlClient.deleteModelAsync(name.toString()).get();
+   * }
+   * 
+ * + * @param name Resource name of the model being deleted. + * @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 deleteModelAsync(String name) { + + DeleteModelRequest request = DeleteModelRequest.newBuilder().setName(name).build(); + return deleteModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a model. Returns `google.protobuf.Empty` in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   DeleteModelRequest request = DeleteModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   autoMlClient.deleteModelAsync(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 deleteModelAsync( + DeleteModelRequest request) { + return deleteModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a model. Returns `google.protobuf.Empty` in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   DeleteModelRequest request = DeleteModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.deleteModelOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + deleteModelOperationCallable() { + return stub.deleteModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a model. Returns `google.protobuf.Empty` in the + * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` + * in the [metadata][google.longrunning.Operation.metadata] field. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   DeleteModelRequest request = DeleteModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Operation> future = autoMlClient.deleteModelCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteModelCallable() { + return stub.deleteModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a model evaluation. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelEvaluationName name = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]");
+   *   ModelEvaluation response = autoMlClient.getModelEvaluation(name);
+   * }
+   * 
+ * + * @param name Resource name for the model evaluation. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ModelEvaluation getModelEvaluation(ModelEvaluationName name) { + + GetModelEvaluationRequest request = + GetModelEvaluationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getModelEvaluation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a model evaluation. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelEvaluationName name = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]");
+   *   ModelEvaluation response = autoMlClient.getModelEvaluation(name.toString());
+   * }
+   * 
+ * + * @param name Resource name for the model evaluation. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ModelEvaluation getModelEvaluation(String name) { + + GetModelEvaluationRequest request = + GetModelEvaluationRequest.newBuilder().setName(name).build(); + return getModelEvaluation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a model evaluation. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelEvaluationName name = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]");
+   *   GetModelEvaluationRequest request = GetModelEvaluationRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ModelEvaluation response = autoMlClient.getModelEvaluation(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 ModelEvaluation getModelEvaluation(GetModelEvaluationRequest request) { + return getModelEvaluationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a model evaluation. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelEvaluationName name = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]");
+   *   GetModelEvaluationRequest request = GetModelEvaluationRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<ModelEvaluation> future = autoMlClient.getModelEvaluationCallable().futureCall(request);
+   *   // Do something
+   *   ModelEvaluation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + getModelEvaluationCallable() { + return stub.getModelEvaluationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   String filter = "";
+   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Resource name of the model to list the model evaluations for. If modelId is set + * as "-", this will list model evaluations from across all models of the parent location. + * @param filter An expression for filtering the results of the request. + *

* `annotation_spec_id` - for =, != or existence. See example below for the last. + *

Some examples of using the filter are: + *

* `annotation_spec_id!=4` --> The model evaluation was done for annotation spec + * with ID different than 4. * `NOT annotation_spec_id:*` --> The model evaluation + * was done for aggregate of all annotation specs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelEvaluationsPagedResponse listModelEvaluations( + ModelName parent, String filter) { + ListModelEvaluationsRequest request = + ListModelEvaluationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFilter(filter) + .build(); + return listModelEvaluations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   String filter = "";
+   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(parent.toString(), filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Resource name of the model to list the model evaluations for. If modelId is set + * as "-", this will list model evaluations from across all models of the parent location. + * @param filter An expression for filtering the results of the request. + *

* `annotation_spec_id` - for =, != or existence. See example below for the last. + *

Some examples of using the filter are: + *

* `annotation_spec_id!=4` --> The model evaluation was done for annotation spec + * with ID different than 4. * `NOT annotation_spec_id:*` --> The model evaluation + * was done for aggregate of all annotation specs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelEvaluationsPagedResponse listModelEvaluations( + String parent, String filter) { + ListModelEvaluationsRequest request = + ListModelEvaluationsRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listModelEvaluations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   String filter = "";
+   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFilter(filter)
+   *     .build();
+   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(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 ListModelEvaluationsPagedResponse listModelEvaluations( + ListModelEvaluationsRequest request) { + return listModelEvaluationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   String filter = "";
+   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFilter(filter)
+   *     .build();
+   *   ApiFuture<ListModelEvaluationsPagedResponse> future = autoMlClient.listModelEvaluationsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (ModelEvaluation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listModelEvaluationsPagedCallable() { + return stub.listModelEvaluationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   String filter = "";
+   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFilter(filter)
+   *     .build();
+   *   while (true) {
+   *     ListModelEvaluationsResponse response = autoMlClient.listModelEvaluationsCallable().call(request);
+   *     for (ModelEvaluation element : response.getModelEvaluationList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listModelEvaluationsCallable() { + return stub.listModelEvaluationsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListDatasetsPagedResponse + extends AbstractPagedListResponse< + ListDatasetsRequest, + ListDatasetsResponse, + Dataset, + ListDatasetsPage, + ListDatasetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDatasetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDatasetsPagedResponse apply(ListDatasetsPage input) { + return new ListDatasetsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDatasetsPagedResponse(ListDatasetsPage page) { + super(page, ListDatasetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDatasetsPage + extends AbstractPage { + + private ListDatasetsPage( + PageContext context, + ListDatasetsResponse response) { + super(context, response); + } + + private static ListDatasetsPage createEmptyPage() { + return new ListDatasetsPage(null, null); + } + + @Override + protected ListDatasetsPage createPage( + PageContext context, + ListDatasetsResponse response) { + return new ListDatasetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDatasetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDatasetsRequest, + ListDatasetsResponse, + Dataset, + ListDatasetsPage, + ListDatasetsFixedSizeCollection> { + + private ListDatasetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDatasetsFixedSizeCollection createEmptyCollection() { + return new ListDatasetsFixedSizeCollection(null, 0); + } + + @Override + protected ListDatasetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDatasetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListModelsPagedResponse + extends AbstractPagedListResponse< + ListModelsRequest, + ListModelsResponse, + Model, + ListModelsPage, + ListModelsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListModelsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListModelsPagedResponse apply(ListModelsPage input) { + return new ListModelsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListModelsPagedResponse(ListModelsPage page) { + super(page, ListModelsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListModelsPage + extends AbstractPage { + + private ListModelsPage( + PageContext context, + ListModelsResponse response) { + super(context, response); + } + + private static ListModelsPage createEmptyPage() { + return new ListModelsPage(null, null); + } + + @Override + protected ListModelsPage createPage( + PageContext context, + ListModelsResponse response) { + return new ListModelsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListModelsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListModelsRequest, + ListModelsResponse, + Model, + ListModelsPage, + ListModelsFixedSizeCollection> { + + private ListModelsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListModelsFixedSizeCollection createEmptyCollection() { + return new ListModelsFixedSizeCollection(null, 0); + } + + @Override + protected ListModelsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListModelsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListModelEvaluationsPagedResponse + extends AbstractPagedListResponse< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ModelEvaluation, + ListModelEvaluationsPage, + ListModelEvaluationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListModelEvaluationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListModelEvaluationsPagedResponse apply(ListModelEvaluationsPage input) { + return new ListModelEvaluationsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListModelEvaluationsPagedResponse(ListModelEvaluationsPage page) { + super(page, ListModelEvaluationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListModelEvaluationsPage + extends AbstractPage< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ModelEvaluation, + ListModelEvaluationsPage> { + + private ListModelEvaluationsPage( + PageContext + context, + ListModelEvaluationsResponse response) { + super(context, response); + } + + private static ListModelEvaluationsPage createEmptyPage() { + return new ListModelEvaluationsPage(null, null); + } + + @Override + protected ListModelEvaluationsPage createPage( + PageContext + context, + ListModelEvaluationsResponse response) { + return new ListModelEvaluationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListModelEvaluationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ModelEvaluation, + ListModelEvaluationsPage, + ListModelEvaluationsFixedSizeCollection> { + + private ListModelEvaluationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListModelEvaluationsFixedSizeCollection createEmptyCollection() { + return new ListModelEvaluationsFixedSizeCollection(null, 0); + } + + @Override + protected ListModelEvaluationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListModelEvaluationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/AutoMlSettings.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/AutoMlSettings.java new file mode 100644 index 000000000..ad1616670 --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/AutoMlSettings.java @@ -0,0 +1,407 @@ +/* + * 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.automl.v1; + +import static com.google.cloud.automl.v1.AutoMlClient.ListDatasetsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.automl.v1.stub.AutoMlStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link AutoMlClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (automl.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 createDataset to 30 seconds: + * + *

+ * 
+ * AutoMlSettings.Builder autoMlSettingsBuilder =
+ *     AutoMlSettings.newBuilder();
+ * autoMlSettingsBuilder.createDatasetSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * AutoMlSettings autoMlSettings = autoMlSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class AutoMlSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createDataset. */ + public UnaryCallSettings createDatasetSettings() { + return ((AutoMlStubSettings) getStubSettings()).createDatasetSettings(); + } + + /** Returns the object with the settings used for calls to updateDataset. */ + public UnaryCallSettings updateDatasetSettings() { + return ((AutoMlStubSettings) getStubSettings()).updateDatasetSettings(); + } + + /** Returns the object with the settings used for calls to getDataset. */ + public UnaryCallSettings getDatasetSettings() { + return ((AutoMlStubSettings) getStubSettings()).getDatasetSettings(); + } + + /** Returns the object with the settings used for calls to listDatasets. */ + public PagedCallSettings + listDatasetsSettings() { + return ((AutoMlStubSettings) getStubSettings()).listDatasetsSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + public UnaryCallSettings deleteDatasetSettings() { + return ((AutoMlStubSettings) getStubSettings()).deleteDatasetSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + deleteDatasetOperationSettings() { + return ((AutoMlStubSettings) getStubSettings()).deleteDatasetOperationSettings(); + } + + /** Returns the object with the settings used for calls to importData. */ + public UnaryCallSettings importDataSettings() { + return ((AutoMlStubSettings) getStubSettings()).importDataSettings(); + } + + /** Returns the object with the settings used for calls to importData. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + importDataOperationSettings() { + return ((AutoMlStubSettings) getStubSettings()).importDataOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportData. */ + public UnaryCallSettings exportDataSettings() { + return ((AutoMlStubSettings) getStubSettings()).exportDataSettings(); + } + + /** Returns the object with the settings used for calls to exportData. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + exportDataOperationSettings() { + return ((AutoMlStubSettings) getStubSettings()).exportDataOperationSettings(); + } + + /** Returns the object with the settings used for calls to createModel. */ + public UnaryCallSettings createModelSettings() { + return ((AutoMlStubSettings) getStubSettings()).createModelSettings(); + } + + /** Returns the object with the settings used for calls to createModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + createModelOperationSettings() { + return ((AutoMlStubSettings) getStubSettings()).createModelOperationSettings(); + } + + /** Returns the object with the settings used for calls to getModel. */ + public UnaryCallSettings getModelSettings() { + return ((AutoMlStubSettings) getStubSettings()).getModelSettings(); + } + + /** Returns the object with the settings used for calls to updateModel. */ + public UnaryCallSettings updateModelSettings() { + return ((AutoMlStubSettings) getStubSettings()).updateModelSettings(); + } + + /** Returns the object with the settings used for calls to listModels. */ + public PagedCallSettings + listModelsSettings() { + return ((AutoMlStubSettings) getStubSettings()).listModelsSettings(); + } + + /** Returns the object with the settings used for calls to deleteModel. */ + public UnaryCallSettings deleteModelSettings() { + return ((AutoMlStubSettings) getStubSettings()).deleteModelSettings(); + } + + /** Returns the object with the settings used for calls to deleteModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + deleteModelOperationSettings() { + return ((AutoMlStubSettings) getStubSettings()).deleteModelOperationSettings(); + } + + /** Returns the object with the settings used for calls to getModelEvaluation. */ + public UnaryCallSettings + getModelEvaluationSettings() { + return ((AutoMlStubSettings) getStubSettings()).getModelEvaluationSettings(); + } + + /** Returns the object with the settings used for calls to listModelEvaluations. */ + public PagedCallSettings< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings() { + return ((AutoMlStubSettings) getStubSettings()).listModelEvaluationsSettings(); + } + + public static final AutoMlSettings create(AutoMlStubSettings stub) throws IOException { + return new AutoMlSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AutoMlStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AutoMlStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AutoMlStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AutoMlStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AutoMlStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AutoMlStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AutoMlStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AutoMlSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AutoMlSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(AutoMlStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(AutoMlStubSettings.newBuilder()); + } + + protected Builder(AutoMlSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AutoMlStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public AutoMlStubSettings.Builder getStubSettingsBuilder() { + return ((AutoMlStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createDataset. */ + public UnaryCallSettings.Builder createDatasetSettings() { + return getStubSettingsBuilder().createDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataset. */ + public UnaryCallSettings.Builder updateDatasetSettings() { + return getStubSettingsBuilder().updateDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to getDataset. */ + public UnaryCallSettings.Builder getDatasetSettings() { + return getStubSettingsBuilder().getDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to listDatasets. */ + public PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings() { + return getStubSettingsBuilder().listDatasetsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + public UnaryCallSettings.Builder deleteDatasetSettings() { + return getStubSettingsBuilder().deleteDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteDatasetOperationSettings() { + return getStubSettingsBuilder().deleteDatasetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to importData. */ + public UnaryCallSettings.Builder importDataSettings() { + return getStubSettingsBuilder().importDataSettings(); + } + + /** Returns the builder for the settings used for calls to importData. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + importDataOperationSettings() { + return getStubSettingsBuilder().importDataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportData. */ + public UnaryCallSettings.Builder exportDataSettings() { + return getStubSettingsBuilder().exportDataSettings(); + } + + /** Returns the builder for the settings used for calls to exportData. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + exportDataOperationSettings() { + return getStubSettingsBuilder().exportDataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createModel. */ + public UnaryCallSettings.Builder createModelSettings() { + return getStubSettingsBuilder().createModelSettings(); + } + + /** Returns the builder for the settings used for calls to createModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createModelOperationSettings() { + return getStubSettingsBuilder().createModelOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getModel. */ + public UnaryCallSettings.Builder getModelSettings() { + return getStubSettingsBuilder().getModelSettings(); + } + + /** Returns the builder for the settings used for calls to updateModel. */ + public UnaryCallSettings.Builder updateModelSettings() { + return getStubSettingsBuilder().updateModelSettings(); + } + + /** Returns the builder for the settings used for calls to listModels. */ + public PagedCallSettings.Builder + listModelsSettings() { + return getStubSettingsBuilder().listModelsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + public UnaryCallSettings.Builder deleteModelSettings() { + return getStubSettingsBuilder().deleteModelSettings(); + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteModelOperationSettings() { + return getStubSettingsBuilder().deleteModelOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getModelEvaluation. */ + public UnaryCallSettings.Builder + getModelEvaluationSettings() { + return getStubSettingsBuilder().getModelEvaluationSettings(); + } + + /** Returns the builder for the settings used for calls to listModelEvaluations. */ + public PagedCallSettings.Builder< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings() { + return getStubSettingsBuilder().listModelEvaluationsSettings(); + } + + @Override + public AutoMlSettings build() throws IOException { + return new AutoMlSettings(this); + } + } +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/PredictionServiceClient.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/PredictionServiceClient.java new file mode 100644 index 000000000..00d84135d --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/PredictionServiceClient.java @@ -0,0 +1,304 @@ +/* + * 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.automl.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.automl.v1.stub.PredictionServiceStub; +import com.google.cloud.automl.v1.stub.PredictionServiceStubSettings; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: AutoML Prediction API. + * + *

On any input that is documented to expect a string parameter in snake_case or kebab-case, + * either of those cases is accepted. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+ *   ExamplePayload payload = ExamplePayload.newBuilder().build();
+ *   Map<String, String> params = new HashMap<>();
+ *   PredictResponse response = predictionServiceClient.predict(name, payload, params);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the predictionServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of PredictionServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * PredictionServiceSettings predictionServiceSettings =
+ *     PredictionServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PredictionServiceClient predictionServiceClient =
+ *     PredictionServiceClient.create(predictionServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * PredictionServiceSettings predictionServiceSettings =
+ *     PredictionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PredictionServiceClient predictionServiceClient =
+ *     PredictionServiceClient.create(predictionServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class PredictionServiceClient implements BackgroundResource { + private final PredictionServiceSettings settings; + private final PredictionServiceStub stub; + + /** Constructs an instance of PredictionServiceClient with default settings. */ + public static final PredictionServiceClient create() throws IOException { + return create(PredictionServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PredictionServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PredictionServiceClient create(PredictionServiceSettings settings) + throws IOException { + return new PredictionServiceClient(settings); + } + + /** + * Constructs an instance of PredictionServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer to use PredictionServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final PredictionServiceClient create(PredictionServiceStub stub) { + return new PredictionServiceClient(stub); + } + + /** + * Constructs an instance of PredictionServiceClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected PredictionServiceClient(PredictionServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PredictionServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected PredictionServiceClient(PredictionServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final PredictionServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PredictionServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Perform an online prediction. The prediction result will be directly returned in the response. + * Available for following ML problems, and their expected request payloads: * Translation - + * TextSnippet, content up to 25,000 characters, UTF-8 encoded. + * + *

Sample code: + * + *


+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ExamplePayload payload = ExamplePayload.newBuilder().build();
+   *   Map<String, String> params = new HashMap<>();
+   *   PredictResponse response = predictionServiceClient.predict(name, payload, params);
+   * }
+   * 
+ * + * @param name Name of the model requested to serve the prediction. + * @param payload Required. Payload to perform a prediction on. The payload must match the problem + * type that the model was trained to solve. + * @param params Additional domain-specific parameters, any string must be up to 25000 characters + * long. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PredictResponse predict( + ModelName name, ExamplePayload payload, Map params) { + + PredictRequest request = + PredictRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setPayload(payload) + .putAllParams(params) + .build(); + return predict(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Perform an online prediction. The prediction result will be directly returned in the response. + * Available for following ML problems, and their expected request payloads: * Translation - + * TextSnippet, content up to 25,000 characters, UTF-8 encoded. + * + *

Sample code: + * + *


+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ExamplePayload payload = ExamplePayload.newBuilder().build();
+   *   Map<String, String> params = new HashMap<>();
+   *   PredictResponse response = predictionServiceClient.predict(name.toString(), payload, params);
+   * }
+   * 
+ * + * @param name Name of the model requested to serve the prediction. + * @param payload Required. Payload to perform a prediction on. The payload must match the problem + * type that the model was trained to solve. + * @param params Additional domain-specific parameters, any string must be up to 25000 characters + * long. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PredictResponse predict( + String name, ExamplePayload payload, Map params) { + + PredictRequest request = + PredictRequest.newBuilder().setName(name).setPayload(payload).putAllParams(params).build(); + return predict(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Perform an online prediction. The prediction result will be directly returned in the response. + * Available for following ML problems, and their expected request payloads: * Translation - + * TextSnippet, content up to 25,000 characters, UTF-8 encoded. + * + *

Sample code: + * + *


+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ExamplePayload payload = ExamplePayload.newBuilder().build();
+   *   PredictRequest request = PredictRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setPayload(payload)
+   *     .build();
+   *   PredictResponse response = predictionServiceClient.predict(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 PredictResponse predict(PredictRequest request) { + return predictCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Perform an online prediction. The prediction result will be directly returned in the response. + * Available for following ML problems, and their expected request payloads: * Translation - + * TextSnippet, content up to 25,000 characters, UTF-8 encoded. + * + *

Sample code: + * + *


+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ExamplePayload payload = ExamplePayload.newBuilder().build();
+   *   PredictRequest request = PredictRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setPayload(payload)
+   *     .build();
+   *   ApiFuture<PredictResponse> future = predictionServiceClient.predictCallable().futureCall(request);
+   *   // Do something
+   *   PredictResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable predictCallable() { + return stub.predictCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/PredictionServiceSettings.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/PredictionServiceSettings.java new file mode 100644 index 000000000..674f3f055 --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/PredictionServiceSettings.java @@ -0,0 +1,175 @@ +/* + * 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.automl.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.automl.v1.stub.PredictionServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link PredictionServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (automl.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 predict to 30 seconds: + * + *

+ * 
+ * PredictionServiceSettings.Builder predictionServiceSettingsBuilder =
+ *     PredictionServiceSettings.newBuilder();
+ * predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class PredictionServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to predict. */ + public UnaryCallSettings predictSettings() { + return ((PredictionServiceStubSettings) getStubSettings()).predictSettings(); + } + + public static final PredictionServiceSettings create(PredictionServiceStubSettings stub) + throws IOException { + return new PredictionServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PredictionServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PredictionServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PredictionServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PredictionServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PredictionServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PredictionServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PredictionServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PredictionServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PredictionServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(PredictionServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(PredictionServiceStubSettings.newBuilder()); + } + + protected Builder(PredictionServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PredictionServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public PredictionServiceStubSettings.Builder getStubSettingsBuilder() { + return ((PredictionServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to predict. */ + public UnaryCallSettings.Builder predictSettings() { + return getStubSettingsBuilder().predictSettings(); + } + + @Override + public PredictionServiceSettings build() throws IOException { + return new PredictionServiceSettings(this); + } + } +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/package-info.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/package-info.java new file mode 100644 index 000000000..247ee7b09 --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/package-info.java @@ -0,0 +1,73 @@ +/* + * 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. + */ + +/** + * A client to Cloud AutoML API. + * + *

The interfaces provided are listed below, along with usage samples. + * + *

============ AutoMlClient ============ + * + *

Service Description: AutoML Server API. + * + *

The resource names are assigned by the server. The server never reuses names that it has + * created after the resources with those names are deleted. + * + *

An ID of a resource is the last element of the item's resource name. For + * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then the id for the item + * is `{dataset_id}`. + * + *

Currently the only supported `location_id` is "us-central1". + * + *

On any input that is documented to expect a string parameter in snake_case or kebab-case, + * either of those cases is accepted. + * + *

Sample for AutoMlClient: + * + *

+ * 
+ * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Dataset dataset = Dataset.newBuilder().build();
+ *   Operation response = autoMlClient.createDataset(parent, dataset);
+ * }
+ * 
+ * 
+ * + * ======================= PredictionServiceClient ======================= + * + *

Service Description: AutoML Prediction API. + * + *

On any input that is documented to expect a string parameter in snake_case or kebab-case, + * either of those cases is accepted. + * + *

Sample for PredictionServiceClient: + * + *

+ * 
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+ *   ExamplePayload payload = ExamplePayload.newBuilder().build();
+ *   Map<String, String> params = new HashMap<>();
+ *   PredictResponse response = predictionServiceClient.predict(name, payload, params);
+ * }
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +package com.google.cloud.automl.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/AutoMlStub.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/AutoMlStub.java new file mode 100644 index 000000000..e8170e6be --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/AutoMlStub.java @@ -0,0 +1,169 @@ +/* + * 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.automl.v1.stub; + +import static com.google.cloud.automl.v1.AutoMlClient.ListDatasetsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.automl.v1.CreateDatasetRequest; +import com.google.cloud.automl.v1.CreateModelRequest; +import com.google.cloud.automl.v1.Dataset; +import com.google.cloud.automl.v1.DeleteDatasetRequest; +import com.google.cloud.automl.v1.DeleteModelRequest; +import com.google.cloud.automl.v1.ExportDataRequest; +import com.google.cloud.automl.v1.GetDatasetRequest; +import com.google.cloud.automl.v1.GetModelEvaluationRequest; +import com.google.cloud.automl.v1.GetModelRequest; +import com.google.cloud.automl.v1.ImportDataRequest; +import com.google.cloud.automl.v1.ListDatasetsRequest; +import com.google.cloud.automl.v1.ListDatasetsResponse; +import com.google.cloud.automl.v1.ListModelEvaluationsRequest; +import com.google.cloud.automl.v1.ListModelEvaluationsResponse; +import com.google.cloud.automl.v1.ListModelsRequest; +import com.google.cloud.automl.v1.ListModelsResponse; +import com.google.cloud.automl.v1.Model; +import com.google.cloud.automl.v1.ModelEvaluation; +import com.google.cloud.automl.v1.OperationMetadata; +import com.google.cloud.automl.v1.UpdateDatasetRequest; +import com.google.cloud.automl.v1.UpdateModelRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud AutoML API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class AutoMlStub implements BackgroundResource { + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable createDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: createDatasetCallable()"); + } + + public UnaryCallable updateDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: updateDatasetCallable()"); + } + + public UnaryCallable getDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: getDatasetCallable()"); + } + + public UnaryCallable listDatasetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDatasetsPagedCallable()"); + } + + public UnaryCallable listDatasetsCallable() { + throw new UnsupportedOperationException("Not implemented: listDatasetsCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + deleteDatasetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDatasetOperationCallable()"); + } + + public UnaryCallable deleteDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDatasetCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + importDataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importDataOperationCallable()"); + } + + public UnaryCallable importDataCallable() { + throw new UnsupportedOperationException("Not implemented: importDataCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + exportDataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportDataOperationCallable()"); + } + + public UnaryCallable exportDataCallable() { + throw new UnsupportedOperationException("Not implemented: exportDataCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + createModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createModelOperationCallable()"); + } + + public UnaryCallable createModelCallable() { + throw new UnsupportedOperationException("Not implemented: createModelCallable()"); + } + + public UnaryCallable getModelCallable() { + throw new UnsupportedOperationException("Not implemented: getModelCallable()"); + } + + public UnaryCallable updateModelCallable() { + throw new UnsupportedOperationException("Not implemented: updateModelCallable()"); + } + + public UnaryCallable listModelsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listModelsPagedCallable()"); + } + + public UnaryCallable listModelsCallable() { + throw new UnsupportedOperationException("Not implemented: listModelsCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + deleteModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteModelOperationCallable()"); + } + + public UnaryCallable deleteModelCallable() { + throw new UnsupportedOperationException("Not implemented: deleteModelCallable()"); + } + + public UnaryCallable getModelEvaluationCallable() { + throw new UnsupportedOperationException("Not implemented: getModelEvaluationCallable()"); + } + + public UnaryCallable + listModelEvaluationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listModelEvaluationsPagedCallable()"); + } + + public UnaryCallable + listModelEvaluationsCallable() { + throw new UnsupportedOperationException("Not implemented: listModelEvaluationsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/AutoMlStubSettings.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/AutoMlStubSettings.java new file mode 100644 index 000000000..0da53b485 --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/AutoMlStubSettings.java @@ -0,0 +1,1032 @@ +/* + * 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.automl.v1.stub; + +import static com.google.cloud.automl.v1.AutoMlClient.ListDatasetsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.automl.v1.CreateDatasetRequest; +import com.google.cloud.automl.v1.CreateModelRequest; +import com.google.cloud.automl.v1.Dataset; +import com.google.cloud.automl.v1.DeleteDatasetRequest; +import com.google.cloud.automl.v1.DeleteModelRequest; +import com.google.cloud.automl.v1.ExportDataRequest; +import com.google.cloud.automl.v1.GetDatasetRequest; +import com.google.cloud.automl.v1.GetModelEvaluationRequest; +import com.google.cloud.automl.v1.GetModelRequest; +import com.google.cloud.automl.v1.ImportDataRequest; +import com.google.cloud.automl.v1.ListDatasetsRequest; +import com.google.cloud.automl.v1.ListDatasetsResponse; +import com.google.cloud.automl.v1.ListModelEvaluationsRequest; +import com.google.cloud.automl.v1.ListModelEvaluationsResponse; +import com.google.cloud.automl.v1.ListModelsRequest; +import com.google.cloud.automl.v1.ListModelsResponse; +import com.google.cloud.automl.v1.Model; +import com.google.cloud.automl.v1.ModelEvaluation; +import com.google.cloud.automl.v1.OperationMetadata; +import com.google.cloud.automl.v1.UpdateDatasetRequest; +import com.google.cloud.automl.v1.UpdateModelRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link AutoMlStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (automl.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 createDataset to 30 seconds: + * + *

+ * 
+ * AutoMlStubSettings.Builder autoMlSettingsBuilder =
+ *     AutoMlStubSettings.newBuilder();
+ * autoMlSettingsBuilder.createDatasetSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * AutoMlStubSettings autoMlSettings = autoMlSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class AutoMlStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createDatasetSettings; + private final UnaryCallSettings updateDatasetSettings; + private final UnaryCallSettings getDatasetSettings; + private final PagedCallSettings< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings; + private final UnaryCallSettings deleteDatasetSettings; + private final OperationCallSettings + deleteDatasetOperationSettings; + private final UnaryCallSettings importDataSettings; + private final OperationCallSettings + importDataOperationSettings; + private final UnaryCallSettings exportDataSettings; + private final OperationCallSettings + exportDataOperationSettings; + private final UnaryCallSettings createModelSettings; + private final OperationCallSettings + createModelOperationSettings; + private final UnaryCallSettings getModelSettings; + private final UnaryCallSettings updateModelSettings; + private final PagedCallSettings + listModelsSettings; + private final UnaryCallSettings deleteModelSettings; + private final OperationCallSettings + deleteModelOperationSettings; + private final UnaryCallSettings + getModelEvaluationSettings; + private final PagedCallSettings< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings; + + /** Returns the object with the settings used for calls to createDataset. */ + public UnaryCallSettings createDatasetSettings() { + return createDatasetSettings; + } + + /** Returns the object with the settings used for calls to updateDataset. */ + public UnaryCallSettings updateDatasetSettings() { + return updateDatasetSettings; + } + + /** Returns the object with the settings used for calls to getDataset. */ + public UnaryCallSettings getDatasetSettings() { + return getDatasetSettings; + } + + /** Returns the object with the settings used for calls to listDatasets. */ + public PagedCallSettings + listDatasetsSettings() { + return listDatasetsSettings; + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + public UnaryCallSettings deleteDatasetSettings() { + return deleteDatasetSettings; + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + deleteDatasetOperationSettings() { + return deleteDatasetOperationSettings; + } + + /** Returns the object with the settings used for calls to importData. */ + public UnaryCallSettings importDataSettings() { + return importDataSettings; + } + + /** Returns the object with the settings used for calls to importData. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + importDataOperationSettings() { + return importDataOperationSettings; + } + + /** Returns the object with the settings used for calls to exportData. */ + public UnaryCallSettings exportDataSettings() { + return exportDataSettings; + } + + /** Returns the object with the settings used for calls to exportData. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + exportDataOperationSettings() { + return exportDataOperationSettings; + } + + /** Returns the object with the settings used for calls to createModel. */ + public UnaryCallSettings createModelSettings() { + return createModelSettings; + } + + /** Returns the object with the settings used for calls to createModel. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + createModelOperationSettings() { + return createModelOperationSettings; + } + + /** Returns the object with the settings used for calls to getModel. */ + public UnaryCallSettings getModelSettings() { + return getModelSettings; + } + + /** Returns the object with the settings used for calls to updateModel. */ + public UnaryCallSettings updateModelSettings() { + return updateModelSettings; + } + + /** Returns the object with the settings used for calls to listModels. */ + public PagedCallSettings + listModelsSettings() { + return listModelsSettings; + } + + /** Returns the object with the settings used for calls to deleteModel. */ + public UnaryCallSettings deleteModelSettings() { + return deleteModelSettings; + } + + /** Returns the object with the settings used for calls to deleteModel. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + deleteModelOperationSettings() { + return deleteModelOperationSettings; + } + + /** Returns the object with the settings used for calls to getModelEvaluation. */ + public UnaryCallSettings + getModelEvaluationSettings() { + return getModelEvaluationSettings; + } + + /** Returns the object with the settings used for calls to listModelEvaluations. */ + public PagedCallSettings< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings() { + return listModelEvaluationsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public AutoMlStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAutoMlStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "automl.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(AutoMlStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AutoMlStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createDatasetSettings = settingsBuilder.createDatasetSettings().build(); + updateDatasetSettings = settingsBuilder.updateDatasetSettings().build(); + getDatasetSettings = settingsBuilder.getDatasetSettings().build(); + listDatasetsSettings = settingsBuilder.listDatasetsSettings().build(); + deleteDatasetSettings = settingsBuilder.deleteDatasetSettings().build(); + deleteDatasetOperationSettings = settingsBuilder.deleteDatasetOperationSettings().build(); + importDataSettings = settingsBuilder.importDataSettings().build(); + importDataOperationSettings = settingsBuilder.importDataOperationSettings().build(); + exportDataSettings = settingsBuilder.exportDataSettings().build(); + exportDataOperationSettings = settingsBuilder.exportDataOperationSettings().build(); + createModelSettings = settingsBuilder.createModelSettings().build(); + createModelOperationSettings = settingsBuilder.createModelOperationSettings().build(); + getModelSettings = settingsBuilder.getModelSettings().build(); + updateModelSettings = settingsBuilder.updateModelSettings().build(); + listModelsSettings = settingsBuilder.listModelsSettings().build(); + deleteModelSettings = settingsBuilder.deleteModelSettings().build(); + deleteModelOperationSettings = settingsBuilder.deleteModelOperationSettings().build(); + getModelEvaluationSettings = settingsBuilder.getModelEvaluationSettings().build(); + listModelEvaluationsSettings = settingsBuilder.listModelEvaluationsSettings().build(); + } + + private static final PagedListDescriptor + LIST_DATASETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDatasetsRequest injectToken(ListDatasetsRequest payload, String token) { + return ListDatasetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDatasetsRequest injectPageSize(ListDatasetsRequest payload, int pageSize) { + return ListDatasetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDatasetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDatasetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDatasetsResponse payload) { + return payload.getDatasetsList() != null + ? payload.getDatasetsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor + LIST_MODELS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListModelsRequest injectToken(ListModelsRequest payload, String token) { + return ListModelsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListModelsRequest injectPageSize(ListModelsRequest payload, int pageSize) { + return ListModelsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListModelsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListModelsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListModelsResponse payload) { + return payload.getModelList() != null + ? payload.getModelList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListModelEvaluationsRequest, ListModelEvaluationsResponse, ModelEvaluation> + LIST_MODEL_EVALUATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListModelEvaluationsRequest, ListModelEvaluationsResponse, ModelEvaluation>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListModelEvaluationsRequest injectToken( + ListModelEvaluationsRequest payload, String token) { + return ListModelEvaluationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListModelEvaluationsRequest injectPageSize( + ListModelEvaluationsRequest payload, int pageSize) { + return ListModelEvaluationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListModelEvaluationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListModelEvaluationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListModelEvaluationsResponse payload) { + return payload.getModelEvaluationList() != null + ? payload.getModelEvaluationList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + LIST_DATASETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDatasetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATASETS_PAGE_STR_DESC, request, context); + return ListDatasetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> + LIST_MODELS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListModelsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_MODELS_PAGE_STR_DESC, request, context); + return ListModelsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + LIST_MODEL_EVALUATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListModelEvaluationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListModelEvaluationsRequest, ListModelEvaluationsResponse, ModelEvaluation> + pageContext = + PageContext.create( + callable, LIST_MODEL_EVALUATIONS_PAGE_STR_DESC, request, context); + return ListModelEvaluationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for AutoMlStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder createDatasetSettings; + private final UnaryCallSettings.Builder updateDatasetSettings; + private final UnaryCallSettings.Builder getDatasetSettings; + private final PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings; + private final UnaryCallSettings.Builder deleteDatasetSettings; + private final OperationCallSettings.Builder + deleteDatasetOperationSettings; + private final UnaryCallSettings.Builder importDataSettings; + private final OperationCallSettings.Builder + importDataOperationSettings; + private final UnaryCallSettings.Builder exportDataSettings; + private final OperationCallSettings.Builder + exportDataOperationSettings; + private final UnaryCallSettings.Builder createModelSettings; + private final OperationCallSettings.Builder + createModelOperationSettings; + private final UnaryCallSettings.Builder getModelSettings; + private final UnaryCallSettings.Builder updateModelSettings; + private final PagedCallSettings.Builder< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> + listModelsSettings; + private final UnaryCallSettings.Builder deleteModelSettings; + private final OperationCallSettings.Builder + deleteModelOperationSettings; + private final UnaryCallSettings.Builder + getModelEvaluationSettings; + private final PagedCallSettings.Builder< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listDatasetsSettings = PagedCallSettings.newBuilder(LIST_DATASETS_PAGE_STR_FACT); + + deleteDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteDatasetOperationSettings = OperationCallSettings.newBuilder(); + + importDataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + importDataOperationSettings = OperationCallSettings.newBuilder(); + + exportDataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + exportDataOperationSettings = OperationCallSettings.newBuilder(); + + createModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createModelOperationSettings = OperationCallSettings.newBuilder(); + + getModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listModelsSettings = PagedCallSettings.newBuilder(LIST_MODELS_PAGE_STR_FACT); + + deleteModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteModelOperationSettings = OperationCallSettings.newBuilder(); + + getModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listModelEvaluationsSettings = + PagedCallSettings.newBuilder(LIST_MODEL_EVALUATIONS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDatasetSettings, + updateDatasetSettings, + getDatasetSettings, + listDatasetsSettings, + deleteDatasetSettings, + importDataSettings, + exportDataSettings, + createModelSettings, + getModelSettings, + updateModelSettings, + listModelsSettings, + deleteModelSettings, + getModelEvaluationSettings, + listModelEvaluationsSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .createDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listDatasetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .importDataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .exportDataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listModelsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getModelEvaluationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listModelEvaluationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .deleteDatasetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .importDataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(3600000L)) + .build())); + builder + .exportDataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .createModelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Model.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .deleteModelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + protected Builder(AutoMlStubSettings settings) { + super(settings); + + createDatasetSettings = settings.createDatasetSettings.toBuilder(); + updateDatasetSettings = settings.updateDatasetSettings.toBuilder(); + getDatasetSettings = settings.getDatasetSettings.toBuilder(); + listDatasetsSettings = settings.listDatasetsSettings.toBuilder(); + deleteDatasetSettings = settings.deleteDatasetSettings.toBuilder(); + deleteDatasetOperationSettings = settings.deleteDatasetOperationSettings.toBuilder(); + importDataSettings = settings.importDataSettings.toBuilder(); + importDataOperationSettings = settings.importDataOperationSettings.toBuilder(); + exportDataSettings = settings.exportDataSettings.toBuilder(); + exportDataOperationSettings = settings.exportDataOperationSettings.toBuilder(); + createModelSettings = settings.createModelSettings.toBuilder(); + createModelOperationSettings = settings.createModelOperationSettings.toBuilder(); + getModelSettings = settings.getModelSettings.toBuilder(); + updateModelSettings = settings.updateModelSettings.toBuilder(); + listModelsSettings = settings.listModelsSettings.toBuilder(); + deleteModelSettings = settings.deleteModelSettings.toBuilder(); + deleteModelOperationSettings = settings.deleteModelOperationSettings.toBuilder(); + getModelEvaluationSettings = settings.getModelEvaluationSettings.toBuilder(); + listModelEvaluationsSettings = settings.listModelEvaluationsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDatasetSettings, + updateDatasetSettings, + getDatasetSettings, + listDatasetsSettings, + deleteDatasetSettings, + importDataSettings, + exportDataSettings, + createModelSettings, + getModelSettings, + updateModelSettings, + listModelsSettings, + deleteModelSettings, + getModelEvaluationSettings, + listModelEvaluationsSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createDataset. */ + public UnaryCallSettings.Builder createDatasetSettings() { + return createDatasetSettings; + } + + /** Returns the builder for the settings used for calls to updateDataset. */ + public UnaryCallSettings.Builder updateDatasetSettings() { + return updateDatasetSettings; + } + + /** Returns the builder for the settings used for calls to getDataset. */ + public UnaryCallSettings.Builder getDatasetSettings() { + return getDatasetSettings; + } + + /** Returns the builder for the settings used for calls to listDatasets. */ + public PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings() { + return listDatasetsSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + public UnaryCallSettings.Builder deleteDatasetSettings() { + return deleteDatasetSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteDatasetOperationSettings() { + return deleteDatasetOperationSettings; + } + + /** Returns the builder for the settings used for calls to importData. */ + public UnaryCallSettings.Builder importDataSettings() { + return importDataSettings; + } + + /** Returns the builder for the settings used for calls to importData. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + importDataOperationSettings() { + return importDataOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportData. */ + public UnaryCallSettings.Builder exportDataSettings() { + return exportDataSettings; + } + + /** Returns the builder for the settings used for calls to exportData. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + exportDataOperationSettings() { + return exportDataOperationSettings; + } + + /** Returns the builder for the settings used for calls to createModel. */ + public UnaryCallSettings.Builder createModelSettings() { + return createModelSettings; + } + + /** Returns the builder for the settings used for calls to createModel. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createModelOperationSettings() { + return createModelOperationSettings; + } + + /** Returns the builder for the settings used for calls to getModel. */ + public UnaryCallSettings.Builder getModelSettings() { + return getModelSettings; + } + + /** Returns the builder for the settings used for calls to updateModel. */ + public UnaryCallSettings.Builder updateModelSettings() { + return updateModelSettings; + } + + /** Returns the builder for the settings used for calls to listModels. */ + public PagedCallSettings.Builder + listModelsSettings() { + return listModelsSettings; + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + public UnaryCallSettings.Builder deleteModelSettings() { + return deleteModelSettings; + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteModelOperationSettings() { + return deleteModelOperationSettings; + } + + /** Returns the builder for the settings used for calls to getModelEvaluation. */ + public UnaryCallSettings.Builder + getModelEvaluationSettings() { + return getModelEvaluationSettings; + } + + /** Returns the builder for the settings used for calls to listModelEvaluations. */ + public PagedCallSettings.Builder< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings() { + return listModelEvaluationsSettings; + } + + @Override + public AutoMlStubSettings build() throws IOException { + return new AutoMlStubSettings(this); + } + } +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcAutoMlCallableFactory.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcAutoMlCallableFactory.java new file mode 100644 index 000000000..bdd2f7167 --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcAutoMlCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.automl.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud AutoML API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcAutoMlCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcAutoMlStub.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcAutoMlStub.java new file mode 100644 index 000000000..1065fdeec --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcAutoMlStub.java @@ -0,0 +1,668 @@ +/* + * 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.automl.v1.stub; + +import static com.google.cloud.automl.v1.AutoMlClient.ListDatasetsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.automl.v1.CreateDatasetRequest; +import com.google.cloud.automl.v1.CreateModelRequest; +import com.google.cloud.automl.v1.Dataset; +import com.google.cloud.automl.v1.DeleteDatasetRequest; +import com.google.cloud.automl.v1.DeleteModelRequest; +import com.google.cloud.automl.v1.ExportDataRequest; +import com.google.cloud.automl.v1.GetDatasetRequest; +import com.google.cloud.automl.v1.GetModelEvaluationRequest; +import com.google.cloud.automl.v1.GetModelRequest; +import com.google.cloud.automl.v1.ImportDataRequest; +import com.google.cloud.automl.v1.ListDatasetsRequest; +import com.google.cloud.automl.v1.ListDatasetsResponse; +import com.google.cloud.automl.v1.ListModelEvaluationsRequest; +import com.google.cloud.automl.v1.ListModelEvaluationsResponse; +import com.google.cloud.automl.v1.ListModelsRequest; +import com.google.cloud.automl.v1.ListModelsResponse; +import com.google.cloud.automl.v1.Model; +import com.google.cloud.automl.v1.ModelEvaluation; +import com.google.cloud.automl.v1.OperationMetadata; +import com.google.cloud.automl.v1.UpdateDatasetRequest; +import com.google.cloud.automl.v1.UpdateModelRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud AutoML API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcAutoMlStub extends AutoMlStub { + + private static final MethodDescriptor + createDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/CreateDataset") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/UpdateDataset") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) + .build(); + private static final MethodDescriptor getDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/GetDataset") + .setRequestMarshaller(ProtoUtils.marshaller(GetDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listDatasetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/ListDatasets") + .setRequestMarshaller(ProtoUtils.marshaller(ListDatasetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDatasetsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/DeleteDataset") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor importDataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/ImportData") + .setRequestMarshaller(ProtoUtils.marshaller(ImportDataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor exportDataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/ExportData") + .setRequestMarshaller(ProtoUtils.marshaller(ExportDataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor createModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/CreateModel") + .setRequestMarshaller(ProtoUtils.marshaller(CreateModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor getModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/GetModel") + .setRequestMarshaller(ProtoUtils.marshaller(GetModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/UpdateModel") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listModelsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/ListModels") + .setRequestMarshaller(ProtoUtils.marshaller(ListModelsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListModelsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/DeleteModel") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getModelEvaluationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/GetModelEvaluation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetModelEvaluationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ModelEvaluation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listModelEvaluationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.AutoMl/ListModelEvaluations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListModelEvaluationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListModelEvaluationsResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + + private final UnaryCallable createDatasetCallable; + private final UnaryCallable updateDatasetCallable; + private final UnaryCallable getDatasetCallable; + private final UnaryCallable listDatasetsCallable; + private final UnaryCallable + listDatasetsPagedCallable; + private final UnaryCallable deleteDatasetCallable; + private final OperationCallable + deleteDatasetOperationCallable; + private final UnaryCallable importDataCallable; + private final OperationCallable + importDataOperationCallable; + private final UnaryCallable exportDataCallable; + private final OperationCallable + exportDataOperationCallable; + private final UnaryCallable createModelCallable; + private final OperationCallable + createModelOperationCallable; + private final UnaryCallable getModelCallable; + private final UnaryCallable updateModelCallable; + private final UnaryCallable listModelsCallable; + private final UnaryCallable listModelsPagedCallable; + private final UnaryCallable deleteModelCallable; + private final OperationCallable + deleteModelOperationCallable; + private final UnaryCallable + getModelEvaluationCallable; + private final UnaryCallable + listModelEvaluationsCallable; + private final UnaryCallable + listModelEvaluationsPagedCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAutoMlStub create(AutoMlStubSettings settings) throws IOException { + return new GrpcAutoMlStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAutoMlStub create(ClientContext clientContext) throws IOException { + return new GrpcAutoMlStub(AutoMlStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAutoMlStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAutoMlStub( + AutoMlStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAutoMlStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcAutoMlStub(AutoMlStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAutoMlCallableFactory()); + } + + /** + * Constructs an instance of GrpcAutoMlStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcAutoMlStub( + AutoMlStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("dataset.name", String.valueOf(request.getDataset().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listDatasetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDatasetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDatasetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings importDataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importDataMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ImportDataRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings exportDataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportDataMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportDataRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("model.name", String.valueOf(request.getModel().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listModelsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listModelsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListModelsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getModelEvaluationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getModelEvaluationMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetModelEvaluationRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listModelEvaluationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listModelEvaluationsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListModelEvaluationsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.createDatasetCallable = + callableFactory.createUnaryCallable( + createDatasetTransportSettings, settings.createDatasetSettings(), clientContext); + this.updateDatasetCallable = + callableFactory.createUnaryCallable( + updateDatasetTransportSettings, settings.updateDatasetSettings(), clientContext); + this.getDatasetCallable = + callableFactory.createUnaryCallable( + getDatasetTransportSettings, settings.getDatasetSettings(), clientContext); + this.listDatasetsCallable = + callableFactory.createUnaryCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.listDatasetsPagedCallable = + callableFactory.createPagedCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.deleteDatasetCallable = + callableFactory.createUnaryCallable( + deleteDatasetTransportSettings, settings.deleteDatasetSettings(), clientContext); + this.deleteDatasetOperationCallable = + callableFactory.createOperationCallable( + deleteDatasetTransportSettings, + settings.deleteDatasetOperationSettings(), + clientContext, + this.operationsStub); + this.importDataCallable = + callableFactory.createUnaryCallable( + importDataTransportSettings, settings.importDataSettings(), clientContext); + this.importDataOperationCallable = + callableFactory.createOperationCallable( + importDataTransportSettings, + settings.importDataOperationSettings(), + clientContext, + this.operationsStub); + this.exportDataCallable = + callableFactory.createUnaryCallable( + exportDataTransportSettings, settings.exportDataSettings(), clientContext); + this.exportDataOperationCallable = + callableFactory.createOperationCallable( + exportDataTransportSettings, + settings.exportDataOperationSettings(), + clientContext, + this.operationsStub); + this.createModelCallable = + callableFactory.createUnaryCallable( + createModelTransportSettings, settings.createModelSettings(), clientContext); + this.createModelOperationCallable = + callableFactory.createOperationCallable( + createModelTransportSettings, + settings.createModelOperationSettings(), + clientContext, + this.operationsStub); + this.getModelCallable = + callableFactory.createUnaryCallable( + getModelTransportSettings, settings.getModelSettings(), clientContext); + this.updateModelCallable = + callableFactory.createUnaryCallable( + updateModelTransportSettings, settings.updateModelSettings(), clientContext); + this.listModelsCallable = + callableFactory.createUnaryCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.listModelsPagedCallable = + callableFactory.createPagedCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.deleteModelCallable = + callableFactory.createUnaryCallable( + deleteModelTransportSettings, settings.deleteModelSettings(), clientContext); + this.deleteModelOperationCallable = + callableFactory.createOperationCallable( + deleteModelTransportSettings, + settings.deleteModelOperationSettings(), + clientContext, + this.operationsStub); + this.getModelEvaluationCallable = + callableFactory.createUnaryCallable( + getModelEvaluationTransportSettings, + settings.getModelEvaluationSettings(), + clientContext); + this.listModelEvaluationsCallable = + callableFactory.createUnaryCallable( + listModelEvaluationsTransportSettings, + settings.listModelEvaluationsSettings(), + clientContext); + this.listModelEvaluationsPagedCallable = + callableFactory.createPagedCallable( + listModelEvaluationsTransportSettings, + settings.listModelEvaluationsSettings(), + clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable createDatasetCallable() { + return createDatasetCallable; + } + + public UnaryCallable updateDatasetCallable() { + return updateDatasetCallable; + } + + public UnaryCallable getDatasetCallable() { + return getDatasetCallable; + } + + public UnaryCallable listDatasetsPagedCallable() { + return listDatasetsPagedCallable; + } + + public UnaryCallable listDatasetsCallable() { + return listDatasetsCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + deleteDatasetOperationCallable() { + return deleteDatasetOperationCallable; + } + + public UnaryCallable deleteDatasetCallable() { + return deleteDatasetCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + importDataOperationCallable() { + return importDataOperationCallable; + } + + public UnaryCallable importDataCallable() { + return importDataCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + exportDataOperationCallable() { + return exportDataOperationCallable; + } + + public UnaryCallable exportDataCallable() { + return exportDataCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + createModelOperationCallable() { + return createModelOperationCallable; + } + + public UnaryCallable createModelCallable() { + return createModelCallable; + } + + public UnaryCallable getModelCallable() { + return getModelCallable; + } + + public UnaryCallable updateModelCallable() { + return updateModelCallable; + } + + public UnaryCallable listModelsPagedCallable() { + return listModelsPagedCallable; + } + + public UnaryCallable listModelsCallable() { + return listModelsCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + deleteModelOperationCallable() { + return deleteModelOperationCallable; + } + + public UnaryCallable deleteModelCallable() { + return deleteModelCallable; + } + + public UnaryCallable getModelEvaluationCallable() { + return getModelEvaluationCallable; + } + + public UnaryCallable + listModelEvaluationsPagedCallable() { + return listModelEvaluationsPagedCallable; + } + + public UnaryCallable + listModelEvaluationsCallable() { + return listModelEvaluationsCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcPredictionServiceCallableFactory.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcPredictionServiceCallableFactory.java new file mode 100644 index 000000000..0e97c1dc8 --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcPredictionServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.automl.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud AutoML API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcPredictionServiceCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcPredictionServiceStub.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcPredictionServiceStub.java new file mode 100644 index 000000000..8f09ac611 --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/GrpcPredictionServiceStub.java @@ -0,0 +1,153 @@ +/* + * 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.automl.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.automl.v1.PredictRequest; +import com.google.cloud.automl.v1.PredictResponse; +import com.google.common.collect.ImmutableMap; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud AutoML API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcPredictionServiceStub extends PredictionServiceStub { + + private static final MethodDescriptor predictMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.automl.v1.PredictionService/Predict") + .setRequestMarshaller(ProtoUtils.marshaller(PredictRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PredictResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable predictCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPredictionServiceStub create(PredictionServiceStubSettings settings) + throws IOException { + return new GrpcPredictionServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPredictionServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcPredictionServiceStub( + PredictionServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPredictionServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPredictionServiceStub( + PredictionServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPredictionServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcPredictionServiceStub( + PredictionServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcPredictionServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcPredictionServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcPredictionServiceStub( + PredictionServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings predictTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(predictMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(PredictRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.predictCallable = + callableFactory.createUnaryCallable( + predictTransportSettings, settings.predictSettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable predictCallable() { + return predictCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/PredictionServiceStub.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/PredictionServiceStub.java new file mode 100644 index 000000000..ffc7897f1 --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/PredictionServiceStub.java @@ -0,0 +1,41 @@ +/* + * 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.automl.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.automl.v1.PredictRequest; +import com.google.cloud.automl.v1.PredictResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud AutoML API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class PredictionServiceStub implements BackgroundResource { + + public UnaryCallable predictCallable() { + throw new UnsupportedOperationException("Not implemented: predictCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/PredictionServiceStubSettings.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/PredictionServiceStubSettings.java new file mode 100644 index 000000000..b9e30d001 --- /dev/null +++ b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1/stub/PredictionServiceStubSettings.java @@ -0,0 +1,266 @@ +/* + * 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.automl.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.automl.v1.PredictRequest; +import com.google.cloud.automl.v1.PredictResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link PredictionServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (automl.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 predict to 30 seconds: + * + *

+ * 
+ * PredictionServiceStubSettings.Builder predictionServiceSettingsBuilder =
+ *     PredictionServiceStubSettings.newBuilder();
+ * predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * PredictionServiceStubSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class PredictionServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings predictSettings; + + /** Returns the object with the settings used for calls to predict. */ + public UnaryCallSettings predictSettings() { + return predictSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PredictionServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPredictionServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "automl.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(PredictionServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PredictionServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + predictSettings = settingsBuilder.predictSettings().build(); + } + + /** Builder for PredictionServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder predictSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + predictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(predictSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .predictSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(PredictionServiceStubSettings settings) { + super(settings); + + predictSettings = settings.predictSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(predictSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to predict. */ + public UnaryCallSettings.Builder predictSettings() { + return predictSettings; + } + + @Override + public PredictionServiceStubSettings build() throws IOException { + return new PredictionServiceStubSettings(this); + } + } +} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/AutoMlClientTest.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/AutoMlClientTest.java new file mode 100644 index 000000000..0a097bf5e --- /dev/null +++ b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/AutoMlClientTest.java @@ -0,0 +1,769 @@ +/* + * 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.automl.v1; + +import static com.google.cloud.automl.v1.AutoMlClient.ListDatasetsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.automl.v1.AutoMlClient.ListModelsPagedResponse; + +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.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +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 AutoMlClientTest { + private static MockAutoMl mockAutoMl; + private static MockPredictionService mockPredictionService; + private static MockServiceHelper serviceHelper; + private AutoMlClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockAutoMl = new MockAutoMl(); + mockPredictionService = new MockPredictionService(); + serviceHelper = + new MockServiceHelper( + "in-process-1", Arrays.asList(mockAutoMl, mockPredictionService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + AutoMlSettings settings = + AutoMlSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AutoMlClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void createDatasetTest() { + String name = "name3373707"; + boolean done = true; + Operation expectedResponse = Operation.newBuilder().setName(name).setDone(done).build(); + mockAutoMl.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Dataset dataset = Dataset.newBuilder().build(); + + Operation actualResponse = client.createDataset(parent, dataset); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDatasetRequest actualRequest = (CreateDatasetRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(dataset, actualRequest.getDataset()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createDatasetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Dataset dataset = Dataset.newBuilder().build(); + + client.createDataset(parent, dataset); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateDatasetTest() { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + int exampleCount = 1517063674; + String etag = "etag3123477"; + Dataset expectedResponse = + Dataset.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .setExampleCount(exampleCount) + .setEtag(etag) + .build(); + mockAutoMl.addResponse(expectedResponse); + + Dataset dataset = Dataset.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Dataset actualResponse = client.updateDataset(dataset, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDatasetRequest actualRequest = (UpdateDatasetRequest) actualRequests.get(0); + + Assert.assertEquals(dataset, actualRequest.getDataset()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateDatasetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + Dataset dataset = Dataset.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateDataset(dataset, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getDatasetTest() { + String name2 = "name2-1052831874"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + int exampleCount = 1517063674; + String etag = "etag3123477"; + Dataset expectedResponse = + Dataset.newBuilder() + .setName(name2) + .setDisplayName(displayName) + .setDescription(description) + .setExampleCount(exampleCount) + .setEtag(etag) + .build(); + mockAutoMl.addResponse(expectedResponse); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + + Dataset actualResponse = client.getDataset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDatasetRequest actualRequest = (GetDatasetRequest) actualRequests.get(0); + + Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getDatasetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + + client.getDataset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listDatasetsTest() { + String nextPageToken = ""; + Dataset datasetsElement = Dataset.newBuilder().build(); + List datasets = Arrays.asList(datasetsElement); + ListDatasetsResponse expectedResponse = + ListDatasetsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllDatasets(datasets) + .build(); + mockAutoMl.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDatasetsPagedResponse pagedListResponse = client.listDatasets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatasetsList().get(0), resources.get(0)); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDatasetsRequest actualRequest = (ListDatasetsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listDatasetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + client.listDatasets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteDatasetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDatasetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAutoMl.addResponse(resultOperation); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + + Empty actualResponse = client.deleteDatasetAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDatasetRequest actualRequest = (DeleteDatasetRequest) actualRequests.get(0); + + Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteDatasetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + + client.deleteDatasetAsync(name).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 importDataTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importDataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAutoMl.addResponse(resultOperation); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + InputConfig inputConfig = InputConfig.newBuilder().build(); + + Empty actualResponse = client.importDataAsync(name, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportDataRequest actualRequest = (ImportDataRequest) actualRequests.get(0); + + Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); + Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void importDataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + InputConfig inputConfig = InputConfig.newBuilder().build(); + + client.importDataAsync(name, inputConfig).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 exportDataTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportDataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAutoMl.addResponse(resultOperation); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + + Empty actualResponse = client.exportDataAsync(name, outputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportDataRequest actualRequest = (ExportDataRequest) actualRequests.get(0); + + Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void exportDataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + + client.exportDataAsync(name, outputConfig).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 createModelTest() throws Exception { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String datasetId = "datasetId-2115646910"; + Model expectedResponse = + Model.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDatasetId(datasetId) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAutoMl.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Model model = Model.newBuilder().build(); + + Model actualResponse = client.createModelAsync(parent, model).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateModelRequest actualRequest = (CreateModelRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(model, actualRequest.getModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Model model = Model.newBuilder().build(); + + client.createModelAsync(parent, model).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 getModelTest() { + String name2 = "name2-1052831874"; + String displayName = "displayName1615086568"; + String datasetId = "datasetId-2115646910"; + Model expectedResponse = + Model.newBuilder() + .setName(name2) + .setDisplayName(displayName) + .setDatasetId(datasetId) + .build(); + mockAutoMl.addResponse(expectedResponse); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + Model actualResponse = client.getModel(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetModelRequest actualRequest = (GetModelRequest) actualRequests.get(0); + + Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + client.getModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateModelTest() { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String datasetId = "datasetId-2115646910"; + Model expectedResponse = + Model.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDatasetId(datasetId) + .build(); + mockAutoMl.addResponse(expectedResponse); + + Model model = Model.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Model actualResponse = client.updateModel(model, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateModelRequest actualRequest = (UpdateModelRequest) actualRequests.get(0); + + Assert.assertEquals(model, actualRequest.getModel()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + Model model = Model.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateModel(model, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listModelsTest() { + String nextPageToken = ""; + Model modelElement = Model.newBuilder().build(); + List model = Arrays.asList(modelElement); + ListModelsResponse expectedResponse = + ListModelsResponse.newBuilder().setNextPageToken(nextPageToken).addAllModel(model).build(); + mockAutoMl.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListModelsPagedResponse pagedListResponse = client.listModels(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelList().get(0), resources.get(0)); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListModelsRequest actualRequest = (ListModelsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listModelsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + client.listModels(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteModelTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAutoMl.addResponse(resultOperation); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + Empty actualResponse = client.deleteModelAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteModelRequest actualRequest = (DeleteModelRequest) actualRequests.get(0); + + Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + client.deleteModelAsync(name).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 getModelEvaluationTest() { + String name2 = "name2-1052831874"; + String annotationSpecId = "annotationSpecId60690191"; + int evaluatedExampleCount = 277565350; + ModelEvaluation expectedResponse = + ModelEvaluation.newBuilder() + .setName(name2) + .setAnnotationSpecId(annotationSpecId) + .setEvaluatedExampleCount(evaluatedExampleCount) + .build(); + mockAutoMl.addResponse(expectedResponse); + + ModelEvaluationName name = + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]"); + + ModelEvaluation actualResponse = client.getModelEvaluation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetModelEvaluationRequest actualRequest = (GetModelEvaluationRequest) actualRequests.get(0); + + Assert.assertEquals(name, ModelEvaluationName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getModelEvaluationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + ModelEvaluationName name = + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]"); + + client.getModelEvaluation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listModelEvaluationsTest() { + String nextPageToken = ""; + ModelEvaluation modelEvaluationElement = ModelEvaluation.newBuilder().build(); + List modelEvaluation = Arrays.asList(modelEvaluationElement); + ListModelEvaluationsResponse expectedResponse = + ListModelEvaluationsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllModelEvaluation(modelEvaluation) + .build(); + mockAutoMl.addResponse(expectedResponse); + + ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + String filter = "filter-1274492040"; + + ListModelEvaluationsPagedResponse pagedListResponse = + client.listModelEvaluations(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelEvaluationList().get(0), resources.get(0)); + + List actualRequests = mockAutoMl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListModelEvaluationsRequest actualRequest = (ListModelEvaluationsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ModelName.parse(actualRequest.getParent())); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listModelEvaluationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAutoMl.addException(exception); + + try { + ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + String filter = "filter-1274492040"; + + client.listModelEvaluations(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockAutoMl.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockAutoMl.java new file mode 100644 index 000000000..327f14f98 --- /dev/null +++ b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockAutoMl.java @@ -0,0 +1,57 @@ +/* + * 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.automl.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockAutoMl implements MockGrpcService { + private final MockAutoMlImpl serviceImpl; + + public MockAutoMl() { + serviceImpl = new MockAutoMlImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockAutoMlImpl.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockAutoMlImpl.java new file mode 100644 index 000000000..7f1fa627b --- /dev/null +++ b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockAutoMlImpl.java @@ -0,0 +1,263 @@ +/* + * 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.automl.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.automl.v1.AutoMlGrpc.AutoMlImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockAutoMlImpl extends AutoMlImplBase { + private List requests; + private Queue responses; + + public MockAutoMlImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createDataset( + CreateDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getDataset(GetDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Dataset) { + requests.add(request); + responseObserver.onNext((Dataset) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listDatasets( + ListDatasetsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListDatasetsResponse) { + requests.add(request); + responseObserver.onNext((ListDatasetsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateDataset( + UpdateDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Dataset) { + requests.add(request); + responseObserver.onNext((Dataset) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteDataset( + DeleteDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void importData(ImportDataRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void exportData(ExportDataRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createModel(CreateModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getModel(GetModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Model) { + requests.add(request); + responseObserver.onNext((Model) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listModels( + ListModelsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListModelsResponse) { + requests.add(request); + responseObserver.onNext((ListModelsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteModel(DeleteModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateModel(UpdateModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Model) { + requests.add(request); + responseObserver.onNext((Model) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getModelEvaluation( + GetModelEvaluationRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ModelEvaluation) { + requests.add(request); + responseObserver.onNext((ModelEvaluation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listModelEvaluations( + ListModelEvaluationsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListModelEvaluationsResponse) { + requests.add(request); + responseObserver.onNext((ListModelEvaluationsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockPredictionService.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockPredictionService.java new file mode 100644 index 000000000..3c4f553fb --- /dev/null +++ b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockPredictionService.java @@ -0,0 +1,57 @@ +/* + * 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.automl.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockPredictionService implements MockGrpcService { + private final MockPredictionServiceImpl serviceImpl; + + public MockPredictionService() { + serviceImpl = new MockPredictionServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockPredictionServiceImpl.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockPredictionServiceImpl.java new file mode 100644 index 000000000..04a5363e6 --- /dev/null +++ b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/MockPredictionServiceImpl.java @@ -0,0 +1,72 @@ +/* + * 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.automl.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.automl.v1.PredictionServiceGrpc.PredictionServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockPredictionServiceImpl extends PredictionServiceImplBase { + private List requests; + private Queue responses; + + public MockPredictionServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void predict(PredictRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof PredictResponse) { + requests.add(request); + responseObserver.onNext((PredictResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/PredictionServiceClientTest.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/PredictionServiceClientTest.java new file mode 100644 index 000000000..dbeb7b8fe --- /dev/null +++ b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1/PredictionServiceClientTest.java @@ -0,0 +1,123 @@ +/* + * 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.automl.v1; + +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.HashMap; +import java.util.List; +import java.util.Map; +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 PredictionServiceClientTest { + private static MockAutoMl mockAutoMl; + private static MockPredictionService mockPredictionService; + private static MockServiceHelper serviceHelper; + private PredictionServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockAutoMl = new MockAutoMl(); + mockPredictionService = new MockPredictionService(); + serviceHelper = + new MockServiceHelper( + "in-process-1", Arrays.asList(mockAutoMl, mockPredictionService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + PredictionServiceSettings settings = + PredictionServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PredictionServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void predictTest() { + PredictResponse expectedResponse = PredictResponse.newBuilder().build(); + mockPredictionService.addResponse(expectedResponse); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + ExamplePayload payload = ExamplePayload.newBuilder().build(); + Map params = new HashMap<>(); + + PredictResponse actualResponse = client.predict(name, payload, params); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPredictionService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PredictRequest actualRequest = (PredictRequest) actualRequests.get(0); + + Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); + Assert.assertEquals(payload, actualRequest.getPayload()); + Assert.assertEquals(params, actualRequest.getParamsMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void predictExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockPredictionService.addException(exception); + + try { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + ExamplePayload payload = ExamplePayload.newBuilder().build(); + Map params = new HashMap<>(); + + client.predict(name, payload, params); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-automl/synth.metadata b/google-cloud-automl/synth.metadata deleted file mode 100644 index 6c3a29473..000000000 --- a/google-cloud-automl/synth.metadata +++ /dev/null @@ -1,32 +0,0 @@ -{ - "updateTime": "2019-09-06T07:34:47.432620Z", - "sources": [ - { - "generator": { - "name": "artman", - "version": "0.36.2", - "dockerImage": "googleapis/artman@sha256:0e6f3a668cd68afc768ecbe08817cf6e56a0e64fcbdb1c58c3b97492d12418a1" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "960b76b1f0c46d12610088977d1129cc7405f3dc", - "internalRef": "267478864" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "automl", - "apiVersion": "v1beta1", - "language": "java", - "generator": "gapic", - "config": "google/cloud/automl/artman_automl_v1beta1.yaml" - } - } - ] -} \ No newline at end of file diff --git a/grpc-google-cloud-automl-v1/pom.xml b/grpc-google-cloud-automl-v1/pom.xml new file mode 100644 index 000000000..24031d323 --- /dev/null +++ b/grpc-google-cloud-automl-v1/pom.xml @@ -0,0 +1,60 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-automl-v1 + 0.77.0 + grpc-google-cloud-automl-v1 + GRPC library for grpc-google-cloud-automl-v1 + + com.google.cloud + google-cloud-automl-parent + 0.112.0-beta + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-automl-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + \ No newline at end of file diff --git a/grpc-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AutoMlGrpc.java b/grpc-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AutoMlGrpc.java new file mode 100644 index 000000000..d3882bc2c --- /dev/null +++ b/grpc-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AutoMlGrpc.java @@ -0,0 +1,2023 @@ +/* + * 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.automl.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * AutoML Server API.
+ * The resource names are assigned by the server.
+ * The server never reuses names that it has created after the resources with
+ * those names are deleted.
+ * An ID of a resource is the last element of the item's resource name. For
+ * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
+ * the id for the item is `{dataset_id}`.
+ * Currently the only supported `location_id` is "us-central1".
+ * On any input that is documented to expect a string parameter in
+ * snake_case or kebab-case, either of those cases is accepted.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/automl/v1/service.proto") +public final class AutoMlGrpc { + + private AutoMlGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.automl.v1.AutoMl"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateDatasetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateDatasetRequest, com.google.longrunning.Operation> + METHOD_CREATE_DATASET = getCreateDatasetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateDatasetRequest, com.google.longrunning.Operation> + getCreateDatasetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateDatasetRequest, com.google.longrunning.Operation> + getCreateDatasetMethod() { + return getCreateDatasetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateDatasetRequest, com.google.longrunning.Operation> + getCreateDatasetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateDatasetRequest, com.google.longrunning.Operation> + getCreateDatasetMethod; + if ((getCreateDatasetMethod = AutoMlGrpc.getCreateDatasetMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getCreateDatasetMethod = AutoMlGrpc.getCreateDatasetMethod) == null) { + AutoMlGrpc.getCreateDatasetMethod = + getCreateDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "CreateDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.CreateDatasetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("CreateDataset")) + .build(); + } + } + } + return getCreateDatasetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetDatasetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetDatasetRequest, com.google.cloud.automl.v1.Dataset> + METHOD_GET_DATASET = getGetDatasetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetDatasetRequest, com.google.cloud.automl.v1.Dataset> + getGetDatasetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetDatasetRequest, com.google.cloud.automl.v1.Dataset> + getGetDatasetMethod() { + return getGetDatasetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetDatasetRequest, com.google.cloud.automl.v1.Dataset> + getGetDatasetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetDatasetRequest, com.google.cloud.automl.v1.Dataset> + getGetDatasetMethod; + if ((getGetDatasetMethod = AutoMlGrpc.getGetDatasetMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getGetDatasetMethod = AutoMlGrpc.getGetDatasetMethod) == null) { + AutoMlGrpc.getGetDatasetMethod = + getGetDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "GetDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.GetDatasetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.Dataset.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("GetDataset")) + .build(); + } + } + } + return getGetDatasetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListDatasetsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListDatasetsRequest, + com.google.cloud.automl.v1.ListDatasetsResponse> + METHOD_LIST_DATASETS = getListDatasetsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListDatasetsRequest, + com.google.cloud.automl.v1.ListDatasetsResponse> + getListDatasetsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListDatasetsRequest, + com.google.cloud.automl.v1.ListDatasetsResponse> + getListDatasetsMethod() { + return getListDatasetsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListDatasetsRequest, + com.google.cloud.automl.v1.ListDatasetsResponse> + getListDatasetsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListDatasetsRequest, + com.google.cloud.automl.v1.ListDatasetsResponse> + getListDatasetsMethod; + if ((getListDatasetsMethod = AutoMlGrpc.getListDatasetsMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getListDatasetsMethod = AutoMlGrpc.getListDatasetsMethod) == null) { + AutoMlGrpc.getListDatasetsMethod = + getListDatasetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "ListDatasets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.ListDatasetsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.ListDatasetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ListDatasets")) + .build(); + } + } + } + return getListDatasetsMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getUpdateDatasetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateDatasetRequest, com.google.cloud.automl.v1.Dataset> + METHOD_UPDATE_DATASET = getUpdateDatasetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateDatasetRequest, com.google.cloud.automl.v1.Dataset> + getUpdateDatasetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateDatasetRequest, com.google.cloud.automl.v1.Dataset> + getUpdateDatasetMethod() { + return getUpdateDatasetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateDatasetRequest, com.google.cloud.automl.v1.Dataset> + getUpdateDatasetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateDatasetRequest, com.google.cloud.automl.v1.Dataset> + getUpdateDatasetMethod; + if ((getUpdateDatasetMethod = AutoMlGrpc.getUpdateDatasetMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getUpdateDatasetMethod = AutoMlGrpc.getUpdateDatasetMethod) == null) { + AutoMlGrpc.getUpdateDatasetMethod = + getUpdateDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "UpdateDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.UpdateDatasetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.Dataset.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("UpdateDataset")) + .build(); + } + } + } + return getUpdateDatasetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getDeleteDatasetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteDatasetRequest, com.google.longrunning.Operation> + METHOD_DELETE_DATASET = getDeleteDatasetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteDatasetRequest, com.google.longrunning.Operation> + getDeleteDatasetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteDatasetRequest, com.google.longrunning.Operation> + getDeleteDatasetMethod() { + return getDeleteDatasetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteDatasetRequest, com.google.longrunning.Operation> + getDeleteDatasetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteDatasetRequest, com.google.longrunning.Operation> + getDeleteDatasetMethod; + if ((getDeleteDatasetMethod = AutoMlGrpc.getDeleteDatasetMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getDeleteDatasetMethod = AutoMlGrpc.getDeleteDatasetMethod) == null) { + AutoMlGrpc.getDeleteDatasetMethod = + getDeleteDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "DeleteDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.DeleteDatasetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("DeleteDataset")) + .build(); + } + } + } + return getDeleteDatasetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getImportDataMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ImportDataRequest, com.google.longrunning.Operation> + METHOD_IMPORT_DATA = getImportDataMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethod() { + return getImportDataMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethod; + if ((getImportDataMethod = AutoMlGrpc.getImportDataMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getImportDataMethod = AutoMlGrpc.getImportDataMethod) == null) { + AutoMlGrpc.getImportDataMethod = + getImportDataMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "ImportData")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.ImportDataRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ImportData")) + .build(); + } + } + } + return getImportDataMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getExportDataMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ExportDataRequest, com.google.longrunning.Operation> + METHOD_EXPORT_DATA = getExportDataMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethod() { + return getExportDataMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethod; + if ((getExportDataMethod = AutoMlGrpc.getExportDataMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getExportDataMethod = AutoMlGrpc.getExportDataMethod) == null) { + AutoMlGrpc.getExportDataMethod = + getExportDataMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "ExportData")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.ExportDataRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ExportData")) + .build(); + } + } + } + return getExportDataMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateModelMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateModelRequest, com.google.longrunning.Operation> + METHOD_CREATE_MODEL = getCreateModelMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethod() { + return getCreateModelMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethod; + if ((getCreateModelMethod = AutoMlGrpc.getCreateModelMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getCreateModelMethod = AutoMlGrpc.getCreateModelMethod) == null) { + AutoMlGrpc.getCreateModelMethod = + getCreateModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "CreateModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.CreateModelRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("CreateModel")) + .build(); + } + } + } + return getCreateModelMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetModelMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelRequest, com.google.cloud.automl.v1.Model> + METHOD_GET_MODEL = getGetModelMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelRequest, com.google.cloud.automl.v1.Model> + getGetModelMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelRequest, com.google.cloud.automl.v1.Model> + getGetModelMethod() { + return getGetModelMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelRequest, com.google.cloud.automl.v1.Model> + getGetModelMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelRequest, com.google.cloud.automl.v1.Model> + getGetModelMethod; + if ((getGetModelMethod = AutoMlGrpc.getGetModelMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getGetModelMethod = AutoMlGrpc.getGetModelMethod) == null) { + AutoMlGrpc.getGetModelMethod = + getGetModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "GetModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.GetModelRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.Model.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("GetModel")) + .build(); + } + } + } + return getGetModelMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListModelsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelsRequest, + com.google.cloud.automl.v1.ListModelsResponse> + METHOD_LIST_MODELS = getListModelsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelsRequest, + com.google.cloud.automl.v1.ListModelsResponse> + getListModelsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelsRequest, + com.google.cloud.automl.v1.ListModelsResponse> + getListModelsMethod() { + return getListModelsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelsRequest, + com.google.cloud.automl.v1.ListModelsResponse> + getListModelsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelsRequest, + com.google.cloud.automl.v1.ListModelsResponse> + getListModelsMethod; + if ((getListModelsMethod = AutoMlGrpc.getListModelsMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getListModelsMethod = AutoMlGrpc.getListModelsMethod) == null) { + AutoMlGrpc.getListModelsMethod = + getListModelsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "ListModels")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.ListModelsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.ListModelsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ListModels")) + .build(); + } + } + } + return getListModelsMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getDeleteModelMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteModelRequest, com.google.longrunning.Operation> + METHOD_DELETE_MODEL = getDeleteModelMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteModelRequest, com.google.longrunning.Operation> + getDeleteModelMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteModelRequest, com.google.longrunning.Operation> + getDeleteModelMethod() { + return getDeleteModelMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteModelRequest, com.google.longrunning.Operation> + getDeleteModelMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.DeleteModelRequest, com.google.longrunning.Operation> + getDeleteModelMethod; + if ((getDeleteModelMethod = AutoMlGrpc.getDeleteModelMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getDeleteModelMethod = AutoMlGrpc.getDeleteModelMethod) == null) { + AutoMlGrpc.getDeleteModelMethod = + getDeleteModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "DeleteModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.DeleteModelRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("DeleteModel")) + .build(); + } + } + } + return getDeleteModelMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getUpdateModelMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateModelRequest, com.google.cloud.automl.v1.Model> + METHOD_UPDATE_MODEL = getUpdateModelMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateModelRequest, com.google.cloud.automl.v1.Model> + getUpdateModelMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateModelRequest, com.google.cloud.automl.v1.Model> + getUpdateModelMethod() { + return getUpdateModelMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateModelRequest, com.google.cloud.automl.v1.Model> + getUpdateModelMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.UpdateModelRequest, com.google.cloud.automl.v1.Model> + getUpdateModelMethod; + if ((getUpdateModelMethod = AutoMlGrpc.getUpdateModelMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getUpdateModelMethod = AutoMlGrpc.getUpdateModelMethod) == null) { + AutoMlGrpc.getUpdateModelMethod = + getUpdateModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName("google.cloud.automl.v1.AutoMl", "UpdateModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.UpdateModelRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.Model.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("UpdateModel")) + .build(); + } + } + } + return getUpdateModelMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetModelEvaluationMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelEvaluationRequest, + com.google.cloud.automl.v1.ModelEvaluation> + METHOD_GET_MODEL_EVALUATION = getGetModelEvaluationMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelEvaluationRequest, + com.google.cloud.automl.v1.ModelEvaluation> + getGetModelEvaluationMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelEvaluationRequest, + com.google.cloud.automl.v1.ModelEvaluation> + getGetModelEvaluationMethod() { + return getGetModelEvaluationMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelEvaluationRequest, + com.google.cloud.automl.v1.ModelEvaluation> + getGetModelEvaluationMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.GetModelEvaluationRequest, + com.google.cloud.automl.v1.ModelEvaluation> + getGetModelEvaluationMethod; + if ((getGetModelEvaluationMethod = AutoMlGrpc.getGetModelEvaluationMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getGetModelEvaluationMethod = AutoMlGrpc.getGetModelEvaluationMethod) == null) { + AutoMlGrpc.getGetModelEvaluationMethod = + getGetModelEvaluationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.automl.v1.AutoMl", "GetModelEvaluation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.GetModelEvaluationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.ModelEvaluation.getDefaultInstance())) + .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("GetModelEvaluation")) + .build(); + } + } + } + return getGetModelEvaluationMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListModelEvaluationsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelEvaluationsRequest, + com.google.cloud.automl.v1.ListModelEvaluationsResponse> + METHOD_LIST_MODEL_EVALUATIONS = getListModelEvaluationsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelEvaluationsRequest, + com.google.cloud.automl.v1.ListModelEvaluationsResponse> + getListModelEvaluationsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelEvaluationsRequest, + com.google.cloud.automl.v1.ListModelEvaluationsResponse> + getListModelEvaluationsMethod() { + return getListModelEvaluationsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelEvaluationsRequest, + com.google.cloud.automl.v1.ListModelEvaluationsResponse> + getListModelEvaluationsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.ListModelEvaluationsRequest, + com.google.cloud.automl.v1.ListModelEvaluationsResponse> + getListModelEvaluationsMethod; + if ((getListModelEvaluationsMethod = AutoMlGrpc.getListModelEvaluationsMethod) == null) { + synchronized (AutoMlGrpc.class) { + if ((getListModelEvaluationsMethod = AutoMlGrpc.getListModelEvaluationsMethod) == null) { + AutoMlGrpc.getListModelEvaluationsMethod = + getListModelEvaluationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.automl.v1.AutoMl", "ListModelEvaluations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.ListModelEvaluationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.ListModelEvaluationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AutoMlMethodDescriptorSupplier("ListModelEvaluations")) + .build(); + } + } + } + return getListModelEvaluationsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AutoMlStub newStub(io.grpc.Channel channel) { + return new AutoMlStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AutoMlBlockingStub newBlockingStub(io.grpc.Channel channel) { + return new AutoMlBlockingStub(channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AutoMlFutureStub newFutureStub(io.grpc.Channel channel) { + return new AutoMlFutureStub(channel); + } + + /** + * + * + *
+   * AutoML Server API.
+   * The resource names are assigned by the server.
+   * The server never reuses names that it has created after the resources with
+   * those names are deleted.
+   * An ID of a resource is the last element of the item's resource name. For
+   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
+   * the id for the item is `{dataset_id}`.
+   * Currently the only supported `location_id` is "us-central1".
+   * On any input that is documented to expect a string parameter in
+   * snake_case or kebab-case, either of those cases is accepted.
+   * 
+ */ + public abstract static class AutoMlImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a dataset.
+     * 
+ */ + public void createDataset( + com.google.cloud.automl.v1.CreateDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateDatasetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets a dataset.
+     * 
+ */ + public void getDataset( + com.google.cloud.automl.v1.GetDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetDatasetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists datasets in a project.
+     * 
+ */ + public void listDatasets( + com.google.cloud.automl.v1.ListDatasetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListDatasetsMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Updates a dataset.
+     * 
+ */ + public void updateDataset( + com.google.cloud.automl.v1.UpdateDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateDatasetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Deletes a dataset and all of its contents.
+     * Returns empty response in the
+     * [response][google.longrunning.Operation.response] field when it completes,
+     * and `delete_details` in the
+     * [metadata][google.longrunning.Operation.metadata] field.
+     * 
+ */ + public void deleteDataset( + com.google.cloud.automl.v1.DeleteDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteDatasetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Imports data into a dataset.
+     * 
+ */ + public void importData( + com.google.cloud.automl.v1.ImportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getImportDataMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Exports dataset's data to the provided output location.
+     * Returns an empty response in the
+     * [response][google.longrunning.Operation.response] field when it completes.
+     * 
+ */ + public void exportData( + com.google.cloud.automl.v1.ExportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExportDataMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Creates a model.
+     * Returns a Model in the [response][google.longrunning.Operation.response]
+     * field when it completes.
+     * When you create a model, several model evaluations are created for it:
+     * a global evaluation, and one evaluation for each annotation spec.
+     * 
+ */ + public void createModel( + com.google.cloud.automl.v1.CreateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateModelMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets a model.
+     * 
+ */ + public void getModel( + com.google.cloud.automl.v1.GetModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetModelMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists models.
+     * 
+ */ + public void listModels( + com.google.cloud.automl.v1.ListModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListModelsMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Deletes a model.
+     * Returns `google.protobuf.Empty` in the
+     * [response][google.longrunning.Operation.response] field when it completes,
+     * and `delete_details` in the
+     * [metadata][google.longrunning.Operation.metadata] field.
+     * 
+ */ + public void deleteModel( + com.google.cloud.automl.v1.DeleteModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteModelMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Updates a model.
+     * 
+ */ + public void updateModel( + com.google.cloud.automl.v1.UpdateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateModelMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets a model evaluation.
+     * 
+ */ + public void getModelEvaluation( + com.google.cloud.automl.v1.GetModelEvaluationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetModelEvaluationMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists model evaluations.
+     * 
+ */ + public void listModelEvaluations( + com.google.cloud.automl.v1.ListModelEvaluationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListModelEvaluationsMethodHelper(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateDatasetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.CreateDatasetRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_DATASET))) + .addMethod( + getGetDatasetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.GetDatasetRequest, + com.google.cloud.automl.v1.Dataset>(this, METHODID_GET_DATASET))) + .addMethod( + getListDatasetsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.ListDatasetsRequest, + com.google.cloud.automl.v1.ListDatasetsResponse>( + this, METHODID_LIST_DATASETS))) + .addMethod( + getUpdateDatasetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.UpdateDatasetRequest, + com.google.cloud.automl.v1.Dataset>(this, METHODID_UPDATE_DATASET))) + .addMethod( + getDeleteDatasetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.DeleteDatasetRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_DATASET))) + .addMethod( + getImportDataMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.ImportDataRequest, + com.google.longrunning.Operation>(this, METHODID_IMPORT_DATA))) + .addMethod( + getExportDataMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.ExportDataRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_DATA))) + .addMethod( + getCreateModelMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.CreateModelRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_MODEL))) + .addMethod( + getGetModelMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.GetModelRequest, com.google.cloud.automl.v1.Model>( + this, METHODID_GET_MODEL))) + .addMethod( + getListModelsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.ListModelsRequest, + com.google.cloud.automl.v1.ListModelsResponse>(this, METHODID_LIST_MODELS))) + .addMethod( + getDeleteModelMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.DeleteModelRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_MODEL))) + .addMethod( + getUpdateModelMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.UpdateModelRequest, + com.google.cloud.automl.v1.Model>(this, METHODID_UPDATE_MODEL))) + .addMethod( + getGetModelEvaluationMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.GetModelEvaluationRequest, + com.google.cloud.automl.v1.ModelEvaluation>( + this, METHODID_GET_MODEL_EVALUATION))) + .addMethod( + getListModelEvaluationsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.ListModelEvaluationsRequest, + com.google.cloud.automl.v1.ListModelEvaluationsResponse>( + this, METHODID_LIST_MODEL_EVALUATIONS))) + .build(); + } + } + + /** + * + * + *
+   * AutoML Server API.
+   * The resource names are assigned by the server.
+   * The server never reuses names that it has created after the resources with
+   * those names are deleted.
+   * An ID of a resource is the last element of the item's resource name. For
+   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
+   * the id for the item is `{dataset_id}`.
+   * Currently the only supported `location_id` is "us-central1".
+   * On any input that is documented to expect a string parameter in
+   * snake_case or kebab-case, either of those cases is accepted.
+   * 
+ */ + public static final class AutoMlStub extends io.grpc.stub.AbstractStub { + private AutoMlStub(io.grpc.Channel channel) { + super(channel); + } + + private AutoMlStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AutoMlStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AutoMlStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a dataset.
+     * 
+ */ + public void createDataset( + com.google.cloud.automl.v1.CreateDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateDatasetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a dataset.
+     * 
+ */ + public void getDataset( + com.google.cloud.automl.v1.GetDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetDatasetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists datasets in a project.
+     * 
+ */ + public void listDatasets( + com.google.cloud.automl.v1.ListDatasetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListDatasetsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a dataset.
+     * 
+ */ + public void updateDataset( + com.google.cloud.automl.v1.UpdateDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateDatasetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a dataset and all of its contents.
+     * Returns empty response in the
+     * [response][google.longrunning.Operation.response] field when it completes,
+     * and `delete_details` in the
+     * [metadata][google.longrunning.Operation.metadata] field.
+     * 
+ */ + public void deleteDataset( + com.google.cloud.automl.v1.DeleteDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteDatasetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports data into a dataset.
+     * 
+ */ + public void importData( + com.google.cloud.automl.v1.ImportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getImportDataMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports dataset's data to the provided output location.
+     * Returns an empty response in the
+     * [response][google.longrunning.Operation.response] field when it completes.
+     * 
+ */ + public void exportData( + com.google.cloud.automl.v1.ExportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExportDataMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a model.
+     * Returns a Model in the [response][google.longrunning.Operation.response]
+     * field when it completes.
+     * When you create a model, several model evaluations are created for it:
+     * a global evaluation, and one evaluation for each annotation spec.
+     * 
+ */ + public void createModel( + com.google.cloud.automl.v1.CreateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateModelMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a model.
+     * 
+ */ + public void getModel( + com.google.cloud.automl.v1.GetModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetModelMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists models.
+     * 
+ */ + public void listModels( + com.google.cloud.automl.v1.ListModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListModelsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a model.
+     * Returns `google.protobuf.Empty` in the
+     * [response][google.longrunning.Operation.response] field when it completes,
+     * and `delete_details` in the
+     * [metadata][google.longrunning.Operation.metadata] field.
+     * 
+ */ + public void deleteModel( + com.google.cloud.automl.v1.DeleteModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteModelMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a model.
+     * 
+ */ + public void updateModel( + com.google.cloud.automl.v1.UpdateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateModelMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a model evaluation.
+     * 
+ */ + public void getModelEvaluation( + com.google.cloud.automl.v1.GetModelEvaluationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetModelEvaluationMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists model evaluations.
+     * 
+ */ + public void listModelEvaluations( + com.google.cloud.automl.v1.ListModelEvaluationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListModelEvaluationsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * AutoML Server API.
+   * The resource names are assigned by the server.
+   * The server never reuses names that it has created after the resources with
+   * those names are deleted.
+   * An ID of a resource is the last element of the item's resource name. For
+   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
+   * the id for the item is `{dataset_id}`.
+   * Currently the only supported `location_id` is "us-central1".
+   * On any input that is documented to expect a string parameter in
+   * snake_case or kebab-case, either of those cases is accepted.
+   * 
+ */ + public static final class AutoMlBlockingStub + extends io.grpc.stub.AbstractStub { + private AutoMlBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private AutoMlBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AutoMlBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AutoMlBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a dataset.
+     * 
+ */ + public com.google.longrunning.Operation createDataset( + com.google.cloud.automl.v1.CreateDatasetRequest request) { + return blockingUnaryCall( + getChannel(), getCreateDatasetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a dataset.
+     * 
+ */ + public com.google.cloud.automl.v1.Dataset getDataset( + com.google.cloud.automl.v1.GetDatasetRequest request) { + return blockingUnaryCall( + getChannel(), getGetDatasetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists datasets in a project.
+     * 
+ */ + public com.google.cloud.automl.v1.ListDatasetsResponse listDatasets( + com.google.cloud.automl.v1.ListDatasetsRequest request) { + return blockingUnaryCall( + getChannel(), getListDatasetsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a dataset.
+     * 
+ */ + public com.google.cloud.automl.v1.Dataset updateDataset( + com.google.cloud.automl.v1.UpdateDatasetRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateDatasetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a dataset and all of its contents.
+     * Returns empty response in the
+     * [response][google.longrunning.Operation.response] field when it completes,
+     * and `delete_details` in the
+     * [metadata][google.longrunning.Operation.metadata] field.
+     * 
+ */ + public com.google.longrunning.Operation deleteDataset( + com.google.cloud.automl.v1.DeleteDatasetRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteDatasetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports data into a dataset.
+     * 
+ */ + public com.google.longrunning.Operation importData( + com.google.cloud.automl.v1.ImportDataRequest request) { + return blockingUnaryCall( + getChannel(), getImportDataMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports dataset's data to the provided output location.
+     * Returns an empty response in the
+     * [response][google.longrunning.Operation.response] field when it completes.
+     * 
+ */ + public com.google.longrunning.Operation exportData( + com.google.cloud.automl.v1.ExportDataRequest request) { + return blockingUnaryCall( + getChannel(), getExportDataMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a model.
+     * Returns a Model in the [response][google.longrunning.Operation.response]
+     * field when it completes.
+     * When you create a model, several model evaluations are created for it:
+     * a global evaluation, and one evaluation for each annotation spec.
+     * 
+ */ + public com.google.longrunning.Operation createModel( + com.google.cloud.automl.v1.CreateModelRequest request) { + return blockingUnaryCall( + getChannel(), getCreateModelMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a model.
+     * 
+ */ + public com.google.cloud.automl.v1.Model getModel( + com.google.cloud.automl.v1.GetModelRequest request) { + return blockingUnaryCall(getChannel(), getGetModelMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists models.
+     * 
+ */ + public com.google.cloud.automl.v1.ListModelsResponse listModels( + com.google.cloud.automl.v1.ListModelsRequest request) { + return blockingUnaryCall( + getChannel(), getListModelsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a model.
+     * Returns `google.protobuf.Empty` in the
+     * [response][google.longrunning.Operation.response] field when it completes,
+     * and `delete_details` in the
+     * [metadata][google.longrunning.Operation.metadata] field.
+     * 
+ */ + public com.google.longrunning.Operation deleteModel( + com.google.cloud.automl.v1.DeleteModelRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteModelMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a model.
+     * 
+ */ + public com.google.cloud.automl.v1.Model updateModel( + com.google.cloud.automl.v1.UpdateModelRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateModelMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a model evaluation.
+     * 
+ */ + public com.google.cloud.automl.v1.ModelEvaluation getModelEvaluation( + com.google.cloud.automl.v1.GetModelEvaluationRequest request) { + return blockingUnaryCall( + getChannel(), getGetModelEvaluationMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists model evaluations.
+     * 
+ */ + public com.google.cloud.automl.v1.ListModelEvaluationsResponse listModelEvaluations( + com.google.cloud.automl.v1.ListModelEvaluationsRequest request) { + return blockingUnaryCall( + getChannel(), getListModelEvaluationsMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * AutoML Server API.
+   * The resource names are assigned by the server.
+   * The server never reuses names that it has created after the resources with
+   * those names are deleted.
+   * An ID of a resource is the last element of the item's resource name. For
+   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
+   * the id for the item is `{dataset_id}`.
+   * Currently the only supported `location_id` is "us-central1".
+   * On any input that is documented to expect a string parameter in
+   * snake_case or kebab-case, either of those cases is accepted.
+   * 
+ */ + public static final class AutoMlFutureStub extends io.grpc.stub.AbstractStub { + private AutoMlFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private AutoMlFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AutoMlFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AutoMlFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDataset(com.google.cloud.automl.v1.CreateDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateDatasetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getDataset(com.google.cloud.automl.v1.GetDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetDatasetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists datasets in a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.automl.v1.ListDatasetsResponse> + listDatasets(com.google.cloud.automl.v1.ListDatasetsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListDatasetsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDataset(com.google.cloud.automl.v1.UpdateDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateDatasetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a dataset and all of its contents.
+     * Returns empty response in the
+     * [response][google.longrunning.Operation.response] field when it completes,
+     * and `delete_details` in the
+     * [metadata][google.longrunning.Operation.metadata] field.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataset(com.google.cloud.automl.v1.DeleteDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteDatasetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports data into a dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importData(com.google.cloud.automl.v1.ImportDataRequest request) { + return futureUnaryCall( + getChannel().newCall(getImportDataMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports dataset's data to the provided output location.
+     * Returns an empty response in the
+     * [response][google.longrunning.Operation.response] field when it completes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportData(com.google.cloud.automl.v1.ExportDataRequest request) { + return futureUnaryCall( + getChannel().newCall(getExportDataMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a model.
+     * Returns a Model in the [response][google.longrunning.Operation.response]
+     * field when it completes.
+     * When you create a model, several model evaluations are created for it:
+     * a global evaluation, and one evaluation for each annotation spec.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createModel(com.google.cloud.automl.v1.CreateModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateModelMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getModel(com.google.cloud.automl.v1.GetModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetModelMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists models.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.automl.v1.ListModelsResponse> + listModels(com.google.cloud.automl.v1.ListModelsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListModelsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a model.
+     * Returns `google.protobuf.Empty` in the
+     * [response][google.longrunning.Operation.response] field when it completes,
+     * and `delete_details` in the
+     * [metadata][google.longrunning.Operation.metadata] field.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteModel(com.google.cloud.automl.v1.DeleteModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteModelMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateModel(com.google.cloud.automl.v1.UpdateModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateModelMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a model evaluation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.automl.v1.ModelEvaluation> + getModelEvaluation(com.google.cloud.automl.v1.GetModelEvaluationRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetModelEvaluationMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists model evaluations.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.automl.v1.ListModelEvaluationsResponse> + listModelEvaluations(com.google.cloud.automl.v1.ListModelEvaluationsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListModelEvaluationsMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_DATASET = 0; + private static final int METHODID_GET_DATASET = 1; + private static final int METHODID_LIST_DATASETS = 2; + private static final int METHODID_UPDATE_DATASET = 3; + private static final int METHODID_DELETE_DATASET = 4; + private static final int METHODID_IMPORT_DATA = 5; + private static final int METHODID_EXPORT_DATA = 6; + private static final int METHODID_CREATE_MODEL = 7; + private static final int METHODID_GET_MODEL = 8; + private static final int METHODID_LIST_MODELS = 9; + private static final int METHODID_DELETE_MODEL = 10; + private static final int METHODID_UPDATE_MODEL = 11; + private static final int METHODID_GET_MODEL_EVALUATION = 12; + private static final int METHODID_LIST_MODEL_EVALUATIONS = 13; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AutoMlImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AutoMlImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_DATASET: + serviceImpl.createDataset( + (com.google.cloud.automl.v1.CreateDatasetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DATASET: + serviceImpl.getDataset( + (com.google.cloud.automl.v1.GetDatasetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DATASETS: + serviceImpl.listDatasets( + (com.google.cloud.automl.v1.ListDatasetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_DATASET: + serviceImpl.updateDataset( + (com.google.cloud.automl.v1.UpdateDatasetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DATASET: + serviceImpl.deleteDataset( + (com.google.cloud.automl.v1.DeleteDatasetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_DATA: + serviceImpl.importData( + (com.google.cloud.automl.v1.ImportDataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_DATA: + serviceImpl.exportData( + (com.google.cloud.automl.v1.ExportDataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_MODEL: + serviceImpl.createModel( + (com.google.cloud.automl.v1.CreateModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_MODEL: + serviceImpl.getModel( + (com.google.cloud.automl.v1.GetModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_MODELS: + serviceImpl.listModels( + (com.google.cloud.automl.v1.ListModelsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_MODEL: + serviceImpl.deleteModel( + (com.google.cloud.automl.v1.DeleteModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_MODEL: + serviceImpl.updateModel( + (com.google.cloud.automl.v1.UpdateModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_MODEL_EVALUATION: + serviceImpl.getModelEvaluation( + (com.google.cloud.automl.v1.GetModelEvaluationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_MODEL_EVALUATIONS: + serviceImpl.listModelEvaluations( + (com.google.cloud.automl.v1.ListModelEvaluationsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class AutoMlBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AutoMlBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AutoMl"); + } + } + + private static final class AutoMlFileDescriptorSupplier extends AutoMlBaseDescriptorSupplier { + AutoMlFileDescriptorSupplier() {} + } + + private static final class AutoMlMethodDescriptorSupplier extends AutoMlBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + AutoMlMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AutoMlGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AutoMlFileDescriptorSupplier()) + .addMethod(getCreateDatasetMethodHelper()) + .addMethod(getGetDatasetMethodHelper()) + .addMethod(getListDatasetsMethodHelper()) + .addMethod(getUpdateDatasetMethodHelper()) + .addMethod(getDeleteDatasetMethodHelper()) + .addMethod(getImportDataMethodHelper()) + .addMethod(getExportDataMethodHelper()) + .addMethod(getCreateModelMethodHelper()) + .addMethod(getGetModelMethodHelper()) + .addMethod(getListModelsMethodHelper()) + .addMethod(getDeleteModelMethodHelper()) + .addMethod(getUpdateModelMethodHelper()) + .addMethod(getGetModelEvaluationMethodHelper()) + .addMethod(getListModelEvaluationsMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictionServiceGrpc.java b/grpc-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictionServiceGrpc.java new file mode 100644 index 000000000..f3eea9507 --- /dev/null +++ b/grpc-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictionServiceGrpc.java @@ -0,0 +1,382 @@ +/* + * 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.automl.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * AutoML Prediction API.
+ * On any input that is documented to expect a string parameter in
+ * snake_case or kebab-case, either of those cases is accepted.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/automl/v1/prediction_service.proto") +public final class PredictionServiceGrpc { + + private PredictionServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.automl.v1.PredictionService"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getPredictMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.PredictRequest, com.google.cloud.automl.v1.PredictResponse> + METHOD_PREDICT = getPredictMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.PredictRequest, com.google.cloud.automl.v1.PredictResponse> + getPredictMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.PredictRequest, com.google.cloud.automl.v1.PredictResponse> + getPredictMethod() { + return getPredictMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.PredictRequest, com.google.cloud.automl.v1.PredictResponse> + getPredictMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.automl.v1.PredictRequest, com.google.cloud.automl.v1.PredictResponse> + getPredictMethod; + if ((getPredictMethod = PredictionServiceGrpc.getPredictMethod) == null) { + synchronized (PredictionServiceGrpc.class) { + if ((getPredictMethod = PredictionServiceGrpc.getPredictMethod) == null) { + PredictionServiceGrpc.getPredictMethod = + getPredictMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.automl.v1.PredictionService", "Predict")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.PredictRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.automl.v1.PredictResponse.getDefaultInstance())) + .setSchemaDescriptor(new PredictionServiceMethodDescriptorSupplier("Predict")) + .build(); + } + } + } + return getPredictMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PredictionServiceStub newStub(io.grpc.Channel channel) { + return new PredictionServiceStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PredictionServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + return new PredictionServiceBlockingStub(channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PredictionServiceFutureStub newFutureStub(io.grpc.Channel channel) { + return new PredictionServiceFutureStub(channel); + } + + /** + * + * + *
+   * AutoML Prediction API.
+   * On any input that is documented to expect a string parameter in
+   * snake_case or kebab-case, either of those cases is accepted.
+   * 
+ */ + public abstract static class PredictionServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Perform an online prediction. The prediction result will be directly
+     * returned in the response.
+     * Available for following ML problems, and their expected request payloads:
+     * * Translation - TextSnippet, content up to 25,000 characters, UTF-8
+     *                 encoded.
+     * 
+ */ + public void predict( + com.google.cloud.automl.v1.PredictRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPredictMethodHelper(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getPredictMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.automl.v1.PredictRequest, + com.google.cloud.automl.v1.PredictResponse>(this, METHODID_PREDICT))) + .build(); + } + } + + /** + * + * + *
+   * AutoML Prediction API.
+   * On any input that is documented to expect a string parameter in
+   * snake_case or kebab-case, either of those cases is accepted.
+   * 
+ */ + public static final class PredictionServiceStub + extends io.grpc.stub.AbstractStub { + private PredictionServiceStub(io.grpc.Channel channel) { + super(channel); + } + + private PredictionServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PredictionServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PredictionServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Perform an online prediction. The prediction result will be directly
+     * returned in the response.
+     * Available for following ML problems, and their expected request payloads:
+     * * Translation - TextSnippet, content up to 25,000 characters, UTF-8
+     *                 encoded.
+     * 
+ */ + public void predict( + com.google.cloud.automl.v1.PredictRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getPredictMethodHelper(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * AutoML Prediction API.
+   * On any input that is documented to expect a string parameter in
+   * snake_case or kebab-case, either of those cases is accepted.
+   * 
+ */ + public static final class PredictionServiceBlockingStub + extends io.grpc.stub.AbstractStub { + private PredictionServiceBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private PredictionServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PredictionServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PredictionServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Perform an online prediction. The prediction result will be directly
+     * returned in the response.
+     * Available for following ML problems, and their expected request payloads:
+     * * Translation - TextSnippet, content up to 25,000 characters, UTF-8
+     *                 encoded.
+     * 
+ */ + public com.google.cloud.automl.v1.PredictResponse predict( + com.google.cloud.automl.v1.PredictRequest request) { + return blockingUnaryCall(getChannel(), getPredictMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * AutoML Prediction API.
+   * On any input that is documented to expect a string parameter in
+   * snake_case or kebab-case, either of those cases is accepted.
+   * 
+ */ + public static final class PredictionServiceFutureStub + extends io.grpc.stub.AbstractStub { + private PredictionServiceFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private PredictionServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PredictionServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PredictionServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Perform an online prediction. The prediction result will be directly
+     * returned in the response.
+     * Available for following ML problems, and their expected request payloads:
+     * * Translation - TextSnippet, content up to 25,000 characters, UTF-8
+     *                 encoded.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.automl.v1.PredictResponse> + predict(com.google.cloud.automl.v1.PredictRequest request) { + return futureUnaryCall( + getChannel().newCall(getPredictMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_PREDICT = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final PredictionServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(PredictionServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_PREDICT: + serviceImpl.predict( + (com.google.cloud.automl.v1.PredictRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class PredictionServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PredictionServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.automl.v1.PredictionServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PredictionService"); + } + } + + private static final class PredictionServiceFileDescriptorSupplier + extends PredictionServiceBaseDescriptorSupplier { + PredictionServiceFileDescriptorSupplier() {} + } + + private static final class PredictionServiceMethodDescriptorSupplier + extends PredictionServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + PredictionServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PredictionServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PredictionServiceFileDescriptorSupplier()) + .addMethod(getPredictMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-automl-v1beta1/pom.xml b/grpc-google-cloud-automl-v1beta1/pom.xml index a7858e945..0b2440108 100644 --- a/grpc-google-cloud-automl-v1beta1/pom.xml +++ b/grpc-google-cloud-automl-v1beta1/pom.xml @@ -2,51 +2,59 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + com.google.api.grpc grpc-google-cloud-automl-v1beta1 - 0.76.0 + 0.77.0 grpc-google-cloud-automl-v1beta1 GRPC library for grpc-google-cloud-automl-v1beta1 - com.google.api.grpc - google-api-grpc - 0.76.0 + com.google.cloud + google-cloud-automl-parent + 0.112.0-beta + + io.grpc + grpc-api + io.grpc grpc-stub - compile io.grpc grpc-protobuf - compile + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos com.google.api.grpc proto-google-cloud-automl-v1beta1 - compile + + + com.google.guava + guava - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - protected - true - none - true - - - ${project.javadoc.protobufBaseURL} - ../../../../proto-google-cloud-automl-v1beta1/target/site/apidocs/ - - - - - - - + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + \ No newline at end of file diff --git a/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlGrpc.java b/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlGrpc.java index c6230758f..87ef51b99 100644 --- a/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlGrpc.java +++ b/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlGrpc.java @@ -1,3 +1,18 @@ +/* + * 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.automl.v1beta1; import static io.grpc.MethodDescriptor.generateFullMethodName; diff --git a/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceGrpc.java b/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceGrpc.java index 671266d61..15c6389ec 100644 --- a/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceGrpc.java +++ b/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceGrpc.java @@ -1,3 +1,18 @@ +/* + * 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.automl.v1beta1; import static io.grpc.MethodDescriptor.generateFullMethodName; diff --git a/java.header b/java.header new file mode 100644 index 000000000..3a9b503aa --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ +^ \*$ +^ \* 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\.$ +^ \*/$ diff --git a/license-checks.xml b/license-checks.xml new file mode 100644 index 000000000..6597fced8 --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..ba7dcba02 --- /dev/null +++ b/pom.xml @@ -0,0 +1,267 @@ + + + 4.0.0 + com.google.cloud + google-cloud-automl-parent + pom + 0.112.0-beta + Google Cloud AutoML Parent + https://github.com/googleapis/java-automl + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.1.3 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-automl.git + scm:git:git@github.com:googleapis/java-automl.git + https://github.com/googleapis/java-automl + HEAD + + + https://github.com/googleapis/java-automl/issues + GitHub Issues + + + + sonatype-nexus-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-automl-parent + 1.91.1 + 1.8.1 + 1.16.0 + 1.49.0 + 1.24.0 + 3.10.0 + 4.12 + 28.1-android + 1.4.0 + 1.3.2 + 1.18 + + + + + + com.google.api.grpc + proto-google-cloud-automl-v1beta1 + 0.77.0 + + + com.google.api.grpc + proto-google-cloud-automl-v1 + 0.77.0 + + + com.google.api.grpc + grpc-google-cloud-automl-v1beta1 + 0.77.0 + + + com.google.api.grpc + grpc-google-cloud-automl-v1 + 0.77.0 + + + com.google.cloud + google-cloud-automl + 0.112.0-beta + + + + io.grpc + grpc-bom + ${grpc.version} + pom + import + + + com.google.api + gax-bom + ${gax.version} + pom + import + + + com.google.guava + guava-bom + ${guava.version} + pom + import + + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + + com.google.api + api-common + ${google.api-common.version} + + + com.google.api.grpc + proto-google-common-protos + ${google.common-protos.version} + + + org.threeten + threetenbp + ${threeten.version} + + + javax.annotation + javax.annotation-api + ${javax.annotations.version} + + + org.codehaus.mojo + animal-sniffer-annotations + ${animal-sniffer.version} + + + + junit + junit + ${junit.version} + test + + + com.google.api + gax-grpc + ${gax.version} + testlib + test + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + org.objenesis:objenesis + + + + + + + + proto-google-cloud-automl-v1beta1 + proto-google-cloud-automl-v1 + grpc-google-cloud-automl-v1beta1 + grpc-google-cloud-automl-v1 + google-cloud-automl + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.0.0 + + + + index + dependency-info + team + ci-management + issue-management + licenses + scm + dependency-management + distribution-management + summary + modules + + + + + true + ${site.installationModule} + jar + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + \ No newline at end of file diff --git a/proto-google-cloud-automl-v1/pom.xml b/proto-google-cloud-automl-v1/pom.xml new file mode 100644 index 000000000..66a310251 --- /dev/null +++ b/proto-google-cloud-automl-v1/pom.xml @@ -0,0 +1,33 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-automl-v1 + 0.77.0 + proto-google-cloud-automl-v1 + PROTO library for proto-google-cloud-automl-v1 + + com.google.cloud + google-cloud-automl-parent + 0.112.0-beta + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api + api-common + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayload.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayload.java new file mode 100644 index 000000000..68669a251 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayload.java @@ -0,0 +1,808 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/annotation_payload.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Contains annotation information that is relevant to AutoML.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.AnnotationPayload} + */ +public final class AnnotationPayload extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.AnnotationPayload) + AnnotationPayloadOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationPayload.newBuilder() to construct. + private AnnotationPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationPayload() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotationPayload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.automl.v1.TranslationAnnotation.Builder subBuilder = null; + if (detailCase_ == 2) { + subBuilder = + ((com.google.cloud.automl.v1.TranslationAnnotation) detail_).toBuilder(); + } + detail_ = + input.readMessage( + com.google.cloud.automl.v1.TranslationAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.automl.v1.TranslationAnnotation) detail_); + detail_ = subBuilder.buildPartial(); + } + detailCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AnnotationPayloadOuterClass + .internal_static_google_cloud_automl_v1_AnnotationPayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AnnotationPayloadOuterClass + .internal_static_google_cloud_automl_v1_AnnotationPayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.AnnotationPayload.class, + com.google.cloud.automl.v1.AnnotationPayload.Builder.class); + } + + private int detailCase_ = 0; + private java.lang.Object detail_; + + public enum DetailCase implements com.google.protobuf.Internal.EnumLite { + TRANSLATION(2), + DETAIL_NOT_SET(0); + private final int value; + + private DetailCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static DetailCase valueOf(int value) { + return forNumber(value); + } + + public static DetailCase forNumber(int value) { + switch (value) { + case 2: + return TRANSLATION; + case 0: + return DETAIL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DetailCase getDetailCase() { + return DetailCase.forNumber(detailCase_); + } + + public static final int TRANSLATION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Annotation details for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public boolean hasTranslation() { + return detailCase_ == 2; + } + /** + * + * + *
+   * Annotation details for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public com.google.cloud.automl.v1.TranslationAnnotation getTranslation() { + if (detailCase_ == 2) { + return (com.google.cloud.automl.v1.TranslationAnnotation) detail_; + } + return com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation details for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public com.google.cloud.automl.v1.TranslationAnnotationOrBuilder getTranslationOrBuilder() { + if (detailCase_ == 2) { + return (com.google.cloud.automl.v1.TranslationAnnotation) detail_; + } + return com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (detailCase_ == 2) { + output.writeMessage(2, (com.google.cloud.automl.v1.TranslationAnnotation) detail_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (detailCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.automl.v1.TranslationAnnotation) detail_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.AnnotationPayload)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.AnnotationPayload other = + (com.google.cloud.automl.v1.AnnotationPayload) obj; + + if (!getDetailCase().equals(other.getDetailCase())) return false; + switch (detailCase_) { + case 2: + if (!getTranslation().equals(other.getTranslation())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (detailCase_) { + case 2: + hash = (37 * hash) + TRANSLATION_FIELD_NUMBER; + hash = (53 * hash) + getTranslation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.AnnotationPayload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.AnnotationPayload prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contains annotation information that is relevant to AutoML.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.AnnotationPayload} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.AnnotationPayload) + com.google.cloud.automl.v1.AnnotationPayloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AnnotationPayloadOuterClass + .internal_static_google_cloud_automl_v1_AnnotationPayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AnnotationPayloadOuterClass + .internal_static_google_cloud_automl_v1_AnnotationPayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.AnnotationPayload.class, + com.google.cloud.automl.v1.AnnotationPayload.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.AnnotationPayload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + detailCase_ = 0; + detail_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AnnotationPayloadOuterClass + .internal_static_google_cloud_automl_v1_AnnotationPayload_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.AnnotationPayload getDefaultInstanceForType() { + return com.google.cloud.automl.v1.AnnotationPayload.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.AnnotationPayload build() { + com.google.cloud.automl.v1.AnnotationPayload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.AnnotationPayload buildPartial() { + com.google.cloud.automl.v1.AnnotationPayload result = + new com.google.cloud.automl.v1.AnnotationPayload(this); + if (detailCase_ == 2) { + if (translationBuilder_ == null) { + result.detail_ = detail_; + } else { + result.detail_ = translationBuilder_.build(); + } + } + result.detailCase_ = detailCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.AnnotationPayload) { + return mergeFrom((com.google.cloud.automl.v1.AnnotationPayload) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.AnnotationPayload other) { + if (other == com.google.cloud.automl.v1.AnnotationPayload.getDefaultInstance()) return this; + switch (other.getDetailCase()) { + case TRANSLATION: + { + mergeTranslation(other.getTranslation()); + break; + } + case DETAIL_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.AnnotationPayload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.AnnotationPayload) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int detailCase_ = 0; + private java.lang.Object detail_; + + public DetailCase getDetailCase() { + return DetailCase.forNumber(detailCase_); + } + + public Builder clearDetail() { + detailCase_ = 0; + detail_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationAnnotation, + com.google.cloud.automl.v1.TranslationAnnotation.Builder, + com.google.cloud.automl.v1.TranslationAnnotationOrBuilder> + translationBuilder_; + /** + * + * + *
+     * Annotation details for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public boolean hasTranslation() { + return detailCase_ == 2; + } + /** + * + * + *
+     * Annotation details for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public com.google.cloud.automl.v1.TranslationAnnotation getTranslation() { + if (translationBuilder_ == null) { + if (detailCase_ == 2) { + return (com.google.cloud.automl.v1.TranslationAnnotation) detail_; + } + return com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance(); + } else { + if (detailCase_ == 2) { + return translationBuilder_.getMessage(); + } + return com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation details for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public Builder setTranslation(com.google.cloud.automl.v1.TranslationAnnotation value) { + if (translationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detail_ = value; + onChanged(); + } else { + translationBuilder_.setMessage(value); + } + detailCase_ = 2; + return this; + } + /** + * + * + *
+     * Annotation details for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public Builder setTranslation( + com.google.cloud.automl.v1.TranslationAnnotation.Builder builderForValue) { + if (translationBuilder_ == null) { + detail_ = builderForValue.build(); + onChanged(); + } else { + translationBuilder_.setMessage(builderForValue.build()); + } + detailCase_ = 2; + return this; + } + /** + * + * + *
+     * Annotation details for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public Builder mergeTranslation(com.google.cloud.automl.v1.TranslationAnnotation value) { + if (translationBuilder_ == null) { + if (detailCase_ == 2 + && detail_ != com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance()) { + detail_ = + com.google.cloud.automl.v1.TranslationAnnotation.newBuilder( + (com.google.cloud.automl.v1.TranslationAnnotation) detail_) + .mergeFrom(value) + .buildPartial(); + } else { + detail_ = value; + } + onChanged(); + } else { + if (detailCase_ == 2) { + translationBuilder_.mergeFrom(value); + } + translationBuilder_.setMessage(value); + } + detailCase_ = 2; + return this; + } + /** + * + * + *
+     * Annotation details for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public Builder clearTranslation() { + if (translationBuilder_ == null) { + if (detailCase_ == 2) { + detailCase_ = 0; + detail_ = null; + onChanged(); + } + } else { + if (detailCase_ == 2) { + detailCase_ = 0; + detail_ = null; + } + translationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation details for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public com.google.cloud.automl.v1.TranslationAnnotation.Builder getTranslationBuilder() { + return getTranslationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation details for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + public com.google.cloud.automl.v1.TranslationAnnotationOrBuilder getTranslationOrBuilder() { + if ((detailCase_ == 2) && (translationBuilder_ != null)) { + return translationBuilder_.getMessageOrBuilder(); + } else { + if (detailCase_ == 2) { + return (com.google.cloud.automl.v1.TranslationAnnotation) detail_; + } + return com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation details for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationAnnotation, + com.google.cloud.automl.v1.TranslationAnnotation.Builder, + com.google.cloud.automl.v1.TranslationAnnotationOrBuilder> + getTranslationFieldBuilder() { + if (translationBuilder_ == null) { + if (!(detailCase_ == 2)) { + detail_ = com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance(); + } + translationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationAnnotation, + com.google.cloud.automl.v1.TranslationAnnotation.Builder, + com.google.cloud.automl.v1.TranslationAnnotationOrBuilder>( + (com.google.cloud.automl.v1.TranslationAnnotation) detail_, + getParentForChildren(), + isClean()); + detail_ = null; + } + detailCase_ = 2; + onChanged(); + ; + return translationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.AnnotationPayload) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.AnnotationPayload) + private static final com.google.cloud.automl.v1.AnnotationPayload DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.AnnotationPayload(); + } + + public static com.google.cloud.automl.v1.AnnotationPayload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationPayload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotationPayload(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.AnnotationPayload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayloadOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayloadOrBuilder.java new file mode 100644 index 000000000..a5ee4c261 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayloadOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/annotation_payload.proto + +package com.google.cloud.automl.v1; + +public interface AnnotationPayloadOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.AnnotationPayload) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Annotation details for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + boolean hasTranslation(); + /** + * + * + *
+   * Annotation details for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + com.google.cloud.automl.v1.TranslationAnnotation getTranslation(); + /** + * + * + *
+   * Annotation details for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationAnnotation translation = 2; + */ + com.google.cloud.automl.v1.TranslationAnnotationOrBuilder getTranslationOrBuilder(); + + public com.google.cloud.automl.v1.AnnotationPayload.DetailCase getDetailCase(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayloadOuterClass.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayloadOuterClass.java new file mode 100644 index 000000000..fe32f4437 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayloadOuterClass.java @@ -0,0 +1,86 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/annotation_payload.proto + +package com.google.cloud.automl.v1; + +public final class AnnotationPayloadOuterClass { + private AnnotationPayloadOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_AnnotationPayload_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_AnnotationPayload_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/automl/v1/annotation_payl" + + "oad.proto\022\026google.cloud.automl.v1\032(googl" + + "e/cloud/automl/v1/translation.proto\032\031goo" + + "gle/protobuf/any.proto\032\034google/api/annot" + + "ations.proto\"c\n\021AnnotationPayload\022D\n\013tra" + + "nslation\030\002 \001(\0132-.google.cloud.automl.v1." + + "TranslationAnnotationH\000B\010\n\006detailB\252\001\n\032co" + + "m.google.cloud.automl.v1P\001Z + * Request message for [AutoMl.CreateDataset][google.cloud.automl.v1.AutoMl.CreateDataset]. + * + * + * Protobuf type {@code google.cloud.automl.v1.CreateDatasetRequest} + */ +public final class CreateDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.CreateDatasetRequest) + CreateDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDatasetRequest.newBuilder() to construct. + private CreateDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDatasetRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.automl.v1.Dataset.Builder subBuilder = null; + if (dataset_ != null) { + subBuilder = dataset_.toBuilder(); + } + dataset_ = + input.readMessage(com.google.cloud.automl.v1.Dataset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataset_); + dataset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.CreateDatasetRequest.class, + com.google.cloud.automl.v1.CreateDatasetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The resource name of the project to create the dataset for.
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the project to create the dataset for.
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_FIELD_NUMBER = 2; + private com.google.cloud.automl.v1.Dataset dataset_; + /** + * + * + *
+   * The dataset to create.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public boolean hasDataset() { + return dataset_ != null; + } + /** + * + * + *
+   * The dataset to create.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public com.google.cloud.automl.v1.Dataset getDataset() { + return dataset_ == null ? com.google.cloud.automl.v1.Dataset.getDefaultInstance() : dataset_; + } + /** + * + * + *
+   * The dataset to create.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetOrBuilder() { + return getDataset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (dataset_ != null) { + output.writeMessage(2, getDataset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (dataset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.CreateDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.CreateDatasetRequest other = + (com.google.cloud.automl.v1.CreateDatasetRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDataset() != other.hasDataset()) return false; + if (hasDataset()) { + if (!getDataset().equals(other.getDataset())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDataset()) { + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.CreateDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.CreateDataset][google.cloud.automl.v1.AutoMl.CreateDataset].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.CreateDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.CreateDatasetRequest) + com.google.cloud.automl.v1.CreateDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.CreateDatasetRequest.class, + com.google.cloud.automl.v1.CreateDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.CreateDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (datasetBuilder_ == null) { + dataset_ = null; + } else { + dataset_ = null; + datasetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.CreateDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateDatasetRequest build() { + com.google.cloud.automl.v1.CreateDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateDatasetRequest buildPartial() { + com.google.cloud.automl.v1.CreateDatasetRequest result = + new com.google.cloud.automl.v1.CreateDatasetRequest(this); + result.parent_ = parent_; + if (datasetBuilder_ == null) { + result.dataset_ = dataset_; + } else { + result.dataset_ = datasetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.CreateDatasetRequest) { + return mergeFrom((com.google.cloud.automl.v1.CreateDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.CreateDatasetRequest other) { + if (other == com.google.cloud.automl.v1.CreateDatasetRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDataset()) { + mergeDataset(other.getDataset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.CreateDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.CreateDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The resource name of the project to create the dataset for.
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the project to create the dataset for.
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the project to create the dataset for.
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the project to create the dataset for.
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the project to create the dataset for.
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.automl.v1.Dataset dataset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Dataset, + com.google.cloud.automl.v1.Dataset.Builder, + com.google.cloud.automl.v1.DatasetOrBuilder> + datasetBuilder_; + /** + * + * + *
+     * The dataset to create.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public boolean hasDataset() { + return datasetBuilder_ != null || dataset_ != null; + } + /** + * + * + *
+     * The dataset to create.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public com.google.cloud.automl.v1.Dataset getDataset() { + if (datasetBuilder_ == null) { + return dataset_ == null + ? com.google.cloud.automl.v1.Dataset.getDefaultInstance() + : dataset_; + } else { + return datasetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The dataset to create.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public Builder setDataset(com.google.cloud.automl.v1.Dataset value) { + if (datasetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + onChanged(); + } else { + datasetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The dataset to create.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public Builder setDataset(com.google.cloud.automl.v1.Dataset.Builder builderForValue) { + if (datasetBuilder_ == null) { + dataset_ = builderForValue.build(); + onChanged(); + } else { + datasetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The dataset to create.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public Builder mergeDataset(com.google.cloud.automl.v1.Dataset value) { + if (datasetBuilder_ == null) { + if (dataset_ != null) { + dataset_ = + com.google.cloud.automl.v1.Dataset.newBuilder(dataset_) + .mergeFrom(value) + .buildPartial(); + } else { + dataset_ = value; + } + onChanged(); + } else { + datasetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The dataset to create.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public Builder clearDataset() { + if (datasetBuilder_ == null) { + dataset_ = null; + onChanged(); + } else { + dataset_ = null; + datasetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The dataset to create.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public com.google.cloud.automl.v1.Dataset.Builder getDatasetBuilder() { + + onChanged(); + return getDatasetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The dataset to create.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetOrBuilder() { + if (datasetBuilder_ != null) { + return datasetBuilder_.getMessageOrBuilder(); + } else { + return dataset_ == null + ? com.google.cloud.automl.v1.Dataset.getDefaultInstance() + : dataset_; + } + } + /** + * + * + *
+     * The dataset to create.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Dataset, + com.google.cloud.automl.v1.Dataset.Builder, + com.google.cloud.automl.v1.DatasetOrBuilder> + getDatasetFieldBuilder() { + if (datasetBuilder_ == null) { + datasetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Dataset, + com.google.cloud.automl.v1.Dataset.Builder, + com.google.cloud.automl.v1.DatasetOrBuilder>( + getDataset(), getParentForChildren(), isClean()); + dataset_ = null; + } + return datasetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.CreateDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.CreateDatasetRequest) + private static final com.google.cloud.automl.v1.CreateDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.CreateDatasetRequest(); + } + + public static com.google.cloud.automl.v1.CreateDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateDatasetRequestOrBuilder.java new file mode 100644 index 000000000..8af447eff --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateDatasetRequestOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface CreateDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.CreateDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the project to create the dataset for.
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * The resource name of the project to create the dataset for.
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The dataset to create.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + boolean hasDataset(); + /** + * + * + *
+   * The dataset to create.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + com.google.cloud.automl.v1.Dataset getDataset(); + /** + * + * + *
+   * The dataset to create.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 2; + */ + com.google.cloud.automl.v1.DatasetOrBuilder getDatasetOrBuilder(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelOperationMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelOperationMetadata.java new file mode 100644 index 000000000..a1c11a7f4 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelOperationMetadata.java @@ -0,0 +1,451 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/operations.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Details of CreateModel operation.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.CreateModelOperationMetadata} + */ +public final class CreateModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.CreateModelOperationMetadata) + CreateModelOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateModelOperationMetadata.newBuilder() to construct. + private CreateModelOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateModelOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateModelOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_CreateModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_CreateModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.CreateModelOperationMetadata.class, + com.google.cloud.automl.v1.CreateModelOperationMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.CreateModelOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.CreateModelOperationMetadata other = + (com.google.cloud.automl.v1.CreateModelOperationMetadata) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.automl.v1.CreateModelOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of CreateModel operation.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.CreateModelOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.CreateModelOperationMetadata) + com.google.cloud.automl.v1.CreateModelOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_CreateModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_CreateModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.CreateModelOperationMetadata.class, + com.google.cloud.automl.v1.CreateModelOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.CreateModelOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_CreateModelOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateModelOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.automl.v1.CreateModelOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateModelOperationMetadata build() { + com.google.cloud.automl.v1.CreateModelOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateModelOperationMetadata buildPartial() { + com.google.cloud.automl.v1.CreateModelOperationMetadata result = + new com.google.cloud.automl.v1.CreateModelOperationMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.CreateModelOperationMetadata) { + return mergeFrom((com.google.cloud.automl.v1.CreateModelOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.CreateModelOperationMetadata other) { + if (other == com.google.cloud.automl.v1.CreateModelOperationMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.CreateModelOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.automl.v1.CreateModelOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.CreateModelOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.CreateModelOperationMetadata) + private static final com.google.cloud.automl.v1.CreateModelOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.CreateModelOperationMetadata(); + } + + public static com.google.cloud.automl.v1.CreateModelOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateModelOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateModelOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateModelOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelOperationMetadataOrBuilder.java new file mode 100644 index 000000000..ad632b655 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelOperationMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/operations.proto + +package com.google.cloud.automl.v1; + +public interface CreateModelOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.CreateModelOperationMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequest.java new file mode 100644 index 000000000..1751ad304 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequest.java @@ -0,0 +1,868 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.CreateModel][google.cloud.automl.v1.AutoMl.CreateModel].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.CreateModelRequest} + */ +public final class CreateModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.CreateModelRequest) + CreateModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateModelRequest.newBuilder() to construct. + private CreateModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateModelRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 34: + { + com.google.cloud.automl.v1.Model.Builder subBuilder = null; + if (model_ != null) { + subBuilder = model_.toBuilder(); + } + model_ = + input.readMessage(com.google.cloud.automl.v1.Model.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(model_); + model_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.CreateModelRequest.class, + com.google.cloud.automl.v1.CreateModelRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Resource name of the parent project where the model is being created.
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the parent project where the model is being created.
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_FIELD_NUMBER = 4; + private com.google.cloud.automl.v1.Model model_; + /** + * + * + *
+   * The model to create.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public boolean hasModel() { + return model_ != null; + } + /** + * + * + *
+   * The model to create.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public com.google.cloud.automl.v1.Model getModel() { + return model_ == null ? com.google.cloud.automl.v1.Model.getDefaultInstance() : model_; + } + /** + * + * + *
+   * The model to create.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder() { + return getModel(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (model_ != null) { + output.writeMessage(4, getModel()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (model_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getModel()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.CreateModelRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.CreateModelRequest other = + (com.google.cloud.automl.v1.CreateModelRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasModel() != other.hasModel()) return false; + if (hasModel()) { + if (!getModel().equals(other.getModel())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasModel()) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.CreateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.CreateModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.CreateModel][google.cloud.automl.v1.AutoMl.CreateModel].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.CreateModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.CreateModelRequest) + com.google.cloud.automl.v1.CreateModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.CreateModelRequest.class, + com.google.cloud.automl.v1.CreateModelRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.CreateModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (modelBuilder_ == null) { + model_ = null; + } else { + model_ = null; + modelBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_CreateModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateModelRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.CreateModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateModelRequest build() { + com.google.cloud.automl.v1.CreateModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateModelRequest buildPartial() { + com.google.cloud.automl.v1.CreateModelRequest result = + new com.google.cloud.automl.v1.CreateModelRequest(this); + result.parent_ = parent_; + if (modelBuilder_ == null) { + result.model_ = model_; + } else { + result.model_ = modelBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.CreateModelRequest) { + return mergeFrom((com.google.cloud.automl.v1.CreateModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.CreateModelRequest other) { + if (other == com.google.cloud.automl.v1.CreateModelRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasModel()) { + mergeModel(other.getModel()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.CreateModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.CreateModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Resource name of the parent project where the model is being created.
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the parent project where the model is being created.
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the parent project where the model is being created.
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the parent project where the model is being created.
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the parent project where the model is being created.
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.automl.v1.Model model_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Model, + com.google.cloud.automl.v1.Model.Builder, + com.google.cloud.automl.v1.ModelOrBuilder> + modelBuilder_; + /** + * + * + *
+     * The model to create.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public boolean hasModel() { + return modelBuilder_ != null || model_ != null; + } + /** + * + * + *
+     * The model to create.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public com.google.cloud.automl.v1.Model getModel() { + if (modelBuilder_ == null) { + return model_ == null ? com.google.cloud.automl.v1.Model.getDefaultInstance() : model_; + } else { + return modelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The model to create.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public Builder setModel(com.google.cloud.automl.v1.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + onChanged(); + } else { + modelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The model to create.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public Builder setModel(com.google.cloud.automl.v1.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + model_ = builderForValue.build(); + onChanged(); + } else { + modelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The model to create.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public Builder mergeModel(com.google.cloud.automl.v1.Model value) { + if (modelBuilder_ == null) { + if (model_ != null) { + model_ = + com.google.cloud.automl.v1.Model.newBuilder(model_).mergeFrom(value).buildPartial(); + } else { + model_ = value; + } + onChanged(); + } else { + modelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The model to create.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public Builder clearModel() { + if (modelBuilder_ == null) { + model_ = null; + onChanged(); + } else { + model_ = null; + modelBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The model to create.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public com.google.cloud.automl.v1.Model.Builder getModelBuilder() { + + onChanged(); + return getModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The model to create.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder() { + if (modelBuilder_ != null) { + return modelBuilder_.getMessageOrBuilder(); + } else { + return model_ == null ? com.google.cloud.automl.v1.Model.getDefaultInstance() : model_; + } + } + /** + * + * + *
+     * The model to create.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Model, + com.google.cloud.automl.v1.Model.Builder, + com.google.cloud.automl.v1.ModelOrBuilder> + getModelFieldBuilder() { + if (modelBuilder_ == null) { + modelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Model, + com.google.cloud.automl.v1.Model.Builder, + com.google.cloud.automl.v1.ModelOrBuilder>( + getModel(), getParentForChildren(), isClean()); + model_ = null; + } + return modelBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.CreateModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.CreateModelRequest) + private static final com.google.cloud.automl.v1.CreateModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.CreateModelRequest(); + } + + public static com.google.cloud.automl.v1.CreateModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.CreateModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequestOrBuilder.java new file mode 100644 index 000000000..7f8c4d418 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequestOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface CreateModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.CreateModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the parent project where the model is being created.
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Resource name of the parent project where the model is being created.
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The model to create.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + boolean hasModel(); + /** + * + * + *
+   * The model to create.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + com.google.cloud.automl.v1.Model getModel(); + /** + * + * + *
+   * The model to create.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 4; + */ + com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DataItems.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DataItems.java new file mode 100644 index 000000000..b640c623e --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DataItems.java @@ -0,0 +1,104 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/data_items.proto + +package com.google.cloud.automl.v1; + +public final class DataItems { + private DataItems() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_TextSnippet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_TextSnippet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_ExamplePayload_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_ExamplePayload_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/cloud/automl/v1/data_items.prot" + + "o\022\026google.cloud.automl.v1\032\037google/cloud/" + + "automl/v1/io.proto\032\031google/protobuf/any." + + "proto\032\036google/protobuf/duration.proto\032\034g" + + "oogle/protobuf/struct.proto\032\034google/api/" + + "annotations.proto\"F\n\013TextSnippet\022\017\n\007cont" + + "ent\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\t\022\023\n\013content_" + + "uri\030\004 \001(\t\"X\n\016ExamplePayload\022;\n\014text_snip" + + "pet\030\002 \001(\0132#.google.cloud.automl.v1.TextS" + + "nippetH\000B\t\n\007payloadB\252\001\n\032com.google.cloud" + + ".automl.v1P\001Z + * A workspace for solving a single, particular machine learning (ML) problem. + * A workspace contains examples that may be annotated. + * + * + * Protobuf type {@code google.cloud.automl.v1.Dataset} + */ +public final class Dataset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.Dataset) + DatasetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Dataset.newBuilder() to construct. + private Dataset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Dataset() { + name_ = ""; + displayName_ = ""; + description_ = ""; + etag_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Dataset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 114: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 168: + { + exampleCount_ = input.readInt32(); + break; + } + case 186: + { + com.google.cloud.automl.v1.TranslationDatasetMetadata.Builder subBuilder = null; + if (datasetMetadataCase_ == 23) { + subBuilder = + ((com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_) + .toBuilder(); + } + datasetMetadata_ = + input.readMessage( + com.google.cloud.automl.v1.TranslationDatasetMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_); + datasetMetadata_ = subBuilder.buildPartial(); + } + datasetMetadataCase_ = 23; + break; + } + case 314: + { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000080; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.DatasetOuterClass + .internal_static_google_cloud_automl_v1_Dataset_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 39: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.DatasetOuterClass + .internal_static_google_cloud_automl_v1_Dataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.Dataset.class, + com.google.cloud.automl.v1.Dataset.Builder.class); + } + + private int bitField0_; + private int datasetMetadataCase_ = 0; + private java.lang.Object datasetMetadata_; + + public enum DatasetMetadataCase implements com.google.protobuf.Internal.EnumLite { + TRANSLATION_DATASET_METADATA(23), + DATASETMETADATA_NOT_SET(0); + private final int value; + + private DatasetMetadataCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static DatasetMetadataCase valueOf(int value) { + return forNumber(value); + } + + public static DatasetMetadataCase forNumber(int value) { + switch (value) { + case 23: + return TRANSLATION_DATASET_METADATA; + case 0: + return DATASETMETADATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DatasetMetadataCase getDatasetMetadataCase() { + return DatasetMetadataCase.forNumber(datasetMetadataCase_); + } + + public static final int TRANSLATION_DATASET_METADATA_FIELD_NUMBER = 23; + /** + * + * + *
+   * Metadata for a dataset used for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public boolean hasTranslationDatasetMetadata() { + return datasetMetadataCase_ == 23; + } + /** + * + * + *
+   * Metadata for a dataset used for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public com.google.cloud.automl.v1.TranslationDatasetMetadata getTranslationDatasetMetadata() { + if (datasetMetadataCase_ == 23) { + return (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_; + } + return com.google.cloud.automl.v1.TranslationDatasetMetadata.getDefaultInstance(); + } + /** + * + * + *
+   * Metadata for a dataset used for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public com.google.cloud.automl.v1.TranslationDatasetMetadataOrBuilder + getTranslationDatasetMetadataOrBuilder() { + if (datasetMetadataCase_ == 23) { + return (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_; + } + return com.google.cloud.automl.v1.TranslationDatasetMetadata.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the dataset.
+   * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the dataset.
+   * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The name of the dataset to show in the interface. The name can be
+   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+   * and a-z, underscores
+   * (_), and ASCII digits 0-9.
+   * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the dataset to show in the interface. The name can be
+   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+   * and a-z, underscores
+   * (_), and ASCII digits 0-9.
+   * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * User-provided description of the dataset. The description can be up to
+   * 25000 characters long.
+   * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * User-provided description of the dataset. The description can be up to
+   * 25000 characters long.
+   * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXAMPLE_COUNT_FIELD_NUMBER = 21; + private int exampleCount_; + /** + * + * + *
+   * Output only. The number of examples in the dataset.
+   * 
+ * + * int32 example_count = 21; + */ + public int getExampleCount() { + return exampleCount_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 14; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int ETAG_FIELD_NUMBER = 17; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 17; + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 17; + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 39; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.automl.v1.DatasetOuterClass + .internal_static_google_cloud_automl_v1_Dataset_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your dataset.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 39; + */ + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your dataset.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 39; + */ + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your dataset.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 39; + */ + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your dataset.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 39; + */ + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(14, getCreateTime()); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, etag_); + } + if (exampleCount_ != 0) { + output.writeInt32(21, exampleCount_); + } + if (datasetMetadataCase_ == 23) { + output.writeMessage( + 23, (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 39); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getCreateTime()); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, etag_); + } + if (exampleCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(21, exampleCount_); + } + if (datasetMetadataCase_ == 23) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 23, (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(39, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.Dataset)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.Dataset other = (com.google.cloud.automl.v1.Dataset) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getExampleCount() != other.getExampleCount()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDatasetMetadataCase().equals(other.getDatasetMetadataCase())) return false; + switch (datasetMetadataCase_) { + case 23: + if (!getTranslationDatasetMetadata().equals(other.getTranslationDatasetMetadata())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + EXAMPLE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getExampleCount(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + switch (datasetMetadataCase_) { + case 23: + hash = (37 * hash) + TRANSLATION_DATASET_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getTranslationDatasetMetadata().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.Dataset parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.Dataset parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Dataset parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.Dataset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Dataset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.Dataset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Dataset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.Dataset parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Dataset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.Dataset parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Dataset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.Dataset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.Dataset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A workspace for solving a single, particular machine learning (ML) problem.
+   * A workspace contains examples that may be annotated.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.Dataset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.Dataset) + com.google.cloud.automl.v1.DatasetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.DatasetOuterClass + .internal_static_google_cloud_automl_v1_Dataset_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 39: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 39: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.DatasetOuterClass + .internal_static_google_cloud_automl_v1_Dataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.Dataset.class, + com.google.cloud.automl.v1.Dataset.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.Dataset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + exampleCount_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + etag_ = ""; + + internalGetMutableLabels().clear(); + datasetMetadataCase_ = 0; + datasetMetadata_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.DatasetOuterClass + .internal_static_google_cloud_automl_v1_Dataset_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.Dataset getDefaultInstanceForType() { + return com.google.cloud.automl.v1.Dataset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.Dataset build() { + com.google.cloud.automl.v1.Dataset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.Dataset buildPartial() { + com.google.cloud.automl.v1.Dataset result = new com.google.cloud.automl.v1.Dataset(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (datasetMetadataCase_ == 23) { + if (translationDatasetMetadataBuilder_ == null) { + result.datasetMetadata_ = datasetMetadata_; + } else { + result.datasetMetadata_ = translationDatasetMetadataBuilder_.build(); + } + } + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.exampleCount_ = exampleCount_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.etag_ = etag_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.bitField0_ = to_bitField0_; + result.datasetMetadataCase_ = datasetMetadataCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.Dataset) { + return mergeFrom((com.google.cloud.automl.v1.Dataset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.Dataset other) { + if (other == com.google.cloud.automl.v1.Dataset.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getExampleCount() != 0) { + setExampleCount(other.getExampleCount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + switch (other.getDatasetMetadataCase()) { + case TRANSLATION_DATASET_METADATA: + { + mergeTranslationDatasetMetadata(other.getTranslationDatasetMetadata()); + break; + } + case DATASETMETADATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.Dataset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.Dataset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int datasetMetadataCase_ = 0; + private java.lang.Object datasetMetadata_; + + public DatasetMetadataCase getDatasetMetadataCase() { + return DatasetMetadataCase.forNumber(datasetMetadataCase_); + } + + public Builder clearDatasetMetadata() { + datasetMetadataCase_ = 0; + datasetMetadata_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationDatasetMetadata, + com.google.cloud.automl.v1.TranslationDatasetMetadata.Builder, + com.google.cloud.automl.v1.TranslationDatasetMetadataOrBuilder> + translationDatasetMetadataBuilder_; + /** + * + * + *
+     * Metadata for a dataset used for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public boolean hasTranslationDatasetMetadata() { + return datasetMetadataCase_ == 23; + } + /** + * + * + *
+     * Metadata for a dataset used for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public com.google.cloud.automl.v1.TranslationDatasetMetadata getTranslationDatasetMetadata() { + if (translationDatasetMetadataBuilder_ == null) { + if (datasetMetadataCase_ == 23) { + return (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_; + } + return com.google.cloud.automl.v1.TranslationDatasetMetadata.getDefaultInstance(); + } else { + if (datasetMetadataCase_ == 23) { + return translationDatasetMetadataBuilder_.getMessage(); + } + return com.google.cloud.automl.v1.TranslationDatasetMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Metadata for a dataset used for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public Builder setTranslationDatasetMetadata( + com.google.cloud.automl.v1.TranslationDatasetMetadata value) { + if (translationDatasetMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + datasetMetadata_ = value; + onChanged(); + } else { + translationDatasetMetadataBuilder_.setMessage(value); + } + datasetMetadataCase_ = 23; + return this; + } + /** + * + * + *
+     * Metadata for a dataset used for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public Builder setTranslationDatasetMetadata( + com.google.cloud.automl.v1.TranslationDatasetMetadata.Builder builderForValue) { + if (translationDatasetMetadataBuilder_ == null) { + datasetMetadata_ = builderForValue.build(); + onChanged(); + } else { + translationDatasetMetadataBuilder_.setMessage(builderForValue.build()); + } + datasetMetadataCase_ = 23; + return this; + } + /** + * + * + *
+     * Metadata for a dataset used for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public Builder mergeTranslationDatasetMetadata( + com.google.cloud.automl.v1.TranslationDatasetMetadata value) { + if (translationDatasetMetadataBuilder_ == null) { + if (datasetMetadataCase_ == 23 + && datasetMetadata_ + != com.google.cloud.automl.v1.TranslationDatasetMetadata.getDefaultInstance()) { + datasetMetadata_ = + com.google.cloud.automl.v1.TranslationDatasetMetadata.newBuilder( + (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + datasetMetadata_ = value; + } + onChanged(); + } else { + if (datasetMetadataCase_ == 23) { + translationDatasetMetadataBuilder_.mergeFrom(value); + } + translationDatasetMetadataBuilder_.setMessage(value); + } + datasetMetadataCase_ = 23; + return this; + } + /** + * + * + *
+     * Metadata for a dataset used for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public Builder clearTranslationDatasetMetadata() { + if (translationDatasetMetadataBuilder_ == null) { + if (datasetMetadataCase_ == 23) { + datasetMetadataCase_ = 0; + datasetMetadata_ = null; + onChanged(); + } + } else { + if (datasetMetadataCase_ == 23) { + datasetMetadataCase_ = 0; + datasetMetadata_ = null; + } + translationDatasetMetadataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Metadata for a dataset used for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public com.google.cloud.automl.v1.TranslationDatasetMetadata.Builder + getTranslationDatasetMetadataBuilder() { + return getTranslationDatasetMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Metadata for a dataset used for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + public com.google.cloud.automl.v1.TranslationDatasetMetadataOrBuilder + getTranslationDatasetMetadataOrBuilder() { + if ((datasetMetadataCase_ == 23) && (translationDatasetMetadataBuilder_ != null)) { + return translationDatasetMetadataBuilder_.getMessageOrBuilder(); + } else { + if (datasetMetadataCase_ == 23) { + return (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_; + } + return com.google.cloud.automl.v1.TranslationDatasetMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Metadata for a dataset used for translation.
+     * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationDatasetMetadata, + com.google.cloud.automl.v1.TranslationDatasetMetadata.Builder, + com.google.cloud.automl.v1.TranslationDatasetMetadataOrBuilder> + getTranslationDatasetMetadataFieldBuilder() { + if (translationDatasetMetadataBuilder_ == null) { + if (!(datasetMetadataCase_ == 23)) { + datasetMetadata_ = + com.google.cloud.automl.v1.TranslationDatasetMetadata.getDefaultInstance(); + } + translationDatasetMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationDatasetMetadata, + com.google.cloud.automl.v1.TranslationDatasetMetadata.Builder, + com.google.cloud.automl.v1.TranslationDatasetMetadataOrBuilder>( + (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_, + getParentForChildren(), + isClean()); + datasetMetadata_ = null; + } + datasetMetadataCase_ = 23; + onChanged(); + ; + return translationDatasetMetadataBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the dataset.
+     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the dataset.
+     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the dataset.
+     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the dataset.
+     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the dataset.
+     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The name of the dataset to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9.
+     * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the dataset to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9.
+     * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the dataset to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the dataset to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9.
+     * 
+ * + * string display_name = 2; + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the dataset to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * User-provided description of the dataset. The description can be up to
+     * 25000 characters long.
+     * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-provided description of the dataset. The description can be up to
+     * 25000 characters long.
+     * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-provided description of the dataset. The description can be up to
+     * 25000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * User-provided description of the dataset. The description can be up to
+     * 25000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * User-provided description of the dataset. The description can be up to
+     * 25000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int exampleCount_; + /** + * + * + *
+     * Output only. The number of examples in the dataset.
+     * 
+ * + * int32 example_count = 21; + */ + public int getExampleCount() { + return exampleCount_; + } + /** + * + * + *
+     * Output only. The number of examples in the dataset.
+     * 
+ * + * int32 example_count = 21; + */ + public Builder setExampleCount(int value) { + + exampleCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of examples in the dataset.
+     * 
+ * + * int32 example_count = 21; + */ + public Builder clearExampleCount() { + + exampleCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this dataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this dataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this dataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this dataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this dataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this dataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this dataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this dataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this dataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 17; + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 17; + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 17; + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 17; + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 17; + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your dataset.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 39; + */ + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your dataset.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 39; + */ + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your dataset.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 39; + */ + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your dataset.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 39; + */ + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your dataset.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 39; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your dataset.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 39; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your dataset.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 39; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.Dataset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.Dataset) + private static final com.google.cloud.automl.v1.Dataset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.Dataset(); + } + + public static com.google.cloud.automl.v1.Dataset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Dataset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Dataset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.Dataset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DatasetName.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DatasetName.java new file mode 100644 index 000000000..8f218f826 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DatasetName.java @@ -0,0 +1,210 @@ +/* + * 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.automl.v1; + +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 +@javax.annotation.Generated("by GAPIC protoc plugin") +public class DatasetName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/datasets/{dataset}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String dataset; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private DatasetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + } + + public static DatasetName of(String project, String location, String dataset) { + return newBuilder().setProject(project).setLocation(location).setDataset(dataset).build(); + } + + public static String format(String project, String location, String dataset) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .build() + .toString(); + } + + public static DatasetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "DatasetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("dataset")); + } + + 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 (DatasetName 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("location", location); + fieldMapBuilder.put("dataset", dataset); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location, "dataset", dataset); + } + + /** Builder for DatasetName. */ + public static class Builder { + + private String project; + private String location; + private String dataset; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + private Builder() {} + + private Builder(DatasetName datasetName) { + project = datasetName.project; + location = datasetName.location; + dataset = datasetName.dataset; + } + + public DatasetName build() { + return new DatasetName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof DatasetName) { + DatasetName that = (DatasetName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.dataset.equals(that.dataset)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= dataset.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DatasetOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DatasetOrBuilder.java new file mode 100644 index 000000000..ffc9cb73c --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DatasetOrBuilder.java @@ -0,0 +1,279 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/dataset.proto + +package com.google.cloud.automl.v1; + +public interface DatasetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.Dataset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Metadata for a dataset used for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + boolean hasTranslationDatasetMetadata(); + /** + * + * + *
+   * Metadata for a dataset used for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + com.google.cloud.automl.v1.TranslationDatasetMetadata getTranslationDatasetMetadata(); + /** + * + * + *
+   * Metadata for a dataset used for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; + * + */ + com.google.cloud.automl.v1.TranslationDatasetMetadataOrBuilder + getTranslationDatasetMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. The resource name of the dataset.
+   * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the dataset.
+   * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The name of the dataset to show in the interface. The name can be
+   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+   * and a-z, underscores
+   * (_), and ASCII digits 0-9.
+   * 
+ * + * string display_name = 2; + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The name of the dataset to show in the interface. The name can be
+   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+   * and a-z, underscores
+   * (_), and ASCII digits 0-9.
+   * 
+ * + * string display_name = 2; + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * User-provided description of the dataset. The description can be up to
+   * 25000 characters long.
+   * 
+ * + * string description = 3; + */ + java.lang.String getDescription(); + /** + * + * + *
+   * User-provided description of the dataset. The description can be up to
+   * 25000 characters long.
+   * 
+ * + * string description = 3; + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The number of examples in the dataset.
+   * 
+ * + * int32 example_count = 21; + */ + int getExampleCount(); + + /** + * + * + *
+   * Output only. Timestamp when this dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 14; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 17; + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 17; + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your dataset.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 39; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your dataset.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 39; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your dataset.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 39; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your dataset.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 39; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your dataset.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 39; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + public com.google.cloud.automl.v1.Dataset.DatasetMetadataCase getDatasetMetadataCase(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DatasetOuterClass.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DatasetOuterClass.java new file mode 100644 index 000000000..586d8a4b0 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DatasetOuterClass.java @@ -0,0 +1,113 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/dataset.proto + +package com.google.cloud.automl.v1; + +public final class DatasetOuterClass { + private DatasetOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_Dataset_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_Dataset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_Dataset_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_Dataset_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n$google/cloud/automl/v1/dataset.proto\022\026" + + "google.cloud.automl.v1\032(google/cloud/aut" + + "oml/v1/translation.proto\032\037google/protobu" + + "f/timestamp.proto\032\034google/api/annotation" + + "s.proto\"\364\002\n\007Dataset\022Z\n\034translation_datas" + + "et_metadata\030\027 \001(\01322.google.cloud.automl." + + "v1.TranslationDatasetMetadataH\000\022\014\n\004name\030" + + "\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022\023\n\013descripti" + + "on\030\003 \001(\t\022\025\n\rexample_count\030\025 \001(\005\022/\n\013creat" + + "e_time\030\016 \001(\0132\032.google.protobuf.Timestamp" + + "\022\014\n\004etag\030\021 \001(\t\022;\n\006labels\030\' \003(\0132+.google." + + "cloud.automl.v1.Dataset.LabelsEntry\032-\n\013L" + + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001B\022\n\020dataset_metadataB\252\001\n\032com.google.cl" + + "oud.automl.v1P\001Z + * Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1.AutoMl.DeleteDataset]. + * + * + * Protobuf type {@code google.cloud.automl.v1.DeleteDatasetRequest} + */ +public final class DeleteDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.DeleteDatasetRequest) + DeleteDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDatasetRequest.newBuilder() to construct. + private DeleteDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDatasetRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.DeleteDatasetRequest.class, + com.google.cloud.automl.v1.DeleteDatasetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the dataset to delete.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the dataset to delete.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.DeleteDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.DeleteDatasetRequest other = + (com.google.cloud.automl.v1.DeleteDatasetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.DeleteDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1.AutoMl.DeleteDataset].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.DeleteDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.DeleteDatasetRequest) + com.google.cloud.automl.v1.DeleteDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.DeleteDatasetRequest.class, + com.google.cloud.automl.v1.DeleteDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.DeleteDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.DeleteDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteDatasetRequest build() { + com.google.cloud.automl.v1.DeleteDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteDatasetRequest buildPartial() { + com.google.cloud.automl.v1.DeleteDatasetRequest result = + new com.google.cloud.automl.v1.DeleteDatasetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.DeleteDatasetRequest) { + return mergeFrom((com.google.cloud.automl.v1.DeleteDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.DeleteDatasetRequest other) { + if (other == com.google.cloud.automl.v1.DeleteDatasetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.DeleteDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.DeleteDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the dataset to delete.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the dataset to delete.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the dataset to delete.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the dataset to delete.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the dataset to delete.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.DeleteDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.DeleteDatasetRequest) + private static final com.google.cloud.automl.v1.DeleteDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.DeleteDatasetRequest(); + } + + public static com.google.cloud.automl.v1.DeleteDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteDatasetRequestOrBuilder.java new file mode 100644 index 000000000..26d5c5f19 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteDatasetRequestOrBuilder.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface DeleteDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.DeleteDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the dataset to delete.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the dataset to delete.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequest.java new file mode 100644 index 000000000..68383877c --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequest.java @@ -0,0 +1,611 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.DeleteModel][google.cloud.automl.v1.AutoMl.DeleteModel].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.DeleteModelRequest} + */ +public final class DeleteModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.DeleteModelRequest) + DeleteModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteModelRequest.newBuilder() to construct. + private DeleteModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteModelRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.DeleteModelRequest.class, + com.google.cloud.automl.v1.DeleteModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name of the model being deleted.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the model being deleted.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.DeleteModelRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.DeleteModelRequest other = + (com.google.cloud.automl.v1.DeleteModelRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.DeleteModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.DeleteModel][google.cloud.automl.v1.AutoMl.DeleteModel].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.DeleteModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.DeleteModelRequest) + com.google.cloud.automl.v1.DeleteModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.DeleteModelRequest.class, + com.google.cloud.automl.v1.DeleteModelRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.DeleteModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_DeleteModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteModelRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.DeleteModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteModelRequest build() { + com.google.cloud.automl.v1.DeleteModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteModelRequest buildPartial() { + com.google.cloud.automl.v1.DeleteModelRequest result = + new com.google.cloud.automl.v1.DeleteModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.DeleteModelRequest) { + return mergeFrom((com.google.cloud.automl.v1.DeleteModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.DeleteModelRequest other) { + if (other == com.google.cloud.automl.v1.DeleteModelRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.DeleteModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.DeleteModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of the model being deleted.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the model being deleted.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the model being deleted.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the model being deleted.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the model being deleted.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.DeleteModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.DeleteModelRequest) + private static final com.google.cloud.automl.v1.DeleteModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.DeleteModelRequest(); + } + + public static com.google.cloud.automl.v1.DeleteModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequestOrBuilder.java new file mode 100644 index 000000000..a195ac92f --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequestOrBuilder.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface DeleteModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.DeleteModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the model being deleted.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of the model being deleted.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteOperationMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteOperationMetadata.java new file mode 100644 index 000000000..d82896026 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteOperationMetadata.java @@ -0,0 +1,450 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/operations.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Details of operations that perform deletes of any entities.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.DeleteOperationMetadata} + */ +public final class DeleteOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.DeleteOperationMetadata) + DeleteOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteOperationMetadata.newBuilder() to construct. + private DeleteOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_DeleteOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_DeleteOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.DeleteOperationMetadata.class, + com.google.cloud.automl.v1.DeleteOperationMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.DeleteOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.DeleteOperationMetadata other = + (com.google.cloud.automl.v1.DeleteOperationMetadata) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.DeleteOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform deletes of any entities.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.DeleteOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.DeleteOperationMetadata) + com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_DeleteOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_DeleteOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.DeleteOperationMetadata.class, + com.google.cloud.automl.v1.DeleteOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.DeleteOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_DeleteOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.automl.v1.DeleteOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteOperationMetadata build() { + com.google.cloud.automl.v1.DeleteOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteOperationMetadata buildPartial() { + com.google.cloud.automl.v1.DeleteOperationMetadata result = + new com.google.cloud.automl.v1.DeleteOperationMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.DeleteOperationMetadata) { + return mergeFrom((com.google.cloud.automl.v1.DeleteOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.DeleteOperationMetadata other) { + if (other == com.google.cloud.automl.v1.DeleteOperationMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.DeleteOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.automl.v1.DeleteOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.DeleteOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.DeleteOperationMetadata) + private static final com.google.cloud.automl.v1.DeleteOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.DeleteOperationMetadata(); + } + + public static com.google.cloud.automl.v1.DeleteOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.DeleteOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteOperationMetadataOrBuilder.java new file mode 100644 index 000000000..d9d747638 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteOperationMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/operations.proto + +package com.google.cloud.automl.v1; + +public interface DeleteOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.DeleteOperationMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayload.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayload.java new file mode 100644 index 000000000..29b2b6112 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayload.java @@ -0,0 +1,806 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/data_items.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Example data used for training or prediction.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ExamplePayload} + */ +public final class ExamplePayload extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ExamplePayload) + ExamplePayloadOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExamplePayload.newBuilder() to construct. + private ExamplePayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExamplePayload() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExamplePayload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.automl.v1.TextSnippet.Builder subBuilder = null; + if (payloadCase_ == 2) { + subBuilder = ((com.google.cloud.automl.v1.TextSnippet) payload_).toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.automl.v1.TextSnippet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.automl.v1.TextSnippet) payload_); + payload_ = subBuilder.buildPartial(); + } + payloadCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_ExamplePayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_ExamplePayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ExamplePayload.class, + com.google.cloud.automl.v1.ExamplePayload.Builder.class); + } + + private int payloadCase_ = 0; + private java.lang.Object payload_; + + public enum PayloadCase implements com.google.protobuf.Internal.EnumLite { + TEXT_SNIPPET(2), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 2: + return TEXT_SNIPPET; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int TEXT_SNIPPET_FIELD_NUMBER = 2; + /** + * + * + *
+   * Example text.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public boolean hasTextSnippet() { + return payloadCase_ == 2; + } + /** + * + * + *
+   * Example text.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public com.google.cloud.automl.v1.TextSnippet getTextSnippet() { + if (payloadCase_ == 2) { + return (com.google.cloud.automl.v1.TextSnippet) payload_; + } + return com.google.cloud.automl.v1.TextSnippet.getDefaultInstance(); + } + /** + * + * + *
+   * Example text.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public com.google.cloud.automl.v1.TextSnippetOrBuilder getTextSnippetOrBuilder() { + if (payloadCase_ == 2) { + return (com.google.cloud.automl.v1.TextSnippet) payload_; + } + return com.google.cloud.automl.v1.TextSnippet.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (payloadCase_ == 2) { + output.writeMessage(2, (com.google.cloud.automl.v1.TextSnippet) payload_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.automl.v1.TextSnippet) payload_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ExamplePayload)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ExamplePayload other = + (com.google.cloud.automl.v1.ExamplePayload) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 2: + if (!getTextSnippet().equals(other.getTextSnippet())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 2: + hash = (37 * hash) + TEXT_SNIPPET_FIELD_NUMBER; + hash = (53 * hash) + getTextSnippet().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ExamplePayload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.ExamplePayload prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Example data used for training or prediction.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ExamplePayload} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ExamplePayload) + com.google.cloud.automl.v1.ExamplePayloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_ExamplePayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_ExamplePayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ExamplePayload.class, + com.google.cloud.automl.v1.ExamplePayload.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ExamplePayload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_ExamplePayload_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ExamplePayload getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ExamplePayload.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ExamplePayload build() { + com.google.cloud.automl.v1.ExamplePayload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ExamplePayload buildPartial() { + com.google.cloud.automl.v1.ExamplePayload result = + new com.google.cloud.automl.v1.ExamplePayload(this); + if (payloadCase_ == 2) { + if (textSnippetBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = textSnippetBuilder_.build(); + } + } + result.payloadCase_ = payloadCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ExamplePayload) { + return mergeFrom((com.google.cloud.automl.v1.ExamplePayload) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ExamplePayload other) { + if (other == com.google.cloud.automl.v1.ExamplePayload.getDefaultInstance()) return this; + switch (other.getPayloadCase()) { + case TEXT_SNIPPET: + { + mergeTextSnippet(other.getTextSnippet()); + break; + } + case PAYLOAD_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ExamplePayload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.ExamplePayload) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TextSnippet, + com.google.cloud.automl.v1.TextSnippet.Builder, + com.google.cloud.automl.v1.TextSnippetOrBuilder> + textSnippetBuilder_; + /** + * + * + *
+     * Example text.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public boolean hasTextSnippet() { + return payloadCase_ == 2; + } + /** + * + * + *
+     * Example text.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public com.google.cloud.automl.v1.TextSnippet getTextSnippet() { + if (textSnippetBuilder_ == null) { + if (payloadCase_ == 2) { + return (com.google.cloud.automl.v1.TextSnippet) payload_; + } + return com.google.cloud.automl.v1.TextSnippet.getDefaultInstance(); + } else { + if (payloadCase_ == 2) { + return textSnippetBuilder_.getMessage(); + } + return com.google.cloud.automl.v1.TextSnippet.getDefaultInstance(); + } + } + /** + * + * + *
+     * Example text.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public Builder setTextSnippet(com.google.cloud.automl.v1.TextSnippet value) { + if (textSnippetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + textSnippetBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + /** + * + * + *
+     * Example text.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public Builder setTextSnippet(com.google.cloud.automl.v1.TextSnippet.Builder builderForValue) { + if (textSnippetBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + textSnippetBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 2; + return this; + } + /** + * + * + *
+     * Example text.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public Builder mergeTextSnippet(com.google.cloud.automl.v1.TextSnippet value) { + if (textSnippetBuilder_ == null) { + if (payloadCase_ == 2 + && payload_ != com.google.cloud.automl.v1.TextSnippet.getDefaultInstance()) { + payload_ = + com.google.cloud.automl.v1.TextSnippet.newBuilder( + (com.google.cloud.automl.v1.TextSnippet) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 2) { + textSnippetBuilder_.mergeFrom(value); + } + textSnippetBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + /** + * + * + *
+     * Example text.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public Builder clearTextSnippet() { + if (textSnippetBuilder_ == null) { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + } + textSnippetBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Example text.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public com.google.cloud.automl.v1.TextSnippet.Builder getTextSnippetBuilder() { + return getTextSnippetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Example text.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + public com.google.cloud.automl.v1.TextSnippetOrBuilder getTextSnippetOrBuilder() { + if ((payloadCase_ == 2) && (textSnippetBuilder_ != null)) { + return textSnippetBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 2) { + return (com.google.cloud.automl.v1.TextSnippet) payload_; + } + return com.google.cloud.automl.v1.TextSnippet.getDefaultInstance(); + } + } + /** + * + * + *
+     * Example text.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TextSnippet, + com.google.cloud.automl.v1.TextSnippet.Builder, + com.google.cloud.automl.v1.TextSnippetOrBuilder> + getTextSnippetFieldBuilder() { + if (textSnippetBuilder_ == null) { + if (!(payloadCase_ == 2)) { + payload_ = com.google.cloud.automl.v1.TextSnippet.getDefaultInstance(); + } + textSnippetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TextSnippet, + com.google.cloud.automl.v1.TextSnippet.Builder, + com.google.cloud.automl.v1.TextSnippetOrBuilder>( + (com.google.cloud.automl.v1.TextSnippet) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 2; + onChanged(); + ; + return textSnippetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ExamplePayload) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ExamplePayload) + private static final com.google.cloud.automl.v1.ExamplePayload DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ExamplePayload(); + } + + public static com.google.cloud.automl.v1.ExamplePayload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExamplePayload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExamplePayload(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ExamplePayload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayloadOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayloadOrBuilder.java new file mode 100644 index 000000000..d9f207ac1 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayloadOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/data_items.proto + +package com.google.cloud.automl.v1; + +public interface ExamplePayloadOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ExamplePayload) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Example text.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + boolean hasTextSnippet(); + /** + * + * + *
+   * Example text.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + com.google.cloud.automl.v1.TextSnippet getTextSnippet(); + /** + * + * + *
+   * Example text.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet text_snippet = 2; + */ + com.google.cloud.automl.v1.TextSnippetOrBuilder getTextSnippetOrBuilder(); + + public com.google.cloud.automl.v1.ExamplePayload.PayloadCase getPayloadCase(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequest.java new file mode 100644 index 000000000..e7692ef2a --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequest.java @@ -0,0 +1,878 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.ExportData][google.cloud.automl.v1.AutoMl.ExportData].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ExportDataRequest} + */ +public final class ExportDataRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ExportDataRequest) + ExportDataRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDataRequest.newBuilder() to construct. + private ExportDataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDataRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDataRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + com.google.cloud.automl.v1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.automl.v1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ExportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ExportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ExportDataRequest.class, + com.google.cloud.automl.v1.ExportDataRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the dataset.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the dataset.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.automl.v1.OutputConfig outputConfig_; + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public com.google.cloud.automl.v1.OutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.automl.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public com.google.cloud.automl.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (outputConfig_ != null) { + output.writeMessage(3, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ExportDataRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ExportDataRequest other = + (com.google.cloud.automl.v1.ExportDataRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig().equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ExportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.ExportDataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.ExportData][google.cloud.automl.v1.AutoMl.ExportData].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ExportDataRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ExportDataRequest) + com.google.cloud.automl.v1.ExportDataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ExportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ExportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ExportDataRequest.class, + com.google.cloud.automl.v1.ExportDataRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ExportDataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ExportDataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ExportDataRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ExportDataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ExportDataRequest build() { + com.google.cloud.automl.v1.ExportDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ExportDataRequest buildPartial() { + com.google.cloud.automl.v1.ExportDataRequest result = + new com.google.cloud.automl.v1.ExportDataRequest(this); + result.name_ = name_; + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ExportDataRequest) { + return mergeFrom((com.google.cloud.automl.v1.ExportDataRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ExportDataRequest other) { + if (other == com.google.cloud.automl.v1.ExportDataRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ExportDataRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.ExportDataRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the dataset.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the dataset.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the dataset.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the dataset.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the dataset.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.automl.v1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.OutputConfig, + com.google.cloud.automl.v1.OutputConfig.Builder, + com.google.cloud.automl.v1.OutputConfigOrBuilder> + outputConfigBuilder_; + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public com.google.cloud.automl.v1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.automl.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public Builder setOutputConfig(com.google.cloud.automl.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public Builder setOutputConfig( + com.google.cloud.automl.v1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public Builder mergeOutputConfig(com.google.cloud.automl.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.automl.v1.OutputConfig.newBuilder(outputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public com.google.cloud.automl.v1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + public com.google.cloud.automl.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.automl.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.OutputConfig, + com.google.cloud.automl.v1.OutputConfig.Builder, + com.google.cloud.automl.v1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.OutputConfig, + com.google.cloud.automl.v1.OutputConfig.Builder, + com.google.cloud.automl.v1.OutputConfigOrBuilder>( + getOutputConfig(), getParentForChildren(), isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ExportDataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ExportDataRequest) + private static final com.google.cloud.automl.v1.ExportDataRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ExportDataRequest(); + } + + public static com.google.cloud.automl.v1.ExportDataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDataRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ExportDataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequestOrBuilder.java new file mode 100644 index 000000000..664130fc9 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequestOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface ExportDataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ExportDataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the dataset.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the dataset.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + boolean hasOutputConfig(); + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + com.google.cloud.automl.v1.OutputConfig getOutputConfig(); + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * .google.cloud.automl.v1.OutputConfig output_config = 3; + */ + com.google.cloud.automl.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestination.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestination.java new file mode 100644 index 000000000..39a56bef1 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestination.java @@ -0,0 +1,646 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/io.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * The Google Cloud Storage location where the output is to be written to.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GcsDestination} + */ +public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.GcsDestination) + GcsDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsDestination() { + outputUriPrefix_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputUriPrefix_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GcsDestination.class, + com.google.cloud.automl.v1.GcsDestination.Builder.class); + } + + public static final int OUTPUT_URI_PREFIX_FIELD_NUMBER = 1; + private volatile java.lang.Object outputUriPrefix_; + /** + * + * + *
+   * Required. Google Cloud Storage URI to output directory, up to 2000
+   * characters long.
+   * Accepted forms:
+   * * Prefix path: gs://bucket/directory
+   * The requesting user must have write permission to the bucket.
+   * The directory is created if it doesn't exist.
+   * 
+ * + * string output_uri_prefix = 1; + */ + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUriPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Google Cloud Storage URI to output directory, up to 2000
+   * characters long.
+   * Accepted forms:
+   * * Prefix path: gs://bucket/directory
+   * The requesting user must have write permission to the bucket.
+   * The directory is created if it doesn't exist.
+   * 
+ * + * string output_uri_prefix = 1; + */ + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getOutputUriPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUriPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOutputUriPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUriPrefix_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.GcsDestination other = + (com.google.cloud.automl.v1.GcsDestination) obj; + + if (!getOutputUriPrefix().equals(other.getOutputUriPrefix())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUTPUT_URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getOutputUriPrefix().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GcsDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.GcsDestination) + com.google.cloud.automl.v1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GcsDestination.class, + com.google.cloud.automl.v1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + outputUriPrefix_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.automl.v1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.GcsDestination build() { + com.google.cloud.automl.v1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GcsDestination buildPartial() { + com.google.cloud.automl.v1.GcsDestination result = + new com.google.cloud.automl.v1.GcsDestination(this); + result.outputUriPrefix_ = outputUriPrefix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.GcsDestination) { + return mergeFrom((com.google.cloud.automl.v1.GcsDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.GcsDestination other) { + if (other == com.google.cloud.automl.v1.GcsDestination.getDefaultInstance()) return this; + if (!other.getOutputUriPrefix().isEmpty()) { + outputUriPrefix_ = other.outputUriPrefix_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object outputUriPrefix_ = ""; + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory, up to 2000
+     * characters long.
+     * Accepted forms:
+     * * Prefix path: gs://bucket/directory
+     * The requesting user must have write permission to the bucket.
+     * The directory is created if it doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUriPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory, up to 2000
+     * characters long.
+     * Accepted forms:
+     * * Prefix path: gs://bucket/directory
+     * The requesting user must have write permission to the bucket.
+     * The directory is created if it doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory, up to 2000
+     * characters long.
+     * Accepted forms:
+     * * Prefix path: gs://bucket/directory
+     * The requesting user must have write permission to the bucket.
+     * The directory is created if it doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public Builder setOutputUriPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputUriPrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory, up to 2000
+     * characters long.
+     * Accepted forms:
+     * * Prefix path: gs://bucket/directory
+     * The requesting user must have write permission to the bucket.
+     * The directory is created if it doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public Builder clearOutputUriPrefix() { + + outputUriPrefix_ = getDefaultInstance().getOutputUriPrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory, up to 2000
+     * characters long.
+     * Accepted forms:
+     * * Prefix path: gs://bucket/directory
+     * The requesting user must have write permission to the bucket.
+     * The directory is created if it doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public Builder setOutputUriPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputUriPrefix_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.GcsDestination) + private static final com.google.cloud.automl.v1.GcsDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.GcsDestination(); + } + + public static com.google.cloud.automl.v1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestinationOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000..b09adc6b1 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestinationOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/io.proto + +package com.google.cloud.automl.v1; + +public interface GcsDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Google Cloud Storage URI to output directory, up to 2000
+   * characters long.
+   * Accepted forms:
+   * * Prefix path: gs://bucket/directory
+   * The requesting user must have write permission to the bucket.
+   * The directory is created if it doesn't exist.
+   * 
+ * + * string output_uri_prefix = 1; + */ + java.lang.String getOutputUriPrefix(); + /** + * + * + *
+   * Required. Google Cloud Storage URI to output directory, up to 2000
+   * characters long.
+   * Accepted forms:
+   * * Prefix path: gs://bucket/directory
+   * The requesting user must have write permission to the bucket.
+   * The directory is created if it doesn't exist.
+   * 
+ * + * string output_uri_prefix = 1; + */ + com.google.protobuf.ByteString getOutputUriPrefixBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsSource.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsSource.java new file mode 100644 index 000000000..2d1bd829f --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsSource.java @@ -0,0 +1,717 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/io.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * The Google Cloud Storage location for the input content.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GcsSource} + */ +public final class GcsSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.GcsSource) + GcsSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsSource() { + inputUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inputUris_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + inputUris_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + inputUris_ = inputUris_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GcsSource.class, + com.google.cloud.automl.v1.GcsSource.Builder.class); + } + + public static final int INPUT_URIS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList inputUris_; + /** + * + * + *
+   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+   * long. Accepted forms:
+   * * Full object path, e.g. gs://bucket/directory/object.csv
+   * 
+ * + * repeated string input_uris = 1; + */ + public com.google.protobuf.ProtocolStringList getInputUrisList() { + return inputUris_; + } + /** + * + * + *
+   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+   * long. Accepted forms:
+   * * Full object path, e.g. gs://bucket/directory/object.csv
+   * 
+ * + * repeated string input_uris = 1; + */ + public int getInputUrisCount() { + return inputUris_.size(); + } + /** + * + * + *
+   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+   * long. Accepted forms:
+   * * Full object path, e.g. gs://bucket/directory/object.csv
+   * 
+ * + * repeated string input_uris = 1; + */ + public java.lang.String getInputUris(int index) { + return inputUris_.get(index); + } + /** + * + * + *
+   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+   * long. Accepted forms:
+   * * Full object path, e.g. gs://bucket/directory/object.csv
+   * 
+ * + * repeated string input_uris = 1; + */ + public com.google.protobuf.ByteString getInputUrisBytes(int index) { + return inputUris_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < inputUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUris_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < inputUris_.size(); i++) { + dataSize += computeStringSizeNoTag(inputUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getInputUrisList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.GcsSource)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.GcsSource other = (com.google.cloud.automl.v1.GcsSource) obj; + + if (!getInputUrisList().equals(other.getInputUrisList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInputUrisCount() > 0) { + hash = (37 * hash) + INPUT_URIS_FIELD_NUMBER; + hash = (53 * hash) + getInputUrisList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GcsSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.GcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GcsSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.GcsSource) + com.google.cloud.automl.v1.GcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GcsSource.class, + com.google.cloud.automl.v1.GcsSource.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.GcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + inputUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_GcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GcsSource getDefaultInstanceForType() { + return com.google.cloud.automl.v1.GcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.GcsSource build() { + com.google.cloud.automl.v1.GcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GcsSource buildPartial() { + com.google.cloud.automl.v1.GcsSource result = new com.google.cloud.automl.v1.GcsSource(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + inputUris_ = inputUris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.inputUris_ = inputUris_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.GcsSource) { + return mergeFrom((com.google.cloud.automl.v1.GcsSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.GcsSource other) { + if (other == com.google.cloud.automl.v1.GcsSource.getDefaultInstance()) return this; + if (!other.inputUris_.isEmpty()) { + if (inputUris_.isEmpty()) { + inputUris_ = other.inputUris_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInputUrisIsMutable(); + inputUris_.addAll(other.inputUris_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.GcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.GcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList inputUris_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInputUrisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + inputUris_ = new com.google.protobuf.LazyStringArrayList(inputUris_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+     * long. Accepted forms:
+     * * Full object path, e.g. gs://bucket/directory/object.csv
+     * 
+ * + * repeated string input_uris = 1; + */ + public com.google.protobuf.ProtocolStringList getInputUrisList() { + return inputUris_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+     * long. Accepted forms:
+     * * Full object path, e.g. gs://bucket/directory/object.csv
+     * 
+ * + * repeated string input_uris = 1; + */ + public int getInputUrisCount() { + return inputUris_.size(); + } + /** + * + * + *
+     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+     * long. Accepted forms:
+     * * Full object path, e.g. gs://bucket/directory/object.csv
+     * 
+ * + * repeated string input_uris = 1; + */ + public java.lang.String getInputUris(int index) { + return inputUris_.get(index); + } + /** + * + * + *
+     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+     * long. Accepted forms:
+     * * Full object path, e.g. gs://bucket/directory/object.csv
+     * 
+ * + * repeated string input_uris = 1; + */ + public com.google.protobuf.ByteString getInputUrisBytes(int index) { + return inputUris_.getByteString(index); + } + /** + * + * + *
+     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+     * long. Accepted forms:
+     * * Full object path, e.g. gs://bucket/directory/object.csv
+     * 
+ * + * repeated string input_uris = 1; + */ + public Builder setInputUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputUrisIsMutable(); + inputUris_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+     * long. Accepted forms:
+     * * Full object path, e.g. gs://bucket/directory/object.csv
+     * 
+ * + * repeated string input_uris = 1; + */ + public Builder addInputUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputUrisIsMutable(); + inputUris_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+     * long. Accepted forms:
+     * * Full object path, e.g. gs://bucket/directory/object.csv
+     * 
+ * + * repeated string input_uris = 1; + */ + public Builder addAllInputUris(java.lang.Iterable values) { + ensureInputUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputUris_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+     * long. Accepted forms:
+     * * Full object path, e.g. gs://bucket/directory/object.csv
+     * 
+ * + * repeated string input_uris = 1; + */ + public Builder clearInputUris() { + inputUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+     * long. Accepted forms:
+     * * Full object path, e.g. gs://bucket/directory/object.csv
+     * 
+ * + * repeated string input_uris = 1; + */ + public Builder addInputUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInputUrisIsMutable(); + inputUris_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.GcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.GcsSource) + private static final com.google.cloud.automl.v1.GcsSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.GcsSource(); + } + + public static com.google.cloud.automl.v1.GcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsSourceOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsSourceOrBuilder.java new file mode 100644 index 000000000..9861792ca --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsSourceOrBuilder.java @@ -0,0 +1,74 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/io.proto + +package com.google.cloud.automl.v1; + +public interface GcsSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.GcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+   * long. Accepted forms:
+   * * Full object path, e.g. gs://bucket/directory/object.csv
+   * 
+ * + * repeated string input_uris = 1; + */ + java.util.List getInputUrisList(); + /** + * + * + *
+   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+   * long. Accepted forms:
+   * * Full object path, e.g. gs://bucket/directory/object.csv
+   * 
+ * + * repeated string input_uris = 1; + */ + int getInputUrisCount(); + /** + * + * + *
+   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+   * long. Accepted forms:
+   * * Full object path, e.g. gs://bucket/directory/object.csv
+   * 
+ * + * repeated string input_uris = 1; + */ + java.lang.String getInputUris(int index); + /** + * + * + *
+   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
+   * long. Accepted forms:
+   * * Full object path, e.g. gs://bucket/directory/object.csv
+   * 
+ * + * repeated string input_uris = 1; + */ + com.google.protobuf.ByteString getInputUrisBytes(int index); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequest.java new file mode 100644 index 000000000..aa2677ffe --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequest.java @@ -0,0 +1,611 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.GetDataset][google.cloud.automl.v1.AutoMl.GetDataset].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GetDatasetRequest} + */ +public final class GetDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.GetDatasetRequest) + GetDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDatasetRequest.newBuilder() to construct. + private GetDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDatasetRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GetDatasetRequest.class, + com.google.cloud.automl.v1.GetDatasetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the dataset to retrieve.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the dataset to retrieve.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.GetDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.GetDatasetRequest other = + (com.google.cloud.automl.v1.GetDatasetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.GetDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.GetDataset][google.cloud.automl.v1.AutoMl.GetDataset].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GetDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.GetDatasetRequest) + com.google.cloud.automl.v1.GetDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GetDatasetRequest.class, + com.google.cloud.automl.v1.GetDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.GetDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.GetDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetDatasetRequest build() { + com.google.cloud.automl.v1.GetDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetDatasetRequest buildPartial() { + com.google.cloud.automl.v1.GetDatasetRequest result = + new com.google.cloud.automl.v1.GetDatasetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.GetDatasetRequest) { + return mergeFrom((com.google.cloud.automl.v1.GetDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.GetDatasetRequest other) { + if (other == com.google.cloud.automl.v1.GetDatasetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.GetDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.GetDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the dataset to retrieve.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the dataset to retrieve.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the dataset to retrieve.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the dataset to retrieve.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the dataset to retrieve.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.GetDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.GetDatasetRequest) + private static final com.google.cloud.automl.v1.GetDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.GetDatasetRequest(); + } + + public static com.google.cloud.automl.v1.GetDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequestOrBuilder.java new file mode 100644 index 000000000..c9074aa8d --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequestOrBuilder.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface GetDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.GetDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the dataset to retrieve.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the dataset to retrieve.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequest.java new file mode 100644 index 000000000..f7a2f1467 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequest.java @@ -0,0 +1,613 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1.AutoMl.GetModelEvaluation].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GetModelEvaluationRequest} + */ +public final class GetModelEvaluationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.GetModelEvaluationRequest) + GetModelEvaluationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetModelEvaluationRequest.newBuilder() to construct. + private GetModelEvaluationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetModelEvaluationRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetModelEvaluationRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelEvaluationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelEvaluationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GetModelEvaluationRequest.class, + com.google.cloud.automl.v1.GetModelEvaluationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name for the model evaluation.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name for the model evaluation.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.GetModelEvaluationRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.GetModelEvaluationRequest other = + (com.google.cloud.automl.v1.GetModelEvaluationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.GetModelEvaluationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1.AutoMl.GetModelEvaluation].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GetModelEvaluationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.GetModelEvaluationRequest) + com.google.cloud.automl.v1.GetModelEvaluationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelEvaluationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelEvaluationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GetModelEvaluationRequest.class, + com.google.cloud.automl.v1.GetModelEvaluationRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.GetModelEvaluationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelEvaluationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetModelEvaluationRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.GetModelEvaluationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetModelEvaluationRequest build() { + com.google.cloud.automl.v1.GetModelEvaluationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetModelEvaluationRequest buildPartial() { + com.google.cloud.automl.v1.GetModelEvaluationRequest result = + new com.google.cloud.automl.v1.GetModelEvaluationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.GetModelEvaluationRequest) { + return mergeFrom((com.google.cloud.automl.v1.GetModelEvaluationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.GetModelEvaluationRequest other) { + if (other == com.google.cloud.automl.v1.GetModelEvaluationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.GetModelEvaluationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.automl.v1.GetModelEvaluationRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name for the model evaluation.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name for the model evaluation.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name for the model evaluation.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for the model evaluation.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for the model evaluation.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.GetModelEvaluationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.GetModelEvaluationRequest) + private static final com.google.cloud.automl.v1.GetModelEvaluationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.GetModelEvaluationRequest(); + } + + public static com.google.cloud.automl.v1.GetModelEvaluationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetModelEvaluationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelEvaluationRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetModelEvaluationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequestOrBuilder.java new file mode 100644 index 000000000..403eec7f6 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequestOrBuilder.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface GetModelEvaluationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.GetModelEvaluationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name for the model evaluation.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name for the model evaluation.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequest.java new file mode 100644 index 000000000..4910d68ab --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequest.java @@ -0,0 +1,611 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.GetModel][google.cloud.automl.v1.AutoMl.GetModel].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GetModelRequest} + */ +public final class GetModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.GetModelRequest) + GetModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetModelRequest.newBuilder() to construct. + private GetModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetModelRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GetModelRequest.class, + com.google.cloud.automl.v1.GetModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name of the model.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the model.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.GetModelRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.GetModelRequest other = + (com.google.cloud.automl.v1.GetModelRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.GetModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.GetModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.GetModel][google.cloud.automl.v1.AutoMl.GetModel].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.GetModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.GetModelRequest) + com.google.cloud.automl.v1.GetModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.GetModelRequest.class, + com.google.cloud.automl.v1.GetModelRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.GetModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_GetModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetModelRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.GetModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetModelRequest build() { + com.google.cloud.automl.v1.GetModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetModelRequest buildPartial() { + com.google.cloud.automl.v1.GetModelRequest result = + new com.google.cloud.automl.v1.GetModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.GetModelRequest) { + return mergeFrom((com.google.cloud.automl.v1.GetModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.GetModelRequest other) { + if (other == com.google.cloud.automl.v1.GetModelRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.GetModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.GetModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of the model.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the model.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the model.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the model.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the model.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.GetModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.GetModelRequest) + private static final com.google.cloud.automl.v1.GetModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.GetModelRequest(); + } + + public static com.google.cloud.automl.v1.GetModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.GetModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequestOrBuilder.java new file mode 100644 index 000000000..90f79be17 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequestOrBuilder.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface GetModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.GetModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the model.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of the model.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequest.java new file mode 100644 index 000000000..637e8a053 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequest.java @@ -0,0 +1,896 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ImportDataRequest} + */ +public final class ImportDataRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ImportDataRequest) + ImportDataRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDataRequest.newBuilder() to construct. + private ImportDataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDataRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDataRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + com.google.cloud.automl.v1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = + input.readMessage( + com.google.cloud.automl.v1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ImportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ImportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ImportDataRequest.class, + com.google.cloud.automl.v1.ImportDataRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Dataset name. Dataset must already exist. All imported
+   * annotations and examples will be added.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Dataset name. Dataset must already exist. All imported
+   * annotations and examples will be added.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.automl.v1.InputConfig inputConfig_; + /** + * + * + *
+   * Required. The desired input location and its domain specific semantics,
+   * if any.
+   * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + * + * + *
+   * Required. The desired input location and its domain specific semantics,
+   * if any.
+   * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public com.google.cloud.automl.v1.InputConfig getInputConfig() { + return inputConfig_ == null + ? com.google.cloud.automl.v1.InputConfig.getDefaultInstance() + : inputConfig_; + } + /** + * + * + *
+   * Required. The desired input location and its domain specific semantics,
+   * if any.
+   * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public com.google.cloud.automl.v1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (inputConfig_ != null) { + output.writeMessage(3, getInputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ImportDataRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ImportDataRequest other = + (com.google.cloud.automl.v1.ImportDataRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig().equals(other.getInputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ImportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.ImportDataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ImportDataRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ImportDataRequest) + com.google.cloud.automl.v1.ImportDataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ImportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ImportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ImportDataRequest.class, + com.google.cloud.automl.v1.ImportDataRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ImportDataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ImportDataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ImportDataRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ImportDataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ImportDataRequest build() { + com.google.cloud.automl.v1.ImportDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ImportDataRequest buildPartial() { + com.google.cloud.automl.v1.ImportDataRequest result = + new com.google.cloud.automl.v1.ImportDataRequest(this); + result.name_ = name_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ImportDataRequest) { + return mergeFrom((com.google.cloud.automl.v1.ImportDataRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ImportDataRequest other) { + if (other == com.google.cloud.automl.v1.ImportDataRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ImportDataRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.ImportDataRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Dataset name. Dataset must already exist. All imported
+     * annotations and examples will be added.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Dataset name. Dataset must already exist. All imported
+     * annotations and examples will be added.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Dataset name. Dataset must already exist. All imported
+     * annotations and examples will be added.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset name. Dataset must already exist. All imported
+     * annotations and examples will be added.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset name. Dataset must already exist. All imported
+     * annotations and examples will be added.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.automl.v1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.InputConfig, + com.google.cloud.automl.v1.InputConfig.Builder, + com.google.cloud.automl.v1.InputConfigOrBuilder> + inputConfigBuilder_; + /** + * + * + *
+     * Required. The desired input location and its domain specific semantics,
+     * if any.
+     * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + * + * + *
+     * Required. The desired input location and its domain specific semantics,
+     * if any.
+     * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public com.google.cloud.automl.v1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null + ? com.google.cloud.automl.v1.InputConfig.getDefaultInstance() + : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The desired input location and its domain specific semantics,
+     * if any.
+     * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public Builder setInputConfig(com.google.cloud.automl.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired input location and its domain specific semantics,
+     * if any.
+     * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public Builder setInputConfig(com.google.cloud.automl.v1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The desired input location and its domain specific semantics,
+     * if any.
+     * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public Builder mergeInputConfig(com.google.cloud.automl.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.automl.v1.InputConfig.newBuilder(inputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired input location and its domain specific semantics,
+     * if any.
+     * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The desired input location and its domain specific semantics,
+     * if any.
+     * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public com.google.cloud.automl.v1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The desired input location and its domain specific semantics,
+     * if any.
+     * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + public com.google.cloud.automl.v1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null + ? com.google.cloud.automl.v1.InputConfig.getDefaultInstance() + : inputConfig_; + } + } + /** + * + * + *
+     * Required. The desired input location and its domain specific semantics,
+     * if any.
+     * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.InputConfig, + com.google.cloud.automl.v1.InputConfig.Builder, + com.google.cloud.automl.v1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.InputConfig, + com.google.cloud.automl.v1.InputConfig.Builder, + com.google.cloud.automl.v1.InputConfigOrBuilder>( + getInputConfig(), getParentForChildren(), isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ImportDataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ImportDataRequest) + private static final com.google.cloud.automl.v1.ImportDataRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ImportDataRequest(); + } + + public static com.google.cloud.automl.v1.ImportDataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDataRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ImportDataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequestOrBuilder.java new file mode 100644 index 000000000..90478564e --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequestOrBuilder.java @@ -0,0 +1,82 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface ImportDataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ImportDataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Dataset name. Dataset must already exist. All imported
+   * annotations and examples will be added.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Dataset name. Dataset must already exist. All imported
+   * annotations and examples will be added.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The desired input location and its domain specific semantics,
+   * if any.
+   * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + boolean hasInputConfig(); + /** + * + * + *
+   * Required. The desired input location and its domain specific semantics,
+   * if any.
+   * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + com.google.cloud.automl.v1.InputConfig getInputConfig(); + /** + * + * + *
+   * Required. The desired input location and its domain specific semantics,
+   * if any.
+   * 
+ * + * .google.cloud.automl.v1.InputConfig input_config = 3; + */ + com.google.cloud.automl.v1.InputConfigOrBuilder getInputConfigOrBuilder(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfig.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfig.java new file mode 100644 index 000000000..76b8f0b50 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfig.java @@ -0,0 +1,1197 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/io.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Input configuration for ImportData Action.
+ * The format of input depends on dataset_metadata the Dataset into which
+ * the import is happening has. As input source the
+ * [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
+ * is expected, unless specified otherwise. Additionally any input .CSV file
+ * by itself must be 100MB or smaller, unless specified otherwise.
+ * If an "example" file (that is, image, video etc.) with identical content
+ * (even if it had different GCS_FILE_PATH) is mentioned multiple times, then
+ * its label, bounding boxes etc. are appended. The same file should be always
+ * provided with the same ML_USE and GCS_FILE_PATH, if it is not, then
+ * these values are nondeterministically selected from the given ones.
+ *  Errors:
+ *  If any of the provided CSV files can't be parsed or if more than certain
+ *  percent of CSV rows cannot be processed then the operation fails and
+ *  nothing is imported. Regardless of overall success or failure the per-row
+ *  failures, up to a certain count cap, is listed in
+ *  Operation.metadata.partial_failures.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.InputConfig} + */ +public final class InputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.InputConfig) + InputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputConfig.newBuilder() to construct. + private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InputConfig() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.automl.v1.GcsSource.Builder subBuilder = null; + if (sourceCase_ == 1) { + subBuilder = ((com.google.cloud.automl.v1.GcsSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.automl.v1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.automl.v1.GcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + params_ = + com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry params__ = + input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + params_.getMutableMap().put(params__.getKey(), params__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_InputConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetParams(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.InputConfig.class, + com.google.cloud.automl.v1.InputConfig.Builder.class); + } + + private int bitField0_; + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase implements com.google.protobuf.Internal.EnumLite { + GCS_SOURCE(1), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return GCS_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * In ImportData, the gcs_source points to a csv with structure described in
+   * the comment.
+   * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * In ImportData, the gcs_source points to a csv with structure described in
+   * the comment.
+   * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public com.google.cloud.automl.v1.GcsSource getGcsSource() { + if (sourceCase_ == 1) { + return (com.google.cloud.automl.v1.GcsSource) source_; + } + return com.google.cloud.automl.v1.GcsSource.getDefaultInstance(); + } + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * In ImportData, the gcs_source points to a csv with structure described in
+   * the comment.
+   * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.cloud.automl.v1.GcsSource) source_; + } + return com.google.cloud.automl.v1.GcsSource.getDefaultInstance(); + } + + public static final int PARAMS_FIELD_NUMBER = 2; + + private static final class ParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_InputConfig_ParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + /** + * + * + *
+   * Additional domain-specific parameters describing the semantic of the
+   * imported data, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 2; + */ + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetParams().getMap().containsKey(key); + } + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + /** + * + * + *
+   * Additional domain-specific parameters describing the semantic of the
+   * imported data, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 2; + */ + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + /** + * + * + *
+   * Additional domain-specific parameters describing the semantic of the
+   * imported data, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 2; + */ + public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Additional domain-specific parameters describing the semantic of the
+   * imported data, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 2; + */ + public java.lang.String getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sourceCase_ == 1) { + output.writeMessage(1, (com.google.cloud.automl.v1.GcsSource) source_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.automl.v1.GcsSource) source_); + } + for (java.util.Map.Entry entry : + internalGetParams().getMap().entrySet()) { + com.google.protobuf.MapEntry params__ = + ParamsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, params__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.InputConfig)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.InputConfig other = (com.google.cloud.automl.v1.InputConfig) obj; + + if (!internalGetParams().equals(other.internalGetParams())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetParams().getMap().isEmpty()) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetParams().hashCode(); + } + switch (sourceCase_) { + case 1: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.InputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.InputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.InputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Input configuration for ImportData Action.
+   * The format of input depends on dataset_metadata the Dataset into which
+   * the import is happening has. As input source the
+   * [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
+   * is expected, unless specified otherwise. Additionally any input .CSV file
+   * by itself must be 100MB or smaller, unless specified otherwise.
+   * If an "example" file (that is, image, video etc.) with identical content
+   * (even if it had different GCS_FILE_PATH) is mentioned multiple times, then
+   * its label, bounding boxes etc. are appended. The same file should be always
+   * provided with the same ML_USE and GCS_FILE_PATH, if it is not, then
+   * these values are nondeterministically selected from the given ones.
+   *  Errors:
+   *  If any of the provided CSV files can't be parsed or if more than certain
+   *  percent of CSV rows cannot be processed then the operation fails and
+   *  nothing is imported. Regardless of overall success or failure the per-row
+   *  failures, up to a certain count cap, is listed in
+   *  Operation.metadata.partial_failures.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.InputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.InputConfig) + com.google.cloud.automl.v1.InputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_InputConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetParams(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableParams(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.InputConfig.class, + com.google.cloud.automl.v1.InputConfig.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.InputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableParams().clear(); + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_InputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.InputConfig getDefaultInstanceForType() { + return com.google.cloud.automl.v1.InputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.InputConfig build() { + com.google.cloud.automl.v1.InputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.InputConfig buildPartial() { + com.google.cloud.automl.v1.InputConfig result = + new com.google.cloud.automl.v1.InputConfig(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (sourceCase_ == 1) { + if (gcsSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = gcsSourceBuilder_.build(); + } + } + result.params_ = internalGetParams(); + result.params_.makeImmutable(); + result.bitField0_ = to_bitField0_; + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.InputConfig) { + return mergeFrom((com.google.cloud.automl.v1.InputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.InputConfig other) { + if (other == com.google.cloud.automl.v1.InputConfig.getDefaultInstance()) return this; + internalGetMutableParams().mergeFrom(other.internalGetParams()); + switch (other.getSourceCase()) { + case GCS_SOURCE: + { + mergeGcsSource(other.getGcsSource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.InputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.InputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.GcsSource, + com.google.cloud.automl.v1.GcsSource.Builder, + com.google.cloud.automl.v1.GcsSourceOrBuilder> + gcsSourceBuilder_; + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * In ImportData, the gcs_source points to a csv with structure described in
+     * the comment.
+     * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * In ImportData, the gcs_source points to a csv with structure described in
+     * the comment.
+     * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public com.google.cloud.automl.v1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.cloud.automl.v1.GcsSource) source_; + } + return com.google.cloud.automl.v1.GcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.automl.v1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * In ImportData, the gcs_source points to a csv with structure described in
+     * the comment.
+     * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.automl.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * In ImportData, the gcs_source points to a csv with structure described in
+     * the comment.
+     * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.automl.v1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * In ImportData, the gcs_source points to a csv with structure described in
+     * the comment.
+     * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.automl.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1 + && source_ != com.google.cloud.automl.v1.GcsSource.getDefaultInstance()) { + source_ = + com.google.cloud.automl.v1.GcsSource.newBuilder( + (com.google.cloud.automl.v1.GcsSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + gcsSourceBuilder_.mergeFrom(value); + } + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * In ImportData, the gcs_source points to a csv with structure described in
+     * the comment.
+     * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * In ImportData, the gcs_source points to a csv with structure described in
+     * the comment.
+     * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public com.google.cloud.automl.v1.GcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * In ImportData, the gcs_source points to a csv with structure described in
+     * the comment.
+     * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.cloud.automl.v1.GcsSource) source_; + } + return com.google.cloud.automl.v1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * In ImportData, the gcs_source points to a csv with structure described in
+     * the comment.
+     * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.GcsSource, + com.google.cloud.automl.v1.GcsSource.Builder, + com.google.cloud.automl.v1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = com.google.cloud.automl.v1.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.GcsSource, + com.google.cloud.automl.v1.GcsSource.Builder, + com.google.cloud.automl.v1.GcsSourceOrBuilder>( + (com.google.cloud.automl.v1.GcsSource) source_, getParentForChildren(), isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged(); + ; + return gcsSourceBuilder_; + } + + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + private com.google.protobuf.MapField + internalGetMutableParams() { + onChanged(); + ; + if (params_ == null) { + params_ = com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); + } + if (!params_.isMutable()) { + params_ = params_.copy(); + } + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + /** + * + * + *
+     * Additional domain-specific parameters describing the semantic of the
+     * imported data, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 2; + */ + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetParams().getMap().containsKey(key); + } + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + /** + * + * + *
+     * Additional domain-specific parameters describing the semantic of the
+     * imported data, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 2; + */ + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + /** + * + * + *
+     * Additional domain-specific parameters describing the semantic of the
+     * imported data, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 2; + */ + public java.lang.String getParamsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Additional domain-specific parameters describing the semantic of the
+     * imported data, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 2; + */ + public java.lang.String getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearParams() { + internalGetMutableParams().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Additional domain-specific parameters describing the semantic of the
+     * imported data, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 2; + */ + public Builder removeParams(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableParams().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableParams() { + return internalGetMutableParams().getMutableMap(); + } + /** + * + * + *
+     * Additional domain-specific parameters describing the semantic of the
+     * imported data, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 2; + */ + public Builder putParams(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableParams().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Additional domain-specific parameters describing the semantic of the
+     * imported data, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 2; + */ + public Builder putAllParams(java.util.Map values) { + internalGetMutableParams().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.InputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.InputConfig) + private static final com.google.cloud.automl.v1.InputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.InputConfig(); + } + + public static com.google.cloud.automl.v1.InputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.InputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfigOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfigOrBuilder.java new file mode 100644 index 000000000..cf38adeaf --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfigOrBuilder.java @@ -0,0 +1,128 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/io.proto + +package com.google.cloud.automl.v1; + +public interface InputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.InputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * In ImportData, the gcs_source points to a csv with structure described in
+   * the comment.
+   * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + boolean hasGcsSource(); + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * In ImportData, the gcs_source points to a csv with structure described in
+   * the comment.
+   * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + com.google.cloud.automl.v1.GcsSource getGcsSource(); + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * In ImportData, the gcs_source points to a csv with structure described in
+   * the comment.
+   * 
+ * + * .google.cloud.automl.v1.GcsSource gcs_source = 1; + */ + com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + * + * + *
+   * Additional domain-specific parameters describing the semantic of the
+   * imported data, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 2; + */ + int getParamsCount(); + /** + * + * + *
+   * Additional domain-specific parameters describing the semantic of the
+   * imported data, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 2; + */ + boolean containsParams(java.lang.String key); + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getParams(); + /** + * + * + *
+   * Additional domain-specific parameters describing the semantic of the
+   * imported data, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 2; + */ + java.util.Map getParamsMap(); + /** + * + * + *
+   * Additional domain-specific parameters describing the semantic of the
+   * imported data, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 2; + */ + java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Additional domain-specific parameters describing the semantic of the
+   * imported data, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 2; + */ + java.lang.String getParamsOrThrow(java.lang.String key); + + public com.google.cloud.automl.v1.InputConfig.SourceCase getSourceCase(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Io.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Io.java new file mode 100644 index 000000000..0f6b74819 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Io.java @@ -0,0 +1,134 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/io.proto + +package com.google.cloud.automl.v1; + +public final class Io { + private Io() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_InputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_InputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_InputConfig_ParamsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_InputConfig_ParamsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_OutputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_GcsSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_GcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_GcsDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_GcsDestination_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\037google/cloud/automl/v1/io.proto\022\026googl" + + "e.cloud.automl.v1\032\034google/api/annotation" + + "s.proto\"\300\001\n\013InputConfig\0227\n\ngcs_source\030\001 " + + "\001(\0132!.google.cloud.automl.v1.GcsSourceH\000" + + "\022?\n\006params\030\002 \003(\0132/.google.cloud.automl.v" + + "1.InputConfig.ParamsEntry\032-\n\013ParamsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\010\n\006sour" + + "ce\"`\n\014OutputConfig\022A\n\017gcs_destination\030\001 " + + "\001(\0132&.google.cloud.automl.v1.GcsDestinat" + + "ionH\000B\r\n\013destination\"\037\n\tGcsSource\022\022\n\ninp" + + "ut_uris\030\001 \003(\t\"+\n\016GcsDestination\022\031\n\021outpu" + + "t_uri_prefix\030\001 \001(\tB\252\001\n\032com.google.cloud." + + "automl.v1P\001Z + * Request message for [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets]. + * + * + * Protobuf type {@code google.cloud.automl.v1.ListDatasetsRequest} + */ +public final class ListDatasetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ListDatasetsRequest) + ListDatasetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDatasetsRequest.newBuilder() to construct. + private ListDatasetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDatasetsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDatasetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListDatasetsRequest.class, + com.google.cloud.automl.v1.ListDatasetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The resource name of the project from which to list datasets.
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the project from which to list datasets.
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 3; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `dataset_metadata` - for existence of the case (e.g.
+   *             image_classification_dataset_metadata:*).
+   * Some examples of using the filter are:
+   *   * `translation_dataset_metadata:*` --> The dataset has
+   *                                          translation_dataset_metadata.
+   * 
+ * + * string filter = 3; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `dataset_metadata` - for existence of the case (e.g.
+   *             image_classification_dataset_metadata:*).
+   * Some examples of using the filter are:
+   *   * `translation_dataset_metadata:*` --> The dataset has
+   *                                          translation_dataset_metadata.
+   * 
+ * + * string filter = 3; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + * + * + *
+   * Requested page size. Server may return fewer results than requested.
+   * If unspecified, server will pick a default size.
+   * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 6; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A token identifying a page of results for the server to return
+   * Typically obtained via
+   * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous
+   * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call.
+   * 
+ * + * string page_token = 6; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results for the server to return
+   * Typically obtained via
+   * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous
+   * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call.
+   * 
+ * + * string page_token = 6; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ListDatasetsRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ListDatasetsRequest other = + (com.google.cloud.automl.v1.ListDatasetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.ListDatasetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListDatasetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ListDatasetsRequest) + com.google.cloud.automl.v1.ListDatasetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListDatasetsRequest.class, + com.google.cloud.automl.v1.ListDatasetsRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ListDatasetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListDatasetsRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ListDatasetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListDatasetsRequest build() { + com.google.cloud.automl.v1.ListDatasetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListDatasetsRequest buildPartial() { + com.google.cloud.automl.v1.ListDatasetsRequest result = + new com.google.cloud.automl.v1.ListDatasetsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ListDatasetsRequest) { + return mergeFrom((com.google.cloud.automl.v1.ListDatasetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ListDatasetsRequest other) { + if (other == com.google.cloud.automl.v1.ListDatasetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ListDatasetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.ListDatasetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The resource name of the project from which to list datasets.
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the project from which to list datasets.
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the project from which to list datasets.
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the project from which to list datasets.
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the project from which to list datasets.
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `dataset_metadata` - for existence of the case (e.g.
+     *             image_classification_dataset_metadata:*).
+     * Some examples of using the filter are:
+     *   * `translation_dataset_metadata:*` --> The dataset has
+     *                                          translation_dataset_metadata.
+     * 
+ * + * string filter = 3; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `dataset_metadata` - for existence of the case (e.g.
+     *             image_classification_dataset_metadata:*).
+     * Some examples of using the filter are:
+     *   * `translation_dataset_metadata:*` --> The dataset has
+     *                                          translation_dataset_metadata.
+     * 
+ * + * string filter = 3; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `dataset_metadata` - for existence of the case (e.g.
+     *             image_classification_dataset_metadata:*).
+     * Some examples of using the filter are:
+     *   * `translation_dataset_metadata:*` --> The dataset has
+     *                                          translation_dataset_metadata.
+     * 
+ * + * string filter = 3; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `dataset_metadata` - for existence of the case (e.g.
+     *             image_classification_dataset_metadata:*).
+     * Some examples of using the filter are:
+     *   * `translation_dataset_metadata:*` --> The dataset has
+     *                                          translation_dataset_metadata.
+     * 
+ * + * string filter = 3; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `dataset_metadata` - for existence of the case (e.g.
+     *             image_classification_dataset_metadata:*).
+     * Some examples of using the filter are:
+     *   * `translation_dataset_metadata:*` --> The dataset has
+     *                                          translation_dataset_metadata.
+     * 
+ * + * string filter = 3; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer results than requested.
+     * If unspecified, server will pick a default size.
+     * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer results than requested.
+     * If unspecified, server will pick a default size.
+     * 
+ * + * int32 page_size = 4; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer results than requested.
+     * If unspecified, server will pick a default size.
+     * 
+ * + * int32 page_size = 4; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous
+     * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call.
+     * 
+ * + * string page_token = 6; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous
+     * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call.
+     * 
+ * + * string page_token = 6; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous
+     * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call.
+     * 
+ * + * string page_token = 6; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous
+     * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call.
+     * 
+ * + * string page_token = 6; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous
+     * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call.
+     * 
+ * + * string page_token = 6; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ListDatasetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ListDatasetsRequest) + private static final com.google.cloud.automl.v1.ListDatasetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ListDatasetsRequest(); + } + + public static com.google.cloud.automl.v1.ListDatasetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatasetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDatasetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListDatasetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsRequestOrBuilder.java new file mode 100644 index 000000000..b143aea9c --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsRequestOrBuilder.java @@ -0,0 +1,116 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface ListDatasetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ListDatasetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the project from which to list datasets.
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * The resource name of the project from which to list datasets.
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `dataset_metadata` - for existence of the case (e.g.
+   *             image_classification_dataset_metadata:*).
+   * Some examples of using the filter are:
+   *   * `translation_dataset_metadata:*` --> The dataset has
+   *                                          translation_dataset_metadata.
+   * 
+ * + * string filter = 3; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `dataset_metadata` - for existence of the case (e.g.
+   *             image_classification_dataset_metadata:*).
+   * Some examples of using the filter are:
+   *   * `translation_dataset_metadata:*` --> The dataset has
+   *                                          translation_dataset_metadata.
+   * 
+ * + * string filter = 3; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer results than requested.
+   * If unspecified, server will pick a default size.
+   * 
+ * + * int32 page_size = 4; + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results for the server to return
+   * Typically obtained via
+   * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous
+   * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call.
+   * 
+ * + * string page_token = 6; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results for the server to return
+   * Typically obtained via
+   * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous
+   * [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call.
+   * 
+ * + * string page_token = 6; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponse.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponse.java new file mode 100644 index 000000000..f631d41ee --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponse.java @@ -0,0 +1,1107 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Response message for [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListDatasetsResponse} + */ +public final class ListDatasetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ListDatasetsResponse) + ListDatasetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDatasetsResponse.newBuilder() to construct. + private ListDatasetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDatasetsResponse() { + datasets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDatasetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + datasets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + datasets_.add( + input.readMessage( + com.google.cloud.automl.v1.Dataset.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + datasets_ = java.util.Collections.unmodifiableList(datasets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListDatasetsResponse.class, + com.google.cloud.automl.v1.ListDatasetsResponse.Builder.class); + } + + private int bitField0_; + public static final int DATASETS_FIELD_NUMBER = 1; + private java.util.List datasets_; + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public java.util.List getDatasetsList() { + return datasets_; + } + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public java.util.List + getDatasetsOrBuilderList() { + return datasets_; + } + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public int getDatasetsCount() { + return datasets_.size(); + } + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public com.google.cloud.automl.v1.Dataset getDatasets(int index) { + return datasets_.get(index); + } + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetsOrBuilder(int index) { + return datasets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < datasets_.size(); i++) { + output.writeMessage(1, datasets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < datasets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, datasets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ListDatasetsResponse)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ListDatasetsResponse other = + (com.google.cloud.automl.v1.ListDatasetsResponse) obj; + + if (!getDatasetsList().equals(other.getDatasetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDatasetsCount() > 0) { + hash = (37 * hash) + DATASETS_FIELD_NUMBER; + hash = (53 * hash) + getDatasetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.ListDatasetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListDatasetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ListDatasetsResponse) + com.google.cloud.automl.v1.ListDatasetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListDatasetsResponse.class, + com.google.cloud.automl.v1.ListDatasetsResponse.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ListDatasetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDatasetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (datasetsBuilder_ == null) { + datasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + datasetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListDatasetsResponse getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ListDatasetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListDatasetsResponse build() { + com.google.cloud.automl.v1.ListDatasetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListDatasetsResponse buildPartial() { + com.google.cloud.automl.v1.ListDatasetsResponse result = + new com.google.cloud.automl.v1.ListDatasetsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (datasetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + datasets_ = java.util.Collections.unmodifiableList(datasets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datasets_ = datasets_; + } else { + result.datasets_ = datasetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ListDatasetsResponse) { + return mergeFrom((com.google.cloud.automl.v1.ListDatasetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ListDatasetsResponse other) { + if (other == com.google.cloud.automl.v1.ListDatasetsResponse.getDefaultInstance()) + return this; + if (datasetsBuilder_ == null) { + if (!other.datasets_.isEmpty()) { + if (datasets_.isEmpty()) { + datasets_ = other.datasets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatasetsIsMutable(); + datasets_.addAll(other.datasets_); + } + onChanged(); + } + } else { + if (!other.datasets_.isEmpty()) { + if (datasetsBuilder_.isEmpty()) { + datasetsBuilder_.dispose(); + datasetsBuilder_ = null; + datasets_ = other.datasets_; + bitField0_ = (bitField0_ & ~0x00000001); + datasetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDatasetsFieldBuilder() + : null; + } else { + datasetsBuilder_.addAllMessages(other.datasets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ListDatasetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.ListDatasetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List datasets_ = + java.util.Collections.emptyList(); + + private void ensureDatasetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datasets_ = new java.util.ArrayList(datasets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.Dataset, + com.google.cloud.automl.v1.Dataset.Builder, + com.google.cloud.automl.v1.DatasetOrBuilder> + datasetsBuilder_; + + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public java.util.List getDatasetsList() { + if (datasetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(datasets_); + } else { + return datasetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public int getDatasetsCount() { + if (datasetsBuilder_ == null) { + return datasets_.size(); + } else { + return datasetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public com.google.cloud.automl.v1.Dataset getDatasets(int index) { + if (datasetsBuilder_ == null) { + return datasets_.get(index); + } else { + return datasetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public Builder setDatasets(int index, com.google.cloud.automl.v1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.set(index, value); + onChanged(); + } else { + datasetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public Builder setDatasets( + int index, com.google.cloud.automl.v1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.set(index, builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public Builder addDatasets(com.google.cloud.automl.v1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.add(value); + onChanged(); + } else { + datasetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public Builder addDatasets(int index, com.google.cloud.automl.v1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.add(index, value); + onChanged(); + } else { + datasetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public Builder addDatasets(com.google.cloud.automl.v1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.add(builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public Builder addDatasets( + int index, com.google.cloud.automl.v1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.add(index, builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public Builder addAllDatasets( + java.lang.Iterable values) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datasets_); + onChanged(); + } else { + datasetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public Builder clearDatasets() { + if (datasetsBuilder_ == null) { + datasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + datasetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public Builder removeDatasets(int index) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.remove(index); + onChanged(); + } else { + datasetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public com.google.cloud.automl.v1.Dataset.Builder getDatasetsBuilder(int index) { + return getDatasetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetsOrBuilder(int index) { + if (datasetsBuilder_ == null) { + return datasets_.get(index); + } else { + return datasetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public java.util.List + getDatasetsOrBuilderList() { + if (datasetsBuilder_ != null) { + return datasetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datasets_); + } + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public com.google.cloud.automl.v1.Dataset.Builder addDatasetsBuilder() { + return getDatasetsFieldBuilder() + .addBuilder(com.google.cloud.automl.v1.Dataset.getDefaultInstance()); + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public com.google.cloud.automl.v1.Dataset.Builder addDatasetsBuilder(int index) { + return getDatasetsFieldBuilder() + .addBuilder(index, com.google.cloud.automl.v1.Dataset.getDefaultInstance()); + } + /** + * + * + *
+     * The datasets read.
+     * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + public java.util.List getDatasetsBuilderList() { + return getDatasetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.Dataset, + com.google.cloud.automl.v1.Dataset.Builder, + com.google.cloud.automl.v1.DatasetOrBuilder> + getDatasetsFieldBuilder() { + if (datasetsBuilder_ == null) { + datasetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.Dataset, + com.google.cloud.automl.v1.Dataset.Builder, + com.google.cloud.automl.v1.DatasetOrBuilder>( + datasets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + datasets_ = null; + } + return datasetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ListDatasetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ListDatasetsResponse) + private static final com.google.cloud.automl.v1.ListDatasetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ListDatasetsResponse(); + } + + public static com.google.cloud.automl.v1.ListDatasetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatasetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDatasetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListDatasetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponseOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponseOrBuilder.java new file mode 100644 index 000000000..62e076385 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponseOrBuilder.java @@ -0,0 +1,99 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface ListDatasetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ListDatasetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + java.util.List getDatasetsList(); + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + com.google.cloud.automl.v1.Dataset getDatasets(int index); + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + int getDatasetsCount(); + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + java.util.List getDatasetsOrBuilderList(); + /** + * + * + *
+   * The datasets read.
+   * 
+ * + * repeated .google.cloud.automl.v1.Dataset datasets = 1; + */ + com.google.cloud.automl.v1.DatasetOrBuilder getDatasetsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequest.java new file mode 100644 index 000000000..0fc1a280a --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequest.java @@ -0,0 +1,1099 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListModelEvaluationsRequest} + */ +public final class ListModelEvaluationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ListModelEvaluationsRequest) + ListModelEvaluationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelEvaluationsRequest.newBuilder() to construct. + private ListModelEvaluationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelEvaluationsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelEvaluationsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListModelEvaluationsRequest.class, + com.google.cloud.automl.v1.ListModelEvaluationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Resource name of the model to list the model evaluations for.
+   * If modelId is set as "-", this will list model evaluations from across all
+   * models of the parent location.
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the model to list the model evaluations for.
+   * If modelId is set as "-", this will list model evaluations from across all
+   * models of the parent location.
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 3; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `annotation_spec_id` - for =, !=  or existence. See example below for
+   *                          the last.
+   * Some examples of using the filter are:
+   *   * `annotation_spec_id!=4` --> The model evaluation was done for
+   *                             annotation spec with ID different than 4.
+   *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
+   *                                aggregate of all annotation specs.
+   * 
+ * + * string filter = 3; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `annotation_spec_id` - for =, !=  or existence. See example below for
+   *                          the last.
+   * Some examples of using the filter are:
+   *   * `annotation_spec_id!=4` --> The model evaluation was done for
+   *                             annotation spec with ID different than 4.
+   *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
+   *                                aggregate of all annotation specs.
+   * 
+ * + * string filter = 3; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + * + * + *
+   * Requested page size.
+   * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 6; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A token identifying a page of results for the server to return.
+   * Typically obtained via
+   * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call.
+   * 
+ * + * string page_token = 6; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results for the server to return.
+   * Typically obtained via
+   * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call.
+   * 
+ * + * string page_token = 6; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ListModelEvaluationsRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ListModelEvaluationsRequest other = + (com.google.cloud.automl.v1.ListModelEvaluationsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.automl.v1.ListModelEvaluationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListModelEvaluationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ListModelEvaluationsRequest) + com.google.cloud.automl.v1.ListModelEvaluationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListModelEvaluationsRequest.class, + com.google.cloud.automl.v1.ListModelEvaluationsRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ListModelEvaluationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelEvaluationsRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ListModelEvaluationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelEvaluationsRequest build() { + com.google.cloud.automl.v1.ListModelEvaluationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelEvaluationsRequest buildPartial() { + com.google.cloud.automl.v1.ListModelEvaluationsRequest result = + new com.google.cloud.automl.v1.ListModelEvaluationsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ListModelEvaluationsRequest) { + return mergeFrom((com.google.cloud.automl.v1.ListModelEvaluationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ListModelEvaluationsRequest other) { + if (other == com.google.cloud.automl.v1.ListModelEvaluationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ListModelEvaluationsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.automl.v1.ListModelEvaluationsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Resource name of the model to list the model evaluations for.
+     * If modelId is set as "-", this will list model evaluations from across all
+     * models of the parent location.
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the model to list the model evaluations for.
+     * If modelId is set as "-", this will list model evaluations from across all
+     * models of the parent location.
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the model to list the model evaluations for.
+     * If modelId is set as "-", this will list model evaluations from across all
+     * models of the parent location.
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the model to list the model evaluations for.
+     * If modelId is set as "-", this will list model evaluations from across all
+     * models of the parent location.
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the model to list the model evaluations for.
+     * If modelId is set as "-", this will list model evaluations from across all
+     * models of the parent location.
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
+     *                          the last.
+     * Some examples of using the filter are:
+     *   * `annotation_spec_id!=4` --> The model evaluation was done for
+     *                             annotation spec with ID different than 4.
+     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
+     *                                aggregate of all annotation specs.
+     * 
+ * + * string filter = 3; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
+     *                          the last.
+     * Some examples of using the filter are:
+     *   * `annotation_spec_id!=4` --> The model evaluation was done for
+     *                             annotation spec with ID different than 4.
+     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
+     *                                aggregate of all annotation specs.
+     * 
+ * + * string filter = 3; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
+     *                          the last.
+     * Some examples of using the filter are:
+     *   * `annotation_spec_id!=4` --> The model evaluation was done for
+     *                             annotation spec with ID different than 4.
+     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
+     *                                aggregate of all annotation specs.
+     * 
+ * + * string filter = 3; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
+     *                          the last.
+     * Some examples of using the filter are:
+     *   * `annotation_spec_id!=4` --> The model evaluation was done for
+     *                             annotation spec with ID different than 4.
+     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
+     *                                aggregate of all annotation specs.
+     * 
+ * + * string filter = 3; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
+     *                          the last.
+     * Some examples of using the filter are:
+     *   * `annotation_spec_id!=4` --> The model evaluation was done for
+     *                             annotation spec with ID different than 4.
+     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
+     *                                aggregate of all annotation specs.
+     * 
+ * + * string filter = 3; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size.
+     * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size.
+     * 
+ * + * int32 page_size = 4; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size.
+     * 
+ * + * int32 page_size = 4; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 6; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 6; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 6; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 6; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 6; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ListModelEvaluationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ListModelEvaluationsRequest) + private static final com.google.cloud.automl.v1.ListModelEvaluationsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ListModelEvaluationsRequest(); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelEvaluationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelEvaluationsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelEvaluationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequestOrBuilder.java new file mode 100644 index 000000000..df0eced6f --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface ListModelEvaluationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ListModelEvaluationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the model to list the model evaluations for.
+   * If modelId is set as "-", this will list model evaluations from across all
+   * models of the parent location.
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Resource name of the model to list the model evaluations for.
+   * If modelId is set as "-", this will list model evaluations from across all
+   * models of the parent location.
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `annotation_spec_id` - for =, !=  or existence. See example below for
+   *                          the last.
+   * Some examples of using the filter are:
+   *   * `annotation_spec_id!=4` --> The model evaluation was done for
+   *                             annotation spec with ID different than 4.
+   *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
+   *                                aggregate of all annotation specs.
+   * 
+ * + * string filter = 3; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `annotation_spec_id` - for =, !=  or existence. See example below for
+   *                          the last.
+   * Some examples of using the filter are:
+   *   * `annotation_spec_id!=4` --> The model evaluation was done for
+   *                             annotation spec with ID different than 4.
+   *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
+   *                                aggregate of all annotation specs.
+   * 
+ * + * string filter = 3; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Requested page size.
+   * 
+ * + * int32 page_size = 4; + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results for the server to return.
+   * Typically obtained via
+   * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call.
+   * 
+ * + * string page_token = 6; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results for the server to return.
+   * Typically obtained via
+   * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call.
+   * 
+ * + * string page_token = 6; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponse.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponse.java new file mode 100644 index 000000000..1ae658f66 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponse.java @@ -0,0 +1,1125 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListModelEvaluationsResponse} + */ +public final class ListModelEvaluationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ListModelEvaluationsResponse) + ListModelEvaluationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelEvaluationsResponse.newBuilder() to construct. + private ListModelEvaluationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelEvaluationsResponse() { + modelEvaluation_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelEvaluationsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + modelEvaluation_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + modelEvaluation_.add( + input.readMessage( + com.google.cloud.automl.v1.ModelEvaluation.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + modelEvaluation_ = java.util.Collections.unmodifiableList(modelEvaluation_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListModelEvaluationsResponse.class, + com.google.cloud.automl.v1.ListModelEvaluationsResponse.Builder.class); + } + + private int bitField0_; + public static final int MODEL_EVALUATION_FIELD_NUMBER = 1; + private java.util.List modelEvaluation_; + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public java.util.List getModelEvaluationList() { + return modelEvaluation_; + } + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public java.util.List + getModelEvaluationOrBuilderList() { + return modelEvaluation_; + } + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public int getModelEvaluationCount() { + return modelEvaluation_.size(); + } + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public com.google.cloud.automl.v1.ModelEvaluation getModelEvaluation(int index) { + return modelEvaluation_.get(index); + } + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public com.google.cloud.automl.v1.ModelEvaluationOrBuilder getModelEvaluationOrBuilder( + int index) { + return modelEvaluation_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new
+   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new
+   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < modelEvaluation_.size(); i++) { + output.writeMessage(1, modelEvaluation_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < modelEvaluation_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, modelEvaluation_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ListModelEvaluationsResponse)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ListModelEvaluationsResponse other = + (com.google.cloud.automl.v1.ListModelEvaluationsResponse) obj; + + if (!getModelEvaluationList().equals(other.getModelEvaluationList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getModelEvaluationCount() > 0) { + hash = (37 * hash) + MODEL_EVALUATION_FIELD_NUMBER; + hash = (53 * hash) + getModelEvaluationList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.automl.v1.ListModelEvaluationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListModelEvaluationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ListModelEvaluationsResponse) + com.google.cloud.automl.v1.ListModelEvaluationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListModelEvaluationsResponse.class, + com.google.cloud.automl.v1.ListModelEvaluationsResponse.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ListModelEvaluationsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelEvaluationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelEvaluationBuilder_ == null) { + modelEvaluation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + modelEvaluationBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelEvaluationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelEvaluationsResponse getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ListModelEvaluationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelEvaluationsResponse build() { + com.google.cloud.automl.v1.ListModelEvaluationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelEvaluationsResponse buildPartial() { + com.google.cloud.automl.v1.ListModelEvaluationsResponse result = + new com.google.cloud.automl.v1.ListModelEvaluationsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (modelEvaluationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + modelEvaluation_ = java.util.Collections.unmodifiableList(modelEvaluation_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.modelEvaluation_ = modelEvaluation_; + } else { + result.modelEvaluation_ = modelEvaluationBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ListModelEvaluationsResponse) { + return mergeFrom((com.google.cloud.automl.v1.ListModelEvaluationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ListModelEvaluationsResponse other) { + if (other == com.google.cloud.automl.v1.ListModelEvaluationsResponse.getDefaultInstance()) + return this; + if (modelEvaluationBuilder_ == null) { + if (!other.modelEvaluation_.isEmpty()) { + if (modelEvaluation_.isEmpty()) { + modelEvaluation_ = other.modelEvaluation_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModelEvaluationIsMutable(); + modelEvaluation_.addAll(other.modelEvaluation_); + } + onChanged(); + } + } else { + if (!other.modelEvaluation_.isEmpty()) { + if (modelEvaluationBuilder_.isEmpty()) { + modelEvaluationBuilder_.dispose(); + modelEvaluationBuilder_ = null; + modelEvaluation_ = other.modelEvaluation_; + bitField0_ = (bitField0_ & ~0x00000001); + modelEvaluationBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModelEvaluationFieldBuilder() + : null; + } else { + modelEvaluationBuilder_.addAllMessages(other.modelEvaluation_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ListModelEvaluationsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.automl.v1.ListModelEvaluationsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List modelEvaluation_ = + java.util.Collections.emptyList(); + + private void ensureModelEvaluationIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + modelEvaluation_ = + new java.util.ArrayList(modelEvaluation_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.ModelEvaluation, + com.google.cloud.automl.v1.ModelEvaluation.Builder, + com.google.cloud.automl.v1.ModelEvaluationOrBuilder> + modelEvaluationBuilder_; + + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public java.util.List getModelEvaluationList() { + if (modelEvaluationBuilder_ == null) { + return java.util.Collections.unmodifiableList(modelEvaluation_); + } else { + return modelEvaluationBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public int getModelEvaluationCount() { + if (modelEvaluationBuilder_ == null) { + return modelEvaluation_.size(); + } else { + return modelEvaluationBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public com.google.cloud.automl.v1.ModelEvaluation getModelEvaluation(int index) { + if (modelEvaluationBuilder_ == null) { + return modelEvaluation_.get(index); + } else { + return modelEvaluationBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public Builder setModelEvaluation(int index, com.google.cloud.automl.v1.ModelEvaluation value) { + if (modelEvaluationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationIsMutable(); + modelEvaluation_.set(index, value); + onChanged(); + } else { + modelEvaluationBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public Builder setModelEvaluation( + int index, com.google.cloud.automl.v1.ModelEvaluation.Builder builderForValue) { + if (modelEvaluationBuilder_ == null) { + ensureModelEvaluationIsMutable(); + modelEvaluation_.set(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public Builder addModelEvaluation(com.google.cloud.automl.v1.ModelEvaluation value) { + if (modelEvaluationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationIsMutable(); + modelEvaluation_.add(value); + onChanged(); + } else { + modelEvaluationBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public Builder addModelEvaluation(int index, com.google.cloud.automl.v1.ModelEvaluation value) { + if (modelEvaluationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationIsMutable(); + modelEvaluation_.add(index, value); + onChanged(); + } else { + modelEvaluationBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public Builder addModelEvaluation( + com.google.cloud.automl.v1.ModelEvaluation.Builder builderForValue) { + if (modelEvaluationBuilder_ == null) { + ensureModelEvaluationIsMutable(); + modelEvaluation_.add(builderForValue.build()); + onChanged(); + } else { + modelEvaluationBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public Builder addModelEvaluation( + int index, com.google.cloud.automl.v1.ModelEvaluation.Builder builderForValue) { + if (modelEvaluationBuilder_ == null) { + ensureModelEvaluationIsMutable(); + modelEvaluation_.add(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public Builder addAllModelEvaluation( + java.lang.Iterable values) { + if (modelEvaluationBuilder_ == null) { + ensureModelEvaluationIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, modelEvaluation_); + onChanged(); + } else { + modelEvaluationBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public Builder clearModelEvaluation() { + if (modelEvaluationBuilder_ == null) { + modelEvaluation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modelEvaluationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public Builder removeModelEvaluation(int index) { + if (modelEvaluationBuilder_ == null) { + ensureModelEvaluationIsMutable(); + modelEvaluation_.remove(index); + onChanged(); + } else { + modelEvaluationBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public com.google.cloud.automl.v1.ModelEvaluation.Builder getModelEvaluationBuilder(int index) { + return getModelEvaluationFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public com.google.cloud.automl.v1.ModelEvaluationOrBuilder getModelEvaluationOrBuilder( + int index) { + if (modelEvaluationBuilder_ == null) { + return modelEvaluation_.get(index); + } else { + return modelEvaluationBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public java.util.List + getModelEvaluationOrBuilderList() { + if (modelEvaluationBuilder_ != null) { + return modelEvaluationBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(modelEvaluation_); + } + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public com.google.cloud.automl.v1.ModelEvaluation.Builder addModelEvaluationBuilder() { + return getModelEvaluationFieldBuilder() + .addBuilder(com.google.cloud.automl.v1.ModelEvaluation.getDefaultInstance()); + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public com.google.cloud.automl.v1.ModelEvaluation.Builder addModelEvaluationBuilder(int index) { + return getModelEvaluationFieldBuilder() + .addBuilder(index, com.google.cloud.automl.v1.ModelEvaluation.getDefaultInstance()); + } + /** + * + * + *
+     * List of model evaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + public java.util.List + getModelEvaluationBuilderList() { + return getModelEvaluationFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.ModelEvaluation, + com.google.cloud.automl.v1.ModelEvaluation.Builder, + com.google.cloud.automl.v1.ModelEvaluationOrBuilder> + getModelEvaluationFieldBuilder() { + if (modelEvaluationBuilder_ == null) { + modelEvaluationBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.ModelEvaluation, + com.google.cloud.automl.v1.ModelEvaluation.Builder, + com.google.cloud.automl.v1.ModelEvaluationOrBuilder>( + modelEvaluation_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + modelEvaluation_ = null; + } + return modelEvaluationBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new
+     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ListModelEvaluationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ListModelEvaluationsResponse) + private static final com.google.cloud.automl.v1.ListModelEvaluationsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ListModelEvaluationsResponse(); + } + + public static com.google.cloud.automl.v1.ListModelEvaluationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelEvaluationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelEvaluationsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelEvaluationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponseOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponseOrBuilder.java new file mode 100644 index 000000000..88b47f11d --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface ListModelEvaluationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ListModelEvaluationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + java.util.List getModelEvaluationList(); + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + com.google.cloud.automl.v1.ModelEvaluation getModelEvaluation(int index); + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + int getModelEvaluationCount(); + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + java.util.List + getModelEvaluationOrBuilderList(); + /** + * + * + *
+   * List of model evaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; + */ + com.google.cloud.automl.v1.ModelEvaluationOrBuilder getModelEvaluationOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new
+   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new
+   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequest.java new file mode 100644 index 000000000..814644e55 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequest.java @@ -0,0 +1,1075 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListModelsRequest} + */ +public final class ListModelsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ListModelsRequest) + ListModelsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelsRequest.newBuilder() to construct. + private ListModelsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListModelsRequest.class, + com.google.cloud.automl.v1.ListModelsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Resource name of the project, from which to list the models.
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the project, from which to list the models.
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 3; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `model_metadata` - for existence of the case (e.g.
+   *             video_classification_model_metadata:*).
+   *   * `dataset_id` - for = or !=. Some examples of using the filter are:
+   *   * `image_classification_model_metadata:*` --> The model has
+   *                                        image_classification_model_metadata.
+   *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
+   * 
+ * + * string filter = 3; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `model_metadata` - for existence of the case (e.g.
+   *             video_classification_model_metadata:*).
+   *   * `dataset_id` - for = or !=. Some examples of using the filter are:
+   *   * `image_classification_model_metadata:*` --> The model has
+   *                                        image_classification_model_metadata.
+   *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
+   * 
+ * + * string filter = 3; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + * + * + *
+   * Requested page size.
+   * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 6; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A token identifying a page of results for the server to return
+   * Typically obtained via
+   * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous
+   * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call.
+   * 
+ * + * string page_token = 6; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results for the server to return
+   * Typically obtained via
+   * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous
+   * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call.
+   * 
+ * + * string page_token = 6; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ListModelsRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ListModelsRequest other = + (com.google.cloud.automl.v1.ListModelsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.ListModelsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListModelsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ListModelsRequest) + com.google.cloud.automl.v1.ListModelsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListModelsRequest.class, + com.google.cloud.automl.v1.ListModelsRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ListModelsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelsRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ListModelsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelsRequest build() { + com.google.cloud.automl.v1.ListModelsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelsRequest buildPartial() { + com.google.cloud.automl.v1.ListModelsRequest result = + new com.google.cloud.automl.v1.ListModelsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ListModelsRequest) { + return mergeFrom((com.google.cloud.automl.v1.ListModelsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ListModelsRequest other) { + if (other == com.google.cloud.automl.v1.ListModelsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ListModelsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.ListModelsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Resource name of the project, from which to list the models.
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the project, from which to list the models.
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the project, from which to list the models.
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the project, from which to list the models.
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the project, from which to list the models.
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `model_metadata` - for existence of the case (e.g.
+     *             video_classification_model_metadata:*).
+     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
+     *   * `image_classification_model_metadata:*` --> The model has
+     *                                        image_classification_model_metadata.
+     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
+     * 
+ * + * string filter = 3; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `model_metadata` - for existence of the case (e.g.
+     *             video_classification_model_metadata:*).
+     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
+     *   * `image_classification_model_metadata:*` --> The model has
+     *                                        image_classification_model_metadata.
+     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
+     * 
+ * + * string filter = 3; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `model_metadata` - for existence of the case (e.g.
+     *             video_classification_model_metadata:*).
+     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
+     *   * `image_classification_model_metadata:*` --> The model has
+     *                                        image_classification_model_metadata.
+     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
+     * 
+ * + * string filter = 3; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `model_metadata` - for existence of the case (e.g.
+     *             video_classification_model_metadata:*).
+     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
+     *   * `image_classification_model_metadata:*` --> The model has
+     *                                        image_classification_model_metadata.
+     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
+     * 
+ * + * string filter = 3; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request.
+     *   * `model_metadata` - for existence of the case (e.g.
+     *             video_classification_model_metadata:*).
+     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
+     *   * `image_classification_model_metadata:*` --> The model has
+     *                                        image_classification_model_metadata.
+     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
+     * 
+ * + * string filter = 3; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size.
+     * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size.
+     * 
+ * + * int32 page_size = 4; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size.
+     * 
+ * + * int32 page_size = 4; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous
+     * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call.
+     * 
+ * + * string page_token = 6; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous
+     * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call.
+     * 
+ * + * string page_token = 6; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous
+     * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call.
+     * 
+ * + * string page_token = 6; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous
+     * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call.
+     * 
+ * + * string page_token = 6; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results for the server to return
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous
+     * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call.
+     * 
+ * + * string page_token = 6; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ListModelsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ListModelsRequest) + private static final com.google.cloud.automl.v1.ListModelsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ListModelsRequest(); + } + + public static com.google.cloud.automl.v1.ListModelsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequestOrBuilder.java new file mode 100644 index 000000000..09191b4df --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequestOrBuilder.java @@ -0,0 +1,117 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface ListModelsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ListModelsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the project, from which to list the models.
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Resource name of the project, from which to list the models.
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `model_metadata` - for existence of the case (e.g.
+   *             video_classification_model_metadata:*).
+   *   * `dataset_id` - for = or !=. Some examples of using the filter are:
+   *   * `image_classification_model_metadata:*` --> The model has
+   *                                        image_classification_model_metadata.
+   *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
+   * 
+ * + * string filter = 3; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression for filtering the results of the request.
+   *   * `model_metadata` - for existence of the case (e.g.
+   *             video_classification_model_metadata:*).
+   *   * `dataset_id` - for = or !=. Some examples of using the filter are:
+   *   * `image_classification_model_metadata:*` --> The model has
+   *                                        image_classification_model_metadata.
+   *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
+   * 
+ * + * string filter = 3; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Requested page size.
+   * 
+ * + * int32 page_size = 4; + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results for the server to return
+   * Typically obtained via
+   * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous
+   * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call.
+   * 
+ * + * string page_token = 6; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results for the server to return
+   * Typically obtained via
+   * [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous
+   * [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call.
+   * 
+ * + * string page_token = 6; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponse.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponse.java new file mode 100644 index 000000000..b6fb6fcdd --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponse.java @@ -0,0 +1,1103 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Response message for [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListModelsResponse} + */ +public final class ListModelsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ListModelsResponse) + ListModelsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelsResponse.newBuilder() to construct. + private ListModelsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelsResponse() { + model_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + model_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + model_.add( + input.readMessage(com.google.cloud.automl.v1.Model.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + model_ = java.util.Collections.unmodifiableList(model_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListModelsResponse.class, + com.google.cloud.automl.v1.ListModelsResponse.Builder.class); + } + + private int bitField0_; + public static final int MODEL_FIELD_NUMBER = 1; + private java.util.List model_; + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public java.util.List getModelList() { + return model_; + } + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public java.util.List + getModelOrBuilderList() { + return model_; + } + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public int getModelCount() { + return model_.size(); + } + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.Model getModel(int index) { + return model_.get(index); + } + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder(int index) { + return model_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < model_.size(); i++) { + output.writeMessage(1, model_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < model_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, model_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ListModelsResponse)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ListModelsResponse other = + (com.google.cloud.automl.v1.ListModelsResponse) obj; + + if (!getModelList().equals(other.getModelList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getModelCount() > 0) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModelList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ListModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.ListModelsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ListModelsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ListModelsResponse) + com.google.cloud.automl.v1.ListModelsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ListModelsResponse.class, + com.google.cloud.automl.v1.ListModelsResponse.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ListModelsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelBuilder_ == null) { + model_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + modelBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_ListModelsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelsResponse getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ListModelsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelsResponse build() { + com.google.cloud.automl.v1.ListModelsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelsResponse buildPartial() { + com.google.cloud.automl.v1.ListModelsResponse result = + new com.google.cloud.automl.v1.ListModelsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (modelBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + model_ = java.util.Collections.unmodifiableList(model_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.model_ = model_; + } else { + result.model_ = modelBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ListModelsResponse) { + return mergeFrom((com.google.cloud.automl.v1.ListModelsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ListModelsResponse other) { + if (other == com.google.cloud.automl.v1.ListModelsResponse.getDefaultInstance()) return this; + if (modelBuilder_ == null) { + if (!other.model_.isEmpty()) { + if (model_.isEmpty()) { + model_ = other.model_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModelIsMutable(); + model_.addAll(other.model_); + } + onChanged(); + } + } else { + if (!other.model_.isEmpty()) { + if (modelBuilder_.isEmpty()) { + modelBuilder_.dispose(); + modelBuilder_ = null; + model_ = other.model_; + bitField0_ = (bitField0_ & ~0x00000001); + modelBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModelFieldBuilder() + : null; + } else { + modelBuilder_.addAllMessages(other.model_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ListModelsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.ListModelsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List model_ = + java.util.Collections.emptyList(); + + private void ensureModelIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + model_ = new java.util.ArrayList(model_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.Model, + com.google.cloud.automl.v1.Model.Builder, + com.google.cloud.automl.v1.ModelOrBuilder> + modelBuilder_; + + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public java.util.List getModelList() { + if (modelBuilder_ == null) { + return java.util.Collections.unmodifiableList(model_); + } else { + return modelBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public int getModelCount() { + if (modelBuilder_ == null) { + return model_.size(); + } else { + return modelBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.Model getModel(int index) { + if (modelBuilder_ == null) { + return model_.get(index); + } else { + return modelBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public Builder setModel(int index, com.google.cloud.automl.v1.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelIsMutable(); + model_.set(index, value); + onChanged(); + } else { + modelBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public Builder setModel(int index, com.google.cloud.automl.v1.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + ensureModelIsMutable(); + model_.set(index, builderForValue.build()); + onChanged(); + } else { + modelBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public Builder addModel(com.google.cloud.automl.v1.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelIsMutable(); + model_.add(value); + onChanged(); + } else { + modelBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public Builder addModel(int index, com.google.cloud.automl.v1.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelIsMutable(); + model_.add(index, value); + onChanged(); + } else { + modelBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public Builder addModel(com.google.cloud.automl.v1.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + ensureModelIsMutable(); + model_.add(builderForValue.build()); + onChanged(); + } else { + modelBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public Builder addModel(int index, com.google.cloud.automl.v1.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + ensureModelIsMutable(); + model_.add(index, builderForValue.build()); + onChanged(); + } else { + modelBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public Builder addAllModel( + java.lang.Iterable values) { + if (modelBuilder_ == null) { + ensureModelIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, model_); + onChanged(); + } else { + modelBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public Builder clearModel() { + if (modelBuilder_ == null) { + model_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modelBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public Builder removeModel(int index) { + if (modelBuilder_ == null) { + ensureModelIsMutable(); + model_.remove(index); + onChanged(); + } else { + modelBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.Model.Builder getModelBuilder(int index) { + return getModelFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder(int index) { + if (modelBuilder_ == null) { + return model_.get(index); + } else { + return modelBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public java.util.List + getModelOrBuilderList() { + if (modelBuilder_ != null) { + return modelBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(model_); + } + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.Model.Builder addModelBuilder() { + return getModelFieldBuilder() + .addBuilder(com.google.cloud.automl.v1.Model.getDefaultInstance()); + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.Model.Builder addModelBuilder(int index) { + return getModelFieldBuilder() + .addBuilder(index, com.google.cloud.automl.v1.Model.getDefaultInstance()); + } + /** + * + * + *
+     * List of models in the requested page.
+     * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + public java.util.List getModelBuilderList() { + return getModelFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.Model, + com.google.cloud.automl.v1.Model.Builder, + com.google.cloud.automl.v1.ModelOrBuilder> + getModelFieldBuilder() { + if (modelBuilder_ == null) { + modelBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.Model, + com.google.cloud.automl.v1.Model.Builder, + com.google.cloud.automl.v1.ModelOrBuilder>( + model_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + model_ = null; + } + return modelBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ListModelsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ListModelsResponse) + private static final com.google.cloud.automl.v1.ListModelsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ListModelsResponse(); + } + + public static com.google.cloud.automl.v1.ListModelsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ListModelsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponseOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponseOrBuilder.java new file mode 100644 index 000000000..865f5a933 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponseOrBuilder.java @@ -0,0 +1,99 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface ListModelsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ListModelsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + java.util.List getModelList(); + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + com.google.cloud.automl.v1.Model getModel(int index); + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + int getModelCount(); + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + java.util.List getModelOrBuilderList(); + /** + * + * + *
+   * List of models in the requested page.
+   * 
+ * + * repeated .google.cloud.automl.v1.Model model = 1; + */ + com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/LocationName.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/LocationName.java new file mode 100644 index 000000000..8c4fa647c --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/LocationName.java @@ -0,0 +1,182 @@ +/* + * 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.automl.v1; + +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 +@javax.annotation.Generated("by GAPIC protoc plugin") +public class LocationName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + 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 (LocationName 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("location", location); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location); + } + + /** Builder for LocationName. */ + public static class Builder { + + private String project; + private String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder() {} + + private Builder(LocationName locationName) { + project = locationName.project; + location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LocationName) { + LocationName that = (LocationName) o; + return (this.project.equals(that.project)) && (this.location.equals(that.location)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Model.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Model.java new file mode 100644 index 000000000..820395299 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Model.java @@ -0,0 +1,2524 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/model.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * API proto representing a trained machine learning model.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.Model} + */ +public final class Model extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.Model) + ModelOrBuilder { + private static final long serialVersionUID = 0L; + // Use Model.newBuilder() to construct. + private Model(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Model() { + name_ = ""; + displayName_ = ""; + datasetId_ = ""; + deploymentState_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Model( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + datasetId_ = s; + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + int rawValue = input.readEnum(); + + deploymentState_ = rawValue; + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + com.google.cloud.automl.v1.TranslationModelMetadata.Builder subBuilder = null; + if (modelMetadataCase_ == 15) { + subBuilder = + ((com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_) + .toBuilder(); + } + modelMetadata_ = + input.readMessage( + com.google.cloud.automl.v1.TranslationModelMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_); + modelMetadata_ = subBuilder.buildPartial(); + } + modelMetadataCase_ = 15; + break; + } + case 274: + { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000080; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.ModelOuterClass + .internal_static_google_cloud_automl_v1_Model_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 34: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.ModelOuterClass + .internal_static_google_cloud_automl_v1_Model_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.Model.class, com.google.cloud.automl.v1.Model.Builder.class); + } + + /** + * + * + *
+   * Deployment state of the model.
+   * 
+ * + * Protobuf enum {@code google.cloud.automl.v1.Model.DeploymentState} + */ + public enum DeploymentState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be used, an un-set enum has this value by default.
+     * 
+ * + * DEPLOYMENT_STATE_UNSPECIFIED = 0; + */ + DEPLOYMENT_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Model is deployed.
+     * 
+ * + * DEPLOYED = 1; + */ + DEPLOYED(1), + /** + * + * + *
+     * Model is not deployed.
+     * 
+ * + * UNDEPLOYED = 2; + */ + UNDEPLOYED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be used, an un-set enum has this value by default.
+     * 
+ * + * DEPLOYMENT_STATE_UNSPECIFIED = 0; + */ + public static final int DEPLOYMENT_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Model is deployed.
+     * 
+ * + * DEPLOYED = 1; + */ + public static final int DEPLOYED_VALUE = 1; + /** + * + * + *
+     * Model is not deployed.
+     * 
+ * + * UNDEPLOYED = 2; + */ + public static final int UNDEPLOYED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static DeploymentState valueOf(int value) { + return forNumber(value); + } + + public static DeploymentState forNumber(int value) { + switch (value) { + case 0: + return DEPLOYMENT_STATE_UNSPECIFIED; + case 1: + return DEPLOYED; + case 2: + return UNDEPLOYED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DeploymentState findValueByNumber(int number) { + return DeploymentState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.automl.v1.Model.getDescriptor().getEnumTypes().get(0); + } + + private static final DeploymentState[] VALUES = values(); + + public static DeploymentState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DeploymentState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.automl.v1.Model.DeploymentState) + } + + private int bitField0_; + private int modelMetadataCase_ = 0; + private java.lang.Object modelMetadata_; + + public enum ModelMetadataCase implements com.google.protobuf.Internal.EnumLite { + TRANSLATION_MODEL_METADATA(15), + MODELMETADATA_NOT_SET(0); + private final int value; + + private ModelMetadataCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static ModelMetadataCase valueOf(int value) { + return forNumber(value); + } + + public static ModelMetadataCase forNumber(int value) { + switch (value) { + case 15: + return TRANSLATION_MODEL_METADATA; + case 0: + return MODELMETADATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ModelMetadataCase getModelMetadataCase() { + return ModelMetadataCase.forNumber(modelMetadataCase_); + } + + public static final int TRANSLATION_MODEL_METADATA_FIELD_NUMBER = 15; + /** + * + * + *
+   * Metadata for translation models.
+   * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + */ + public boolean hasTranslationModelMetadata() { + return modelMetadataCase_ == 15; + } + /** + * + * + *
+   * Metadata for translation models.
+   * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + */ + public com.google.cloud.automl.v1.TranslationModelMetadata getTranslationModelMetadata() { + if (modelMetadataCase_ == 15) { + return (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_; + } + return com.google.cloud.automl.v1.TranslationModelMetadata.getDefaultInstance(); + } + /** + * + * + *
+   * Metadata for translation models.
+   * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + */ + public com.google.cloud.automl.v1.TranslationModelMetadataOrBuilder + getTranslationModelMetadataOrBuilder() { + if (modelMetadataCase_ == 15) { + return (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_; + } + return com.google.cloud.automl.v1.TranslationModelMetadata.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the model.
+   * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the model.
+   * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The name of the model to show in the interface. The name can be
+   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+   * and a-z, underscores
+   * (_), and ASCII digits 0-9. It must start with a letter.
+   * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the model to show in the interface. The name can be
+   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+   * and a-z, underscores
+   * (_), and ASCII digits 0-9. It must start with a letter.
+   * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object datasetId_; + /** + * + * + *
+   * Required. The resource ID of the dataset used to create the model. The dataset must
+   * come from the same ancestor project and location.
+   * 
+ * + * string dataset_id = 3; + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource ID of the dataset used to create the model. The dataset must
+   * come from the same ancestor project and location.
+   * 
+ * + * string dataset_id = 3; + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when the model training finished  and can be used for prediction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when the model training finished  and can be used for prediction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when the model training finished  and can be used for prediction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this model was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this model was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this model was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int DEPLOYMENT_STATE_FIELD_NUMBER = 8; + private int deploymentState_; + /** + * + * + *
+   * Output only. Deployment state of the model. A model can only serve
+   * prediction requests after it gets deployed.
+   * 
+ * + * .google.cloud.automl.v1.Model.DeploymentState deployment_state = 8; + */ + public int getDeploymentStateValue() { + return deploymentState_; + } + /** + * + * + *
+   * Output only. Deployment state of the model. A model can only serve
+   * prediction requests after it gets deployed.
+   * 
+ * + * .google.cloud.automl.v1.Model.DeploymentState deployment_state = 8; + */ + public com.google.cloud.automl.v1.Model.DeploymentState getDeploymentState() { + @SuppressWarnings("deprecation") + com.google.cloud.automl.v1.Model.DeploymentState result = + com.google.cloud.automl.v1.Model.DeploymentState.valueOf(deploymentState_); + return result == null ? com.google.cloud.automl.v1.Model.DeploymentState.UNRECOGNIZED : result; + } + + public static final int LABELS_FIELD_NUMBER = 34; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.automl.v1.ModelOuterClass + .internal_static_google_cloud_automl_v1_Model_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your model.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 34; + */ + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your model.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 34; + */ + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your model.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 34; + */ + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your model.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 34; + */ + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDatasetIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, datasetId_); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (deploymentState_ + != com.google.cloud.automl.v1.Model.DeploymentState.DEPLOYMENT_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, deploymentState_); + } + if (updateTime_ != null) { + output.writeMessage(11, getUpdateTime()); + } + if (modelMetadataCase_ == 15) { + output.writeMessage(15, (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 34); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDatasetIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, datasetId_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (deploymentState_ + != com.google.cloud.automl.v1.Model.DeploymentState.DEPLOYMENT_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, deploymentState_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (modelMetadataCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.Model)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.Model other = (com.google.cloud.automl.v1.Model) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDatasetId().equals(other.getDatasetId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (deploymentState_ != other.deploymentState_) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getModelMetadataCase().equals(other.getModelMetadataCase())) return false; + switch (modelMetadataCase_) { + case 15: + if (!getTranslationModelMetadata().equals(other.getTranslationModelMetadata())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DEPLOYMENT_STATE_FIELD_NUMBER; + hash = (53 * hash) + deploymentState_; + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + switch (modelMetadataCase_) { + case 15: + hash = (37 * hash) + TRANSLATION_MODEL_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getTranslationModelMetadata().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.Model parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.Model parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Model parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.Model parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Model parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.Model parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Model parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.Model parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Model parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.Model parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.Model parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.Model parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.Model prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * API proto representing a trained machine learning model.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.Model} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.Model) + com.google.cloud.automl.v1.ModelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.ModelOuterClass + .internal_static_google_cloud_automl_v1_Model_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 34: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 34: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.ModelOuterClass + .internal_static_google_cloud_automl_v1_Model_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.Model.class, + com.google.cloud.automl.v1.Model.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.Model.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + datasetId_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + deploymentState_ = 0; + + internalGetMutableLabels().clear(); + modelMetadataCase_ = 0; + modelMetadata_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.ModelOuterClass + .internal_static_google_cloud_automl_v1_Model_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.Model getDefaultInstanceForType() { + return com.google.cloud.automl.v1.Model.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.Model build() { + com.google.cloud.automl.v1.Model result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.Model buildPartial() { + com.google.cloud.automl.v1.Model result = new com.google.cloud.automl.v1.Model(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (modelMetadataCase_ == 15) { + if (translationModelMetadataBuilder_ == null) { + result.modelMetadata_ = modelMetadata_; + } else { + result.modelMetadata_ = translationModelMetadataBuilder_.build(); + } + } + result.name_ = name_; + result.displayName_ = displayName_; + result.datasetId_ = datasetId_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.deploymentState_ = deploymentState_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.bitField0_ = to_bitField0_; + result.modelMetadataCase_ = modelMetadataCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.Model) { + return mergeFrom((com.google.cloud.automl.v1.Model) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.Model other) { + if (other == com.google.cloud.automl.v1.Model.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.deploymentState_ != 0) { + setDeploymentStateValue(other.getDeploymentStateValue()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + switch (other.getModelMetadataCase()) { + case TRANSLATION_MODEL_METADATA: + { + mergeTranslationModelMetadata(other.getTranslationModelMetadata()); + break; + } + case MODELMETADATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.Model parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.Model) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelMetadataCase_ = 0; + private java.lang.Object modelMetadata_; + + public ModelMetadataCase getModelMetadataCase() { + return ModelMetadataCase.forNumber(modelMetadataCase_); + } + + public Builder clearModelMetadata() { + modelMetadataCase_ = 0; + modelMetadata_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationModelMetadata, + com.google.cloud.automl.v1.TranslationModelMetadata.Builder, + com.google.cloud.automl.v1.TranslationModelMetadataOrBuilder> + translationModelMetadataBuilder_; + /** + * + * + *
+     * Metadata for translation models.
+     * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + * + */ + public boolean hasTranslationModelMetadata() { + return modelMetadataCase_ == 15; + } + /** + * + * + *
+     * Metadata for translation models.
+     * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + * + */ + public com.google.cloud.automl.v1.TranslationModelMetadata getTranslationModelMetadata() { + if (translationModelMetadataBuilder_ == null) { + if (modelMetadataCase_ == 15) { + return (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_; + } + return com.google.cloud.automl.v1.TranslationModelMetadata.getDefaultInstance(); + } else { + if (modelMetadataCase_ == 15) { + return translationModelMetadataBuilder_.getMessage(); + } + return com.google.cloud.automl.v1.TranslationModelMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Metadata for translation models.
+     * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + * + */ + public Builder setTranslationModelMetadata( + com.google.cloud.automl.v1.TranslationModelMetadata value) { + if (translationModelMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelMetadata_ = value; + onChanged(); + } else { + translationModelMetadataBuilder_.setMessage(value); + } + modelMetadataCase_ = 15; + return this; + } + /** + * + * + *
+     * Metadata for translation models.
+     * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + * + */ + public Builder setTranslationModelMetadata( + com.google.cloud.automl.v1.TranslationModelMetadata.Builder builderForValue) { + if (translationModelMetadataBuilder_ == null) { + modelMetadata_ = builderForValue.build(); + onChanged(); + } else { + translationModelMetadataBuilder_.setMessage(builderForValue.build()); + } + modelMetadataCase_ = 15; + return this; + } + /** + * + * + *
+     * Metadata for translation models.
+     * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + * + */ + public Builder mergeTranslationModelMetadata( + com.google.cloud.automl.v1.TranslationModelMetadata value) { + if (translationModelMetadataBuilder_ == null) { + if (modelMetadataCase_ == 15 + && modelMetadata_ + != com.google.cloud.automl.v1.TranslationModelMetadata.getDefaultInstance()) { + modelMetadata_ = + com.google.cloud.automl.v1.TranslationModelMetadata.newBuilder( + (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + modelMetadata_ = value; + } + onChanged(); + } else { + if (modelMetadataCase_ == 15) { + translationModelMetadataBuilder_.mergeFrom(value); + } + translationModelMetadataBuilder_.setMessage(value); + } + modelMetadataCase_ = 15; + return this; + } + /** + * + * + *
+     * Metadata for translation models.
+     * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + * + */ + public Builder clearTranslationModelMetadata() { + if (translationModelMetadataBuilder_ == null) { + if (modelMetadataCase_ == 15) { + modelMetadataCase_ = 0; + modelMetadata_ = null; + onChanged(); + } + } else { + if (modelMetadataCase_ == 15) { + modelMetadataCase_ = 0; + modelMetadata_ = null; + } + translationModelMetadataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Metadata for translation models.
+     * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + * + */ + public com.google.cloud.automl.v1.TranslationModelMetadata.Builder + getTranslationModelMetadataBuilder() { + return getTranslationModelMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Metadata for translation models.
+     * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + * + */ + public com.google.cloud.automl.v1.TranslationModelMetadataOrBuilder + getTranslationModelMetadataOrBuilder() { + if ((modelMetadataCase_ == 15) && (translationModelMetadataBuilder_ != null)) { + return translationModelMetadataBuilder_.getMessageOrBuilder(); + } else { + if (modelMetadataCase_ == 15) { + return (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_; + } + return com.google.cloud.automl.v1.TranslationModelMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Metadata for translation models.
+     * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationModelMetadata, + com.google.cloud.automl.v1.TranslationModelMetadata.Builder, + com.google.cloud.automl.v1.TranslationModelMetadataOrBuilder> + getTranslationModelMetadataFieldBuilder() { + if (translationModelMetadataBuilder_ == null) { + if (!(modelMetadataCase_ == 15)) { + modelMetadata_ = com.google.cloud.automl.v1.TranslationModelMetadata.getDefaultInstance(); + } + translationModelMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationModelMetadata, + com.google.cloud.automl.v1.TranslationModelMetadata.Builder, + com.google.cloud.automl.v1.TranslationModelMetadataOrBuilder>( + (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_, + getParentForChildren(), + isClean()); + modelMetadata_ = null; + } + modelMetadataCase_ = 15; + onChanged(); + ; + return translationModelMetadataBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the model.
+     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the model.
+     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the model.
+     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the model.
+     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the model.
+     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The name of the model to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9. It must start with a letter.
+     * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the model to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9. It must start with a letter.
+     * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the model to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9. It must start with a letter.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the model to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9. It must start with a letter.
+     * 
+ * + * string display_name = 2; + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the model to show in the interface. The name can be
+     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+     * and a-z, underscores
+     * (_), and ASCII digits 0-9. It must start with a letter.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object datasetId_ = ""; + /** + * + * + *
+     * Required. The resource ID of the dataset used to create the model. The dataset must
+     * come from the same ancestor project and location.
+     * 
+ * + * string dataset_id = 3; + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource ID of the dataset used to create the model. The dataset must
+     * come from the same ancestor project and location.
+     * 
+ * + * string dataset_id = 3; + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource ID of the dataset used to create the model. The dataset must
+     * come from the same ancestor project and location.
+     * 
+ * + * string dataset_id = 3; + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource ID of the dataset used to create the model. The dataset must
+     * come from the same ancestor project and location.
+     * 
+ * + * string dataset_id = 3; + */ + public Builder clearDatasetId() { + + datasetId_ = getDefaultInstance().getDatasetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource ID of the dataset used to create the model. The dataset must
+     * come from the same ancestor project and location.
+     * 
+ * + * string dataset_id = 3; + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when the model training finished  and can be used for prediction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when the model training finished  and can be used for prediction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when the model training finished  and can be used for prediction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the model training finished  and can be used for prediction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the model training finished  and can be used for prediction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the model training finished  and can be used for prediction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the model training finished  and can be used for prediction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when the model training finished  and can be used for prediction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when the model training finished  and can be used for prediction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this model was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this model was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this model was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this model was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this model was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this model was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this model was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this model was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this model was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int deploymentState_ = 0; + /** + * + * + *
+     * Output only. Deployment state of the model. A model can only serve
+     * prediction requests after it gets deployed.
+     * 
+ * + * .google.cloud.automl.v1.Model.DeploymentState deployment_state = 8; + */ + public int getDeploymentStateValue() { + return deploymentState_; + } + /** + * + * + *
+     * Output only. Deployment state of the model. A model can only serve
+     * prediction requests after it gets deployed.
+     * 
+ * + * .google.cloud.automl.v1.Model.DeploymentState deployment_state = 8; + */ + public Builder setDeploymentStateValue(int value) { + deploymentState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Deployment state of the model. A model can only serve
+     * prediction requests after it gets deployed.
+     * 
+ * + * .google.cloud.automl.v1.Model.DeploymentState deployment_state = 8; + */ + public com.google.cloud.automl.v1.Model.DeploymentState getDeploymentState() { + @SuppressWarnings("deprecation") + com.google.cloud.automl.v1.Model.DeploymentState result = + com.google.cloud.automl.v1.Model.DeploymentState.valueOf(deploymentState_); + return result == null + ? com.google.cloud.automl.v1.Model.DeploymentState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Deployment state of the model. A model can only serve
+     * prediction requests after it gets deployed.
+     * 
+ * + * .google.cloud.automl.v1.Model.DeploymentState deployment_state = 8; + */ + public Builder setDeploymentState(com.google.cloud.automl.v1.Model.DeploymentState value) { + if (value == null) { + throw new NullPointerException(); + } + + deploymentState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Deployment state of the model. A model can only serve
+     * prediction requests after it gets deployed.
+     * 
+ * + * .google.cloud.automl.v1.Model.DeploymentState deployment_state = 8; + */ + public Builder clearDeploymentState() { + + deploymentState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your model.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 34; + */ + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your model.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 34; + */ + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your model.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 34; + */ + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your model.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 34; + */ + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your model.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 34; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your model.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 34; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your model.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * Label values are optional. Label keys must start with a letter.
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * 
+ * + * map<string, string> labels = 34; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.Model) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.Model) + private static final com.google.cloud.automl.v1.Model DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.Model(); + } + + public static com.google.cloud.automl.v1.Model getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Model parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Model(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.Model getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluation.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluation.java new file mode 100644 index 000000000..a4fc52a03 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluation.java @@ -0,0 +1,1552 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/model_evaluation.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Evaluation results of a model.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ModelEvaluation} + */ +public final class ModelEvaluation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ModelEvaluation) + ModelEvaluationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelEvaluation.newBuilder() to construct. + private ModelEvaluation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelEvaluation() { + name_ = ""; + annotationSpecId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ModelEvaluation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecId_ = s; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + evaluatedExampleCount_ = input.readInt32(); + break; + } + case 74: + { + com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder subBuilder = null; + if (metricsCase_ == 9) { + subBuilder = + ((com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_) + .toBuilder(); + } + metrics_ = + input.readMessage( + com.google.cloud.automl.v1.TranslationEvaluationMetrics.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_); + metrics_ = subBuilder.buildPartial(); + } + metricsCase_ = 9; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.ModelEvaluationOuterClass + .internal_static_google_cloud_automl_v1_ModelEvaluation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.ModelEvaluationOuterClass + .internal_static_google_cloud_automl_v1_ModelEvaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ModelEvaluation.class, + com.google.cloud.automl.v1.ModelEvaluation.Builder.class); + } + + private int metricsCase_ = 0; + private java.lang.Object metrics_; + + public enum MetricsCase implements com.google.protobuf.Internal.EnumLite { + TRANSLATION_EVALUATION_METRICS(9), + METRICS_NOT_SET(0); + private final int value; + + private MetricsCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static MetricsCase valueOf(int value) { + return forNumber(value); + } + + public static MetricsCase forNumber(int value) { + switch (value) { + case 9: + return TRANSLATION_EVALUATION_METRICS; + case 0: + return METRICS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MetricsCase getMetricsCase() { + return MetricsCase.forNumber(metricsCase_); + } + + public static final int TRANSLATION_EVALUATION_METRICS_FIELD_NUMBER = 9; + /** + * + * + *
+   * Model evaluation metrics for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public boolean hasTranslationEvaluationMetrics() { + return metricsCase_ == 9; + } + /** + * + * + *
+   * Model evaluation metrics for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public com.google.cloud.automl.v1.TranslationEvaluationMetrics getTranslationEvaluationMetrics() { + if (metricsCase_ == 9) { + return (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_; + } + return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); + } + /** + * + * + *
+   * Model evaluation metrics for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder + getTranslationEvaluationMetricsOrBuilder() { + if (metricsCase_ == 9) { + return (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_; + } + return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the model evaluation.
+   * Format:
+   * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the model evaluation.
+   * Format:
+   * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object annotationSpecId_; + /** + * + * + *
+   * Output only. The ID of the annotation spec that the model evaluation applies to. The
+   * The ID is empty for the overall model evaluation.
+   * 
+ * + * string annotation_spec_id = 2; + */ + public java.lang.String getAnnotationSpecId() { + java.lang.Object ref = annotationSpecId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The ID of the annotation spec that the model evaluation applies to. The
+   * The ID is empty for the overall model evaluation.
+   * 
+ * + * string annotation_spec_id = 2; + */ + public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { + java.lang.Object ref = annotationSpecId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this model evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this model evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this model evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int EVALUATED_EXAMPLE_COUNT_FIELD_NUMBER = 6; + private int evaluatedExampleCount_; + /** + * + * + *
+   * Output only. The number of examples used for model evaluation, i.e. for
+   * which ground truth from time of model creation is compared against the
+   * predicted annotations created by the model.
+   * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
+   * the total number of all examples used for evaluation.
+   * Otherwise, this is the count of examples that according to the ground
+   * truth were annotated by the
+   * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
+   * 
+ * + * int32 evaluated_example_count = 6; + */ + public int getEvaluatedExampleCount() { + return evaluatedExampleCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getAnnotationSpecIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, annotationSpecId_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (evaluatedExampleCount_ != 0) { + output.writeInt32(6, evaluatedExampleCount_); + } + if (metricsCase_ == 9) { + output.writeMessage(9, (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getAnnotationSpecIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, annotationSpecId_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (evaluatedExampleCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, evaluatedExampleCount_); + } + if (metricsCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.ModelEvaluation)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.ModelEvaluation other = + (com.google.cloud.automl.v1.ModelEvaluation) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAnnotationSpecId().equals(other.getAnnotationSpecId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (getEvaluatedExampleCount() != other.getEvaluatedExampleCount()) return false; + if (!getMetricsCase().equals(other.getMetricsCase())) return false; + switch (metricsCase_) { + case 9: + if (!getTranslationEvaluationMetrics().equals(other.getTranslationEvaluationMetrics())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + EVALUATED_EXAMPLE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getEvaluatedExampleCount(); + switch (metricsCase_) { + case 9: + hash = (37 * hash) + TRANSLATION_EVALUATION_METRICS_FIELD_NUMBER; + hash = (53 * hash) + getTranslationEvaluationMetrics().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.ModelEvaluation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Evaluation results of a model.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.ModelEvaluation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ModelEvaluation) + com.google.cloud.automl.v1.ModelEvaluationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.ModelEvaluationOuterClass + .internal_static_google_cloud_automl_v1_ModelEvaluation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.ModelEvaluationOuterClass + .internal_static_google_cloud_automl_v1_ModelEvaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.ModelEvaluation.class, + com.google.cloud.automl.v1.ModelEvaluation.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.ModelEvaluation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + annotationSpecId_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + evaluatedExampleCount_ = 0; + + metricsCase_ = 0; + metrics_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.ModelEvaluationOuterClass + .internal_static_google_cloud_automl_v1_ModelEvaluation_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ModelEvaluation getDefaultInstanceForType() { + return com.google.cloud.automl.v1.ModelEvaluation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.ModelEvaluation build() { + com.google.cloud.automl.v1.ModelEvaluation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ModelEvaluation buildPartial() { + com.google.cloud.automl.v1.ModelEvaluation result = + new com.google.cloud.automl.v1.ModelEvaluation(this); + if (metricsCase_ == 9) { + if (translationEvaluationMetricsBuilder_ == null) { + result.metrics_ = metrics_; + } else { + result.metrics_ = translationEvaluationMetricsBuilder_.build(); + } + } + result.name_ = name_; + result.annotationSpecId_ = annotationSpecId_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.evaluatedExampleCount_ = evaluatedExampleCount_; + result.metricsCase_ = metricsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.ModelEvaluation) { + return mergeFrom((com.google.cloud.automl.v1.ModelEvaluation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.ModelEvaluation other) { + if (other == com.google.cloud.automl.v1.ModelEvaluation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAnnotationSpecId().isEmpty()) { + annotationSpecId_ = other.annotationSpecId_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.getEvaluatedExampleCount() != 0) { + setEvaluatedExampleCount(other.getEvaluatedExampleCount()); + } + switch (other.getMetricsCase()) { + case TRANSLATION_EVALUATION_METRICS: + { + mergeTranslationEvaluationMetrics(other.getTranslationEvaluationMetrics()); + break; + } + case METRICS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.ModelEvaluation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.ModelEvaluation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int metricsCase_ = 0; + private java.lang.Object metrics_; + + public MetricsCase getMetricsCase() { + return MetricsCase.forNumber(metricsCase_); + } + + public Builder clearMetrics() { + metricsCase_ = 0; + metrics_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationEvaluationMetrics, + com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder, + com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder> + translationEvaluationMetricsBuilder_; + /** + * + * + *
+     * Model evaluation metrics for translation.
+     * 
+ * + * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public boolean hasTranslationEvaluationMetrics() { + return metricsCase_ == 9; + } + /** + * + * + *
+     * Model evaluation metrics for translation.
+     * 
+ * + * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public com.google.cloud.automl.v1.TranslationEvaluationMetrics + getTranslationEvaluationMetrics() { + if (translationEvaluationMetricsBuilder_ == null) { + if (metricsCase_ == 9) { + return (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_; + } + return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); + } else { + if (metricsCase_ == 9) { + return translationEvaluationMetricsBuilder_.getMessage(); + } + return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); + } + } + /** + * + * + *
+     * Model evaluation metrics for translation.
+     * 
+ * + * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public Builder setTranslationEvaluationMetrics( + com.google.cloud.automl.v1.TranslationEvaluationMetrics value) { + if (translationEvaluationMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metrics_ = value; + onChanged(); + } else { + translationEvaluationMetricsBuilder_.setMessage(value); + } + metricsCase_ = 9; + return this; + } + /** + * + * + *
+     * Model evaluation metrics for translation.
+     * 
+ * + * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public Builder setTranslationEvaluationMetrics( + com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder builderForValue) { + if (translationEvaluationMetricsBuilder_ == null) { + metrics_ = builderForValue.build(); + onChanged(); + } else { + translationEvaluationMetricsBuilder_.setMessage(builderForValue.build()); + } + metricsCase_ = 9; + return this; + } + /** + * + * + *
+     * Model evaluation metrics for translation.
+     * 
+ * + * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public Builder mergeTranslationEvaluationMetrics( + com.google.cloud.automl.v1.TranslationEvaluationMetrics value) { + if (translationEvaluationMetricsBuilder_ == null) { + if (metricsCase_ == 9 + && metrics_ + != com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance()) { + metrics_ = + com.google.cloud.automl.v1.TranslationEvaluationMetrics.newBuilder( + (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_) + .mergeFrom(value) + .buildPartial(); + } else { + metrics_ = value; + } + onChanged(); + } else { + if (metricsCase_ == 9) { + translationEvaluationMetricsBuilder_.mergeFrom(value); + } + translationEvaluationMetricsBuilder_.setMessage(value); + } + metricsCase_ = 9; + return this; + } + /** + * + * + *
+     * Model evaluation metrics for translation.
+     * 
+ * + * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public Builder clearTranslationEvaluationMetrics() { + if (translationEvaluationMetricsBuilder_ == null) { + if (metricsCase_ == 9) { + metricsCase_ = 0; + metrics_ = null; + onChanged(); + } + } else { + if (metricsCase_ == 9) { + metricsCase_ = 0; + metrics_ = null; + } + translationEvaluationMetricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Model evaluation metrics for translation.
+     * 
+ * + * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder + getTranslationEvaluationMetricsBuilder() { + return getTranslationEvaluationMetricsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Model evaluation metrics for translation.
+     * 
+ * + * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + public com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder + getTranslationEvaluationMetricsOrBuilder() { + if ((metricsCase_ == 9) && (translationEvaluationMetricsBuilder_ != null)) { + return translationEvaluationMetricsBuilder_.getMessageOrBuilder(); + } else { + if (metricsCase_ == 9) { + return (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_; + } + return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); + } + } + /** + * + * + *
+     * Model evaluation metrics for translation.
+     * 
+ * + * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationEvaluationMetrics, + com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder, + com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder> + getTranslationEvaluationMetricsFieldBuilder() { + if (translationEvaluationMetricsBuilder_ == null) { + if (!(metricsCase_ == 9)) { + metrics_ = com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); + } + translationEvaluationMetricsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TranslationEvaluationMetrics, + com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder, + com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder>( + (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_, + getParentForChildren(), + isClean()); + metrics_ = null; + } + metricsCase_ = 9; + onChanged(); + ; + return translationEvaluationMetricsBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the model evaluation.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the model evaluation.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the model evaluation.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the model evaluation.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the model evaluation.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object annotationSpecId_ = ""; + /** + * + * + *
+     * Output only. The ID of the annotation spec that the model evaluation applies to. The
+     * The ID is empty for the overall model evaluation.
+     * 
+ * + * string annotation_spec_id = 2; + */ + public java.lang.String getAnnotationSpecId() { + java.lang.Object ref = annotationSpecId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the annotation spec that the model evaluation applies to. The
+     * The ID is empty for the overall model evaluation.
+     * 
+ * + * string annotation_spec_id = 2; + */ + public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { + java.lang.Object ref = annotationSpecId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the annotation spec that the model evaluation applies to. The
+     * The ID is empty for the overall model evaluation.
+     * 
+ * + * string annotation_spec_id = 2; + */ + public Builder setAnnotationSpecId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the annotation spec that the model evaluation applies to. The
+     * The ID is empty for the overall model evaluation.
+     * 
+ * + * string annotation_spec_id = 2; + */ + public Builder clearAnnotationSpecId() { + + annotationSpecId_ = getDefaultInstance().getAnnotationSpecId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the annotation spec that the model evaluation applies to. The
+     * The ID is empty for the overall model evaluation.
+     * 
+ * + * string annotation_spec_id = 2; + */ + public Builder setAnnotationSpecIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this model evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this model evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this model evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this model evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this model evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this model evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this model evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this model evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this model evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private int evaluatedExampleCount_; + /** + * + * + *
+     * Output only. The number of examples used for model evaluation, i.e. for
+     * which ground truth from time of model creation is compared against the
+     * predicted annotations created by the model.
+     * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
+     * the total number of all examples used for evaluation.
+     * Otherwise, this is the count of examples that according to the ground
+     * truth were annotated by the
+     * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
+     * 
+ * + * int32 evaluated_example_count = 6; + */ + public int getEvaluatedExampleCount() { + return evaluatedExampleCount_; + } + /** + * + * + *
+     * Output only. The number of examples used for model evaluation, i.e. for
+     * which ground truth from time of model creation is compared against the
+     * predicted annotations created by the model.
+     * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
+     * the total number of all examples used for evaluation.
+     * Otherwise, this is the count of examples that according to the ground
+     * truth were annotated by the
+     * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
+     * 
+ * + * int32 evaluated_example_count = 6; + */ + public Builder setEvaluatedExampleCount(int value) { + + evaluatedExampleCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of examples used for model evaluation, i.e. for
+     * which ground truth from time of model creation is compared against the
+     * predicted annotations created by the model.
+     * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
+     * the total number of all examples used for evaluation.
+     * Otherwise, this is the count of examples that according to the ground
+     * truth were annotated by the
+     * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
+     * 
+ * + * int32 evaluated_example_count = 6; + */ + public Builder clearEvaluatedExampleCount() { + + evaluatedExampleCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ModelEvaluation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ModelEvaluation) + private static final com.google.cloud.automl.v1.ModelEvaluation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ModelEvaluation(); + } + + public static com.google.cloud.automl.v1.ModelEvaluation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelEvaluation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ModelEvaluation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.ModelEvaluation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluationName.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluationName.java new file mode 100644 index 000000000..5cc15edc5 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluationName.java @@ -0,0 +1,251 @@ +/* + * 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.automl.v1; + +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 +@javax.annotation.Generated("by GAPIC protoc plugin") +public class ModelEvaluationName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String model; + private final String modelEvaluation; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public String getModelEvaluation() { + return modelEvaluation; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ModelEvaluationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + model = Preconditions.checkNotNull(builder.getModel()); + modelEvaluation = Preconditions.checkNotNull(builder.getModelEvaluation()); + } + + public static ModelEvaluationName of( + String project, String location, String model, String modelEvaluation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setModel(model) + .setModelEvaluation(modelEvaluation) + .build(); + } + + public static String format( + String project, String location, String model, String modelEvaluation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setModel(model) + .setModelEvaluation(modelEvaluation) + .build() + .toString(); + } + + public static ModelEvaluationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "ModelEvaluationName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("model"), + matchMap.get("model_evaluation")); + } + + 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 (ModelEvaluationName 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("location", location); + fieldMapBuilder.put("model", model); + fieldMapBuilder.put("modelEvaluation", modelEvaluation); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "location", + location, + "model", + model, + "model_evaluation", + modelEvaluation); + } + + /** Builder for ModelEvaluationName. */ + public static class Builder { + + private String project; + private String location; + private String model; + private String modelEvaluation; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public String getModelEvaluation() { + return modelEvaluation; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setModel(String model) { + this.model = model; + return this; + } + + public Builder setModelEvaluation(String modelEvaluation) { + this.modelEvaluation = modelEvaluation; + return this; + } + + private Builder() {} + + private Builder(ModelEvaluationName modelEvaluationName) { + project = modelEvaluationName.project; + location = modelEvaluationName.location; + model = modelEvaluationName.model; + modelEvaluation = modelEvaluationName.modelEvaluation; + } + + public ModelEvaluationName build() { + return new ModelEvaluationName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ModelEvaluationName) { + ModelEvaluationName that = (ModelEvaluationName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.model.equals(that.model)) + && (this.modelEvaluation.equals(that.modelEvaluation)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= model.hashCode(); + h *= 1000003; + h ^= modelEvaluation.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluationOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluationOrBuilder.java new file mode 100644 index 000000000..1d35478fa --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluationOrBuilder.java @@ -0,0 +1,159 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/model_evaluation.proto + +package com.google.cloud.automl.v1; + +public interface ModelEvaluationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.ModelEvaluation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Model evaluation metrics for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + boolean hasTranslationEvaluationMetrics(); + /** + * + * + *
+   * Model evaluation metrics for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + com.google.cloud.automl.v1.TranslationEvaluationMetrics getTranslationEvaluationMetrics(); + /** + * + * + *
+   * Model evaluation metrics for translation.
+   * 
+ * + * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; + * + */ + com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder + getTranslationEvaluationMetricsOrBuilder(); + + /** + * + * + *
+   * Output only. Resource name of the model evaluation.
+   * Format:
+   * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the model evaluation.
+   * Format:
+   * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The ID of the annotation spec that the model evaluation applies to. The
+   * The ID is empty for the overall model evaluation.
+   * 
+ * + * string annotation_spec_id = 2; + */ + java.lang.String getAnnotationSpecId(); + /** + * + * + *
+   * Output only. The ID of the annotation spec that the model evaluation applies to. The
+   * The ID is empty for the overall model evaluation.
+   * 
+ * + * string annotation_spec_id = 2; + */ + com.google.protobuf.ByteString getAnnotationSpecIdBytes(); + + /** + * + * + *
+   * Output only. Timestamp when this model evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this model evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this model evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The number of examples used for model evaluation, i.e. for
+   * which ground truth from time of model creation is compared against the
+   * predicted annotations created by the model.
+   * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
+   * the total number of all examples used for evaluation.
+   * Otherwise, this is the count of examples that according to the ground
+   * truth were annotated by the
+   * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
+   * 
+ * + * int32 evaluated_example_count = 6; + */ + int getEvaluatedExampleCount(); + + public com.google.cloud.automl.v1.ModelEvaluation.MetricsCase getMetricsCase(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluationOuterClass.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluationOuterClass.java new file mode 100644 index 000000000..3ff72783f --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluationOuterClass.java @@ -0,0 +1,95 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/model_evaluation.proto + +package com.google.cloud.automl.v1; + +public final class ModelEvaluationOuterClass { + private ModelEvaluationOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_ModelEvaluation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_ModelEvaluation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/automl/v1/model_evaluatio" + + "n.proto\022\026google.cloud.automl.v1\032(google/" + + "cloud/automl/v1/translation.proto\032\037googl" + + "e/protobuf/timestamp.proto\032\034google/api/a" + + "nnotations.proto\"\370\001\n\017ModelEvaluation\022^\n\036" + + "translation_evaluation_metrics\030\t \001(\01324.g" + + "oogle.cloud.automl.v1.TranslationEvaluat" + + "ionMetricsH\000\022\014\n\004name\030\001 \001(\t\022\032\n\022annotation" + + "_spec_id\030\002 \001(\t\022/\n\013create_time\030\005 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\022\037\n\027evaluated_exa" + + "mple_count\030\006 \001(\005B\t\n\007metricsB\252\001\n\032com.goog" + + "le.cloud.automl.v1P\001Z fieldValuesMap; + + private final String project; + private final String location; + private final String model; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ModelName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + model = Preconditions.checkNotNull(builder.getModel()); + } + + public static ModelName of(String project, String location, String model) { + return newBuilder().setProject(project).setLocation(location).setModel(model).build(); + } + + public static String format(String project, String location, String model) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setModel(model) + .build() + .toString(); + } + + public static ModelName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "ModelName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("model")); + } + + 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 (ModelName 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("location", location); + fieldMapBuilder.put("model", model); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location, "model", model); + } + + /** Builder for ModelName. */ + public static class Builder { + + private String project; + private String location; + private String model; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setModel(String model) { + this.model = model; + return this; + } + + private Builder() {} + + private Builder(ModelName modelName) { + project = modelName.project; + location = modelName.location; + model = modelName.model; + } + + public ModelName build() { + return new ModelName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ModelName) { + ModelName that = (ModelName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.model.equals(that.model)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= model.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelOrBuilder.java new file mode 100644 index 000000000..4bd166f97 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelOrBuilder.java @@ -0,0 +1,296 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/model.proto + +package com.google.cloud.automl.v1; + +public interface ModelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.Model) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Metadata for translation models.
+   * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + */ + boolean hasTranslationModelMetadata(); + /** + * + * + *
+   * Metadata for translation models.
+   * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + */ + com.google.cloud.automl.v1.TranslationModelMetadata getTranslationModelMetadata(); + /** + * + * + *
+   * Metadata for translation models.
+   * 
+ * + * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; + */ + com.google.cloud.automl.v1.TranslationModelMetadataOrBuilder + getTranslationModelMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. Resource name of the model.
+   * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the model.
+   * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The name of the model to show in the interface. The name can be
+   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+   * and a-z, underscores
+   * (_), and ASCII digits 0-9. It must start with a letter.
+   * 
+ * + * string display_name = 2; + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The name of the model to show in the interface. The name can be
+   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
+   * and a-z, underscores
+   * (_), and ASCII digits 0-9. It must start with a letter.
+   * 
+ * + * string display_name = 2; + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. The resource ID of the dataset used to create the model. The dataset must
+   * come from the same ancestor project and location.
+   * 
+ * + * string dataset_id = 3; + */ + java.lang.String getDatasetId(); + /** + * + * + *
+   * Required. The resource ID of the dataset used to create the model. The dataset must
+   * come from the same ancestor project and location.
+   * 
+ * + * string dataset_id = 3; + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + + /** + * + * + *
+   * Output only. Timestamp when the model training finished  and can be used for prediction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when the model training finished  and can be used for prediction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when the model training finished  and can be used for prediction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this model was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this model was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this model was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Deployment state of the model. A model can only serve
+   * prediction requests after it gets deployed.
+   * 
+ * + * .google.cloud.automl.v1.Model.DeploymentState deployment_state = 8; + */ + int getDeploymentStateValue(); + /** + * + * + *
+   * Output only. Deployment state of the model. A model can only serve
+   * prediction requests after it gets deployed.
+   * 
+ * + * .google.cloud.automl.v1.Model.DeploymentState deployment_state = 8; + */ + com.google.cloud.automl.v1.Model.DeploymentState getDeploymentState(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your model.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 34; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your model.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 34; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your model.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 34; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your model.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 34; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your model.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * Label values are optional. Label keys must start with a letter.
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * 
+ * + * map<string, string> labels = 34; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + public com.google.cloud.automl.v1.Model.ModelMetadataCase getModelMetadataCase(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelOuterClass.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelOuterClass.java new file mode 100644 index 000000000..e9c67bb40 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelOuterClass.java @@ -0,0 +1,116 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/model.proto + +package com.google.cloud.automl.v1; + +public final class ModelOuterClass { + private ModelOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_Model_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_Model_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_Model_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_Model_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\"google/cloud/automl/v1/model.proto\022\026go" + + "ogle.cloud.automl.v1\032(google/cloud/autom" + + "l/v1/translation.proto\032\037google/protobuf/" + + "timestamp.proto\032\034google/api/annotations." + + "proto\"\221\004\n\005Model\022V\n\032translation_model_met" + + "adata\030\017 \001(\01320.google.cloud.automl.v1.Tra" + + "nslationModelMetadataH\000\022\014\n\004name\030\001 \001(\t\022\024\n" + + "\014display_name\030\002 \001(\t\022\022\n\ndataset_id\030\003 \001(\t\022" + + "/\n\013create_time\030\007 \001(\0132\032.google.protobuf.T" + + "imestamp\022/\n\013update_time\030\013 \001(\0132\032.google.p" + + "rotobuf.Timestamp\022G\n\020deployment_state\030\010 " + + "\001(\0162-.google.cloud.automl.v1.Model.Deplo" + + "ymentState\0229\n\006labels\030\" \003(\0132).google.clou" + + "d.automl.v1.Model.LabelsEntry\032-\n\013LabelsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"Q\n\017" + + "DeploymentState\022 \n\034DEPLOYMENT_STATE_UNSP" + + "ECIFIED\020\000\022\014\n\010DEPLOYED\020\001\022\016\n\nUNDEPLOYED\020\002B" + + "\020\n\016model_metadataB\252\001\n\032com.google.cloud.a" + + "utoml.v1P\001Z + * Metadata used across all long running operations returned by AutoML API. + * + * + * Protobuf type {@code google.cloud.automl.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + partialFailures_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + partialFailures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + partialFailures_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.automl.v1.DeleteOperationMetadata.Builder subBuilder = null; + if (detailsCase_ == 8) { + subBuilder = + ((com.google.cloud.automl.v1.DeleteOperationMetadata) details_).toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.automl.v1.DeleteOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.automl.v1.DeleteOperationMetadata) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 8; + break; + } + case 82: + { + com.google.cloud.automl.v1.CreateModelOperationMetadata.Builder subBuilder = null; + if (detailsCase_ == 10) { + subBuilder = + ((com.google.cloud.automl.v1.CreateModelOperationMetadata) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.automl.v1.CreateModelOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 10; + break; + } + case 104: + { + progressPercent_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000008) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.OperationMetadata.class, + com.google.cloud.automl.v1.OperationMetadata.Builder.class); + } + + private int bitField0_; + private int detailsCase_ = 0; + private java.lang.Object details_; + + public enum DetailsCase implements com.google.protobuf.Internal.EnumLite { + DELETE_DETAILS(8), + CREATE_MODEL_DETAILS(10), + DETAILS_NOT_SET(0); + private final int value; + + private DetailsCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static DetailsCase valueOf(int value) { + return forNumber(value); + } + + public static DetailsCase forNumber(int value) { + switch (value) { + case 8: + return DELETE_DETAILS; + case 10: + return CREATE_MODEL_DETAILS; + case 0: + return DETAILS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public static final int DELETE_DETAILS_FIELD_NUMBER = 8; + /** + * + * + *
+   * Details of a Delete operation.
+   * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public boolean hasDeleteDetails() { + return detailsCase_ == 8; + } + /** + * + * + *
+   * Details of a Delete operation.
+   * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public com.google.cloud.automl.v1.DeleteOperationMetadata getDeleteDetails() { + if (detailsCase_ == 8) { + return (com.google.cloud.automl.v1.DeleteOperationMetadata) details_; + } + return com.google.cloud.automl.v1.DeleteOperationMetadata.getDefaultInstance(); + } + /** + * + * + *
+   * Details of a Delete operation.
+   * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder getDeleteDetailsOrBuilder() { + if (detailsCase_ == 8) { + return (com.google.cloud.automl.v1.DeleteOperationMetadata) details_; + } + return com.google.cloud.automl.v1.DeleteOperationMetadata.getDefaultInstance(); + } + + public static final int CREATE_MODEL_DETAILS_FIELD_NUMBER = 10; + /** + * + * + *
+   * Details of CreateModel operation.
+   * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public boolean hasCreateModelDetails() { + return detailsCase_ == 10; + } + /** + * + * + *
+   * Details of CreateModel operation.
+   * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public com.google.cloud.automl.v1.CreateModelOperationMetadata getCreateModelDetails() { + if (detailsCase_ == 10) { + return (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_; + } + return com.google.cloud.automl.v1.CreateModelOperationMetadata.getDefaultInstance(); + } + /** + * + * + *
+   * Details of CreateModel operation.
+   * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public com.google.cloud.automl.v1.CreateModelOperationMetadataOrBuilder + getCreateModelDetailsOrBuilder() { + if (detailsCase_ == 10) { + return (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_; + } + return com.google.cloud.automl.v1.CreateModelOperationMetadata.getDefaultInstance(); + } + + public static final int PROGRESS_PERCENT_FIELD_NUMBER = 13; + private int progressPercent_; + /** + * + * + *
+   * Output only. Progress of operation. Range: [0, 100].
+   * Not used currently.
+   * 
+ * + * int32 progress_percent = 13; + */ + public int getProgressPercent() { + return progressPercent_; + } + + public static final int PARTIAL_FAILURES_FIELD_NUMBER = 2; + private java.util.List partialFailures_; + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + return partialFailures_.size(); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + return partialFailures_.get(index); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + return partialFailures_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < partialFailures_.size(); i++) { + output.writeMessage(2, partialFailures_.get(i)); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (detailsCase_ == 8) { + output.writeMessage(8, (com.google.cloud.automl.v1.DeleteOperationMetadata) details_); + } + if (detailsCase_ == 10) { + output.writeMessage(10, (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_); + } + if (progressPercent_ != 0) { + output.writeInt32(13, progressPercent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < partialFailures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, partialFailures_.get(i)); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (detailsCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.automl.v1.DeleteOperationMetadata) details_); + } + if (detailsCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_); + } + if (progressPercent_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(13, progressPercent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.OperationMetadata other = + (com.google.cloud.automl.v1.OperationMetadata) obj; + + if (getProgressPercent() != other.getProgressPercent()) return false; + if (!getPartialFailuresList().equals(other.getPartialFailuresList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDetailsCase().equals(other.getDetailsCase())) return false; + switch (detailsCase_) { + case 8: + if (!getDeleteDetails().equals(other.getDeleteDetails())) return false; + break; + case 10: + if (!getCreateModelDetails().equals(other.getCreateModelDetails())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROGRESS_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getProgressPercent(); + if (getPartialFailuresCount() > 0) { + hash = (37 * hash) + PARTIAL_FAILURES_FIELD_NUMBER; + hash = (53 * hash) + getPartialFailuresList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (detailsCase_) { + case 8: + hash = (37 * hash) + DELETE_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDeleteDetails().hashCode(); + break; + case 10: + hash = (37 * hash) + CREATE_MODEL_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getCreateModelDetails().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata used across all long running operations returned by AutoML API.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.OperationMetadata) + com.google.cloud.automl.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.OperationMetadata.class, + com.google.cloud.automl.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartialFailuresFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + progressPercent_ = 0; + + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + partialFailuresBuilder_.clear(); + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + detailsCase_ = 0; + details_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.Operations + .internal_static_google_cloud_automl_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.automl.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.OperationMetadata build() { + com.google.cloud.automl.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.OperationMetadata buildPartial() { + com.google.cloud.automl.v1.OperationMetadata result = + new com.google.cloud.automl.v1.OperationMetadata(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (detailsCase_ == 8) { + if (deleteDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = deleteDetailsBuilder_.build(); + } + } + if (detailsCase_ == 10) { + if (createModelDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = createModelDetailsBuilder_.build(); + } + } + result.progressPercent_ = progressPercent_; + if (partialFailuresBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.partialFailures_ = partialFailures_; + } else { + result.partialFailures_ = partialFailuresBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + result.detailsCase_ = detailsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.automl.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.OperationMetadata other) { + if (other == com.google.cloud.automl.v1.OperationMetadata.getDefaultInstance()) return this; + if (other.getProgressPercent() != 0) { + setProgressPercent(other.getProgressPercent()); + } + if (partialFailuresBuilder_ == null) { + if (!other.partialFailures_.isEmpty()) { + if (partialFailures_.isEmpty()) { + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePartialFailuresIsMutable(); + partialFailures_.addAll(other.partialFailures_); + } + onChanged(); + } + } else { + if (!other.partialFailures_.isEmpty()) { + if (partialFailuresBuilder_.isEmpty()) { + partialFailuresBuilder_.dispose(); + partialFailuresBuilder_ = null; + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000008); + partialFailuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartialFailuresFieldBuilder() + : null; + } else { + partialFailuresBuilder_.addAllMessages(other.partialFailures_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getDetailsCase()) { + case DELETE_DETAILS: + { + mergeDeleteDetails(other.getDeleteDetails()); + break; + } + case CREATE_MODEL_DETAILS: + { + mergeCreateModelDetails(other.getCreateModelDetails()); + break; + } + case DETAILS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public Builder clearDetails() { + detailsCase_ = 0; + details_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.DeleteOperationMetadata, + com.google.cloud.automl.v1.DeleteOperationMetadata.Builder, + com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder> + deleteDetailsBuilder_; + /** + * + * + *
+     * Details of a Delete operation.
+     * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public boolean hasDeleteDetails() { + return detailsCase_ == 8; + } + /** + * + * + *
+     * Details of a Delete operation.
+     * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public com.google.cloud.automl.v1.DeleteOperationMetadata getDeleteDetails() { + if (deleteDetailsBuilder_ == null) { + if (detailsCase_ == 8) { + return (com.google.cloud.automl.v1.DeleteOperationMetadata) details_; + } + return com.google.cloud.automl.v1.DeleteOperationMetadata.getDefaultInstance(); + } else { + if (detailsCase_ == 8) { + return deleteDetailsBuilder_.getMessage(); + } + return com.google.cloud.automl.v1.DeleteOperationMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Details of a Delete operation.
+     * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public Builder setDeleteDetails(com.google.cloud.automl.v1.DeleteOperationMetadata value) { + if (deleteDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + deleteDetailsBuilder_.setMessage(value); + } + detailsCase_ = 8; + return this; + } + /** + * + * + *
+     * Details of a Delete operation.
+     * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public Builder setDeleteDetails( + com.google.cloud.automl.v1.DeleteOperationMetadata.Builder builderForValue) { + if (deleteDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + deleteDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 8; + return this; + } + /** + * + * + *
+     * Details of a Delete operation.
+     * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public Builder mergeDeleteDetails(com.google.cloud.automl.v1.DeleteOperationMetadata value) { + if (deleteDetailsBuilder_ == null) { + if (detailsCase_ == 8 + && details_ + != com.google.cloud.automl.v1.DeleteOperationMetadata.getDefaultInstance()) { + details_ = + com.google.cloud.automl.v1.DeleteOperationMetadata.newBuilder( + (com.google.cloud.automl.v1.DeleteOperationMetadata) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 8) { + deleteDetailsBuilder_.mergeFrom(value); + } + deleteDetailsBuilder_.setMessage(value); + } + detailsCase_ = 8; + return this; + } + /** + * + * + *
+     * Details of a Delete operation.
+     * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public Builder clearDeleteDetails() { + if (deleteDetailsBuilder_ == null) { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + } + deleteDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Details of a Delete operation.
+     * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public com.google.cloud.automl.v1.DeleteOperationMetadata.Builder getDeleteDetailsBuilder() { + return getDeleteDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Details of a Delete operation.
+     * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + public com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder getDeleteDetailsOrBuilder() { + if ((detailsCase_ == 8) && (deleteDetailsBuilder_ != null)) { + return deleteDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 8) { + return (com.google.cloud.automl.v1.DeleteOperationMetadata) details_; + } + return com.google.cloud.automl.v1.DeleteOperationMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Details of a Delete operation.
+     * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.DeleteOperationMetadata, + com.google.cloud.automl.v1.DeleteOperationMetadata.Builder, + com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder> + getDeleteDetailsFieldBuilder() { + if (deleteDetailsBuilder_ == null) { + if (!(detailsCase_ == 8)) { + details_ = com.google.cloud.automl.v1.DeleteOperationMetadata.getDefaultInstance(); + } + deleteDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.DeleteOperationMetadata, + com.google.cloud.automl.v1.DeleteOperationMetadata.Builder, + com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder>( + (com.google.cloud.automl.v1.DeleteOperationMetadata) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 8; + onChanged(); + ; + return deleteDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.CreateModelOperationMetadata, + com.google.cloud.automl.v1.CreateModelOperationMetadata.Builder, + com.google.cloud.automl.v1.CreateModelOperationMetadataOrBuilder> + createModelDetailsBuilder_; + /** + * + * + *
+     * Details of CreateModel operation.
+     * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public boolean hasCreateModelDetails() { + return detailsCase_ == 10; + } + /** + * + * + *
+     * Details of CreateModel operation.
+     * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public com.google.cloud.automl.v1.CreateModelOperationMetadata getCreateModelDetails() { + if (createModelDetailsBuilder_ == null) { + if (detailsCase_ == 10) { + return (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_; + } + return com.google.cloud.automl.v1.CreateModelOperationMetadata.getDefaultInstance(); + } else { + if (detailsCase_ == 10) { + return createModelDetailsBuilder_.getMessage(); + } + return com.google.cloud.automl.v1.CreateModelOperationMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Details of CreateModel operation.
+     * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public Builder setCreateModelDetails( + com.google.cloud.automl.v1.CreateModelOperationMetadata value) { + if (createModelDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + createModelDetailsBuilder_.setMessage(value); + } + detailsCase_ = 10; + return this; + } + /** + * + * + *
+     * Details of CreateModel operation.
+     * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public Builder setCreateModelDetails( + com.google.cloud.automl.v1.CreateModelOperationMetadata.Builder builderForValue) { + if (createModelDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + createModelDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 10; + return this; + } + /** + * + * + *
+     * Details of CreateModel operation.
+     * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public Builder mergeCreateModelDetails( + com.google.cloud.automl.v1.CreateModelOperationMetadata value) { + if (createModelDetailsBuilder_ == null) { + if (detailsCase_ == 10 + && details_ + != com.google.cloud.automl.v1.CreateModelOperationMetadata.getDefaultInstance()) { + details_ = + com.google.cloud.automl.v1.CreateModelOperationMetadata.newBuilder( + (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 10) { + createModelDetailsBuilder_.mergeFrom(value); + } + createModelDetailsBuilder_.setMessage(value); + } + detailsCase_ = 10; + return this; + } + /** + * + * + *
+     * Details of CreateModel operation.
+     * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public Builder clearCreateModelDetails() { + if (createModelDetailsBuilder_ == null) { + if (detailsCase_ == 10) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 10) { + detailsCase_ = 0; + details_ = null; + } + createModelDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Details of CreateModel operation.
+     * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public com.google.cloud.automl.v1.CreateModelOperationMetadata.Builder + getCreateModelDetailsBuilder() { + return getCreateModelDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Details of CreateModel operation.
+     * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + public com.google.cloud.automl.v1.CreateModelOperationMetadataOrBuilder + getCreateModelDetailsOrBuilder() { + if ((detailsCase_ == 10) && (createModelDetailsBuilder_ != null)) { + return createModelDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 10) { + return (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_; + } + return com.google.cloud.automl.v1.CreateModelOperationMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Details of CreateModel operation.
+     * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.CreateModelOperationMetadata, + com.google.cloud.automl.v1.CreateModelOperationMetadata.Builder, + com.google.cloud.automl.v1.CreateModelOperationMetadataOrBuilder> + getCreateModelDetailsFieldBuilder() { + if (createModelDetailsBuilder_ == null) { + if (!(detailsCase_ == 10)) { + details_ = com.google.cloud.automl.v1.CreateModelOperationMetadata.getDefaultInstance(); + } + createModelDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.CreateModelOperationMetadata, + com.google.cloud.automl.v1.CreateModelOperationMetadata.Builder, + com.google.cloud.automl.v1.CreateModelOperationMetadataOrBuilder>( + (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 10; + onChanged(); + ; + return createModelDetailsBuilder_; + } + + private int progressPercent_; + /** + * + * + *
+     * Output only. Progress of operation. Range: [0, 100].
+     * Not used currently.
+     * 
+ * + * int32 progress_percent = 13; + */ + public int getProgressPercent() { + return progressPercent_; + } + /** + * + * + *
+     * Output only. Progress of operation. Range: [0, 100].
+     * Not used currently.
+     * 
+ * + * int32 progress_percent = 13; + */ + public Builder setProgressPercent(int value) { + + progressPercent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Progress of operation. Range: [0, 100].
+     * Not used currently.
+     * 
+ * + * int32 progress_percent = 13; + */ + public Builder clearProgressPercent() { + + progressPercent_ = 0; + onChanged(); + return this; + } + + private java.util.List partialFailures_ = + java.util.Collections.emptyList(); + + private void ensurePartialFailuresIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + partialFailures_ = new java.util.ArrayList(partialFailures_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + partialFailuresBuilder_; + + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + if (partialFailuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialFailures_); + } else { + return partialFailuresBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + if (partialFailuresBuilder_ == null) { + return partialFailures_.size(); + } else { + return partialFailuresBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, value); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addAllPartialFailures( + java.lang.Iterable values) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialFailures_); + onChanged(); + } else { + partialFailuresBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder clearPartialFailures() { + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder removePartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.remove(index); + onChanged(); + } else { + partialFailuresBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder getPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + if (partialFailuresBuilder_ != null) { + return partialFailuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialFailures_); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder() { + return getPartialFailuresFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresBuilderList() { + return getPartialFailuresFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getPartialFailuresFieldBuilder() { + if (partialFailuresBuilder_ == null) { + partialFailuresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + partialFailures_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + partialFailures_ = null; + } + return partialFailuresBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.OperationMetadata) + private static final com.google.cloud.automl.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.OperationMetadata(); + } + + public static com.google.cloud.automl.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000..b590babc5 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,229 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/operations.proto + +package com.google.cloud.automl.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Details of a Delete operation.
+   * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + boolean hasDeleteDetails(); + /** + * + * + *
+   * Details of a Delete operation.
+   * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + com.google.cloud.automl.v1.DeleteOperationMetadata getDeleteDetails(); + /** + * + * + *
+   * Details of a Delete operation.
+   * 
+ * + * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; + */ + com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder getDeleteDetailsOrBuilder(); + + /** + * + * + *
+   * Details of CreateModel operation.
+   * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + boolean hasCreateModelDetails(); + /** + * + * + *
+   * Details of CreateModel operation.
+   * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + com.google.cloud.automl.v1.CreateModelOperationMetadata getCreateModelDetails(); + /** + * + * + *
+   * Details of CreateModel operation.
+   * 
+ * + * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; + */ + com.google.cloud.automl.v1.CreateModelOperationMetadataOrBuilder getCreateModelDetailsOrBuilder(); + + /** + * + * + *
+   * Output only. Progress of operation. Range: [0, 100].
+   * Not used currently.
+   * 
+ * + * int32 progress_percent = 13; + */ + int getProgressPercent(); + + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.Status getPartialFailures(int index); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + int getPartialFailuresCount(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresOrBuilderList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index); + + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + public com.google.cloud.automl.v1.OperationMetadata.DetailsCase getDetailsCase(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Operations.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Operations.java new file mode 100644 index 000000000..85f5d7f14 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Operations.java @@ -0,0 +1,137 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/operations.proto + +package com.google.cloud.automl.v1; + +public final class Operations { + private Operations() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_DeleteOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_DeleteOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_CreateModelOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_CreateModelOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/cloud/automl/v1/operations.prot" + + "o\022\026google.cloud.automl.v1\032\037google/cloud/" + + "automl/v1/io.proto\032\"google/cloud/automl/" + + "v1/model.proto\032-google/cloud/automl/v1/m" + + "odel_evaluation.proto\032/google/cloud/auto" + + "ml/v1/prediction_service.proto\032$google/c" + + "loud/automl/v1/service.proto\032\033google/pro" + + "tobuf/empty.proto\032\037google/protobuf/times" + + "tamp.proto\032\027google/rpc/status.proto\032\034goo" + + "gle/api/annotations.proto\"\351\002\n\021OperationM" + + "etadata\022I\n\016delete_details\030\010 \001(\0132/.google" + + ".cloud.automl.v1.DeleteOperationMetadata" + + "H\000\022T\n\024create_model_details\030\n \001(\01324.googl" + + "e.cloud.automl.v1.CreateModelOperationMe" + + "tadataH\000\022\030\n\020progress_percent\030\r \001(\005\022,\n\020pa" + + "rtial_failures\030\002 \003(\0132\022.google.rpc.Status" + + "\022/\n\013create_time\030\003 \001(\0132\032.google.protobuf." + + "Timestamp\022/\n\013update_time\030\004 \001(\0132\032.google." + + "protobuf.TimestampB\t\n\007details\"\031\n\027DeleteO" + + "perationMetadata\"\036\n\034CreateModelOperation" + + "MetadataB\252\001\n\032com.google.cloud.automl.v1P" + + "\001Z + * * For Translation: + * CSV file `translation.csv`, with each line in format: + * ML_USE,GCS_FILE_PATH + * GCS_FILE_PATH leads to a .TSV file which describes examples that have + * given ML_USE, using the following row format per line: + * TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target + * language) + * `export_data_<automl-dataset-display-name>_<timestamp-of-export-call>` + * where <automl-dataset-display-name> will be made + * BigQuery-dataset-name compatible (e.g. most special characters will + * become underscores), and timestamp will be in + * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that + * dataset a new table called `primary_table` will be created, and + * filled with precisely the same data as this obtained on import. + * + * + * Protobuf type {@code google.cloud.automl.v1.OutputConfig} + */ +public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.OutputConfig) + OutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputConfig() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.automl.v1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = ((com.google.cloud.automl.v1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.automl.v1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.automl.v1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.OutputConfig.class, + com.google.cloud.automl.v1.OutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase implements com.google.protobuf.Internal.EnumLite { + GCS_DESTINATION(1), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * For Image Object Detection, Text Extraction, Video Classification and
+   * Tables, in the given directory a new directory will be created with name:
+   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory.
+   * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * For Image Object Detection, Text Extraction, Video Classification and
+   * Tables, in the given directory a new directory will be created with name:
+   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory.
+   * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.automl.v1.GcsDestination) destination_; + } + return com.google.cloud.automl.v1.GcsDestination.getDefaultInstance(); + } + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * For Image Object Detection, Text Extraction, Video Classification and
+   * Tables, in the given directory a new directory will be created with name:
+   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory.
+   * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.automl.v1.GcsDestination) destination_; + } + return com.google.cloud.automl.v1.GcsDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.automl.v1.GcsDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.automl.v1.GcsDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.OutputConfig other = (com.google.cloud.automl.v1.OutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination().equals(other.getGcsDestination())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OutputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * *  For Translation:
+   *         CSV file `translation.csv`, with each line in format:
+   *         ML_USE,GCS_FILE_PATH
+   *         GCS_FILE_PATH leads to a .TSV file which describes examples that have
+   *         given ML_USE, using the following row format per line:
+   *         TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target
+   *         language)
+   * `export_data_<automl-dataset-display-name>_<timestamp-of-export-call>`
+   *           where <automl-dataset-display-name> will be made
+   *           BigQuery-dataset-name compatible (e.g. most special characters will
+   *           become underscores), and timestamp will be in
+   *           YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that
+   *           dataset a new table called `primary_table` will be created, and
+   *           filled with precisely the same data as this obtained on import.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.OutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.OutputConfig) + com.google.cloud.automl.v1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.OutputConfig.class, + com.google.cloud.automl.v1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.Io + .internal_static_google_cloud_automl_v1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.automl.v1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.OutputConfig build() { + com.google.cloud.automl.v1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.OutputConfig buildPartial() { + com.google.cloud.automl.v1.OutputConfig result = + new com.google.cloud.automl.v1.OutputConfig(this); + if (destinationCase_ == 1) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.OutputConfig) { + return mergeFrom((com.google.cloud.automl.v1.OutputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.OutputConfig other) { + if (other == com.google.cloud.automl.v1.OutputConfig.getDefaultInstance()) return this; + switch (other.getDestinationCase()) { + case GCS_DESTINATION: + { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.OutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.GcsDestination, + com.google.cloud.automl.v1.GcsDestination.Builder, + com.google.cloud.automl.v1.GcsDestinationOrBuilder> + gcsDestinationBuilder_; + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * For Image Object Detection, Text Extraction, Video Classification and
+     * Tables, in the given directory a new directory will be created with name:
+     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory.
+     * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * For Image Object Detection, Text Extraction, Video Classification and
+     * Tables, in the given directory a new directory will be created with name:
+     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory.
+     * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.automl.v1.GcsDestination) destination_; + } + return com.google.cloud.automl.v1.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.automl.v1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * For Image Object Detection, Text Extraction, Video Classification and
+     * Tables, in the given directory a new directory will be created with name:
+     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory.
+     * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.automl.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * For Image Object Detection, Text Extraction, Video Classification and
+     * Tables, in the given directory a new directory will be created with name:
+     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory.
+     * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.automl.v1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * For Image Object Detection, Text Extraction, Video Classification and
+     * Tables, in the given directory a new directory will be created with name:
+     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory.
+     * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.automl.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 + && destination_ != com.google.cloud.automl.v1.GcsDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.automl.v1.GcsDestination.newBuilder( + (com.google.cloud.automl.v1.GcsDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + gcsDestinationBuilder_.mergeFrom(value); + } + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * For Image Object Detection, Text Extraction, Video Classification and
+     * Tables, in the given directory a new directory will be created with name:
+     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory.
+     * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * For Image Object Detection, Text Extraction, Video Classification and
+     * Tables, in the given directory a new directory will be created with name:
+     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory.
+     * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.automl.v1.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * For Image Object Detection, Text Extraction, Video Classification and
+     * Tables, in the given directory a new directory will be created with name:
+     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory.
+     * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.automl.v1.GcsDestination) destination_; + } + return com.google.cloud.automl.v1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * For Image Object Detection, Text Extraction, Video Classification and
+     * Tables, in the given directory a new directory will be created with name:
+     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory.
+     * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.GcsDestination, + com.google.cloud.automl.v1.GcsDestination.Builder, + com.google.cloud.automl.v1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.automl.v1.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.GcsDestination, + com.google.cloud.automl.v1.GcsDestination.Builder, + com.google.cloud.automl.v1.GcsDestinationOrBuilder>( + (com.google.cloud.automl.v1.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged(); + ; + return gcsDestinationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.OutputConfig) + private static final com.google.cloud.automl.v1.OutputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.OutputConfig(); + } + + public static com.google.cloud.automl.v1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OutputConfigOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OutputConfigOrBuilder.java new file mode 100644 index 000000000..d6f7b9c4d --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OutputConfigOrBuilder.java @@ -0,0 +1,73 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/io.proto + +package com.google.cloud.automl.v1; + +public interface OutputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * For Image Object Detection, Text Extraction, Video Classification and
+   * Tables, in the given directory a new directory will be created with name:
+   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory.
+   * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + boolean hasGcsDestination(); + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * For Image Object Detection, Text Extraction, Video Classification and
+   * Tables, in the given directory a new directory will be created with name:
+   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory.
+   * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.automl.v1.GcsDestination getGcsDestination(); + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * For Image Object Detection, Text Extraction, Video Classification and
+   * Tables, in the given directory a new directory will be created with name:
+   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory.
+   * 
+ * + * .google.cloud.automl.v1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + public com.google.cloud.automl.v1.OutputConfig.DestinationCase getDestinationCase(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequest.java new file mode 100644 index 000000000..1af62b0b8 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequest.java @@ -0,0 +1,1216 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/prediction_service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.PredictRequest} + */ +public final class PredictRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.PredictRequest) + PredictRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PredictRequest.newBuilder() to construct. + private PredictRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PredictRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PredictRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.automl.v1.ExamplePayload.Builder subBuilder = null; + if (payload_ != null) { + subBuilder = payload_.toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.automl.v1.ExamplePayload.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(payload_); + payload_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + params_ = + com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry params__ = + input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + params_.getMutableMap().put(params__.getKey(), params__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetParams(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.PredictRequest.class, + com.google.cloud.automl.v1.PredictRequest.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the model requested to serve the prediction.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the model requested to serve the prediction.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_FIELD_NUMBER = 2; + private com.google.cloud.automl.v1.ExamplePayload payload_; + /** + * + * + *
+   * Required. Payload to perform a prediction on. The payload must match the
+   * problem type that the model was trained to solve.
+   * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public boolean hasPayload() { + return payload_ != null; + } + /** + * + * + *
+   * Required. Payload to perform a prediction on. The payload must match the
+   * problem type that the model was trained to solve.
+   * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public com.google.cloud.automl.v1.ExamplePayload getPayload() { + return payload_ == null + ? com.google.cloud.automl.v1.ExamplePayload.getDefaultInstance() + : payload_; + } + /** + * + * + *
+   * Required. Payload to perform a prediction on. The payload must match the
+   * problem type that the model was trained to solve.
+   * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public com.google.cloud.automl.v1.ExamplePayloadOrBuilder getPayloadOrBuilder() { + return getPayload(); + } + + public static final int PARAMS_FIELD_NUMBER = 3; + + private static final class ParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictRequest_ParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + /** + * + * + *
+   * Additional domain-specific parameters, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 3; + */ + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetParams().getMap().containsKey(key); + } + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + /** + * + * + *
+   * Additional domain-specific parameters, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 3; + */ + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + /** + * + * + *
+   * Additional domain-specific parameters, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 3; + */ + public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Additional domain-specific parameters, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 3; + */ + public java.lang.String getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (payload_ != null) { + output.writeMessage(2, getPayload()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 3); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (payload_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPayload()); + } + for (java.util.Map.Entry entry : + internalGetParams().getMap().entrySet()) { + com.google.protobuf.MapEntry params__ = + ParamsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, params__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.PredictRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.PredictRequest other = + (com.google.cloud.automl.v1.PredictRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (!internalGetParams().equals(other.internalGetParams())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + if (!internalGetParams().getMap().isEmpty()) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetParams().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.PredictRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.PredictRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.PredictRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.PredictRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.PredictRequest) + com.google.cloud.automl.v1.PredictRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetParams(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableParams(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.PredictRequest.class, + com.google.cloud.automl.v1.PredictRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.PredictRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (payloadBuilder_ == null) { + payload_ = null; + } else { + payload_ = null; + payloadBuilder_ = null; + } + internalGetMutableParams().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.PredictRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.PredictRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.PredictRequest build() { + com.google.cloud.automl.v1.PredictRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.PredictRequest buildPartial() { + com.google.cloud.automl.v1.PredictRequest result = + new com.google.cloud.automl.v1.PredictRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (payloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = payloadBuilder_.build(); + } + result.params_ = internalGetParams(); + result.params_.makeImmutable(); + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.PredictRequest) { + return mergeFrom((com.google.cloud.automl.v1.PredictRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.PredictRequest other) { + if (other == com.google.cloud.automl.v1.PredictRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + internalGetMutableParams().mergeFrom(other.internalGetParams()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.PredictRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.PredictRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the model requested to serve the prediction.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the model requested to serve the prediction.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the model requested to serve the prediction.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the model requested to serve the prediction.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the model requested to serve the prediction.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.automl.v1.ExamplePayload payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.ExamplePayload, + com.google.cloud.automl.v1.ExamplePayload.Builder, + com.google.cloud.automl.v1.ExamplePayloadOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * Required. Payload to perform a prediction on. The payload must match the
+     * problem type that the model was trained to solve.
+     * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public boolean hasPayload() { + return payloadBuilder_ != null || payload_ != null; + } + /** + * + * + *
+     * Required. Payload to perform a prediction on. The payload must match the
+     * problem type that the model was trained to solve.
+     * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public com.google.cloud.automl.v1.ExamplePayload getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null + ? com.google.cloud.automl.v1.ExamplePayload.getDefaultInstance() + : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Payload to perform a prediction on. The payload must match the
+     * problem type that the model was trained to solve.
+     * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public Builder setPayload(com.google.cloud.automl.v1.ExamplePayload value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + payloadBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Payload to perform a prediction on. The payload must match the
+     * problem type that the model was trained to solve.
+     * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public Builder setPayload(com.google.cloud.automl.v1.ExamplePayload.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Payload to perform a prediction on. The payload must match the
+     * problem type that the model was trained to solve.
+     * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public Builder mergePayload(com.google.cloud.automl.v1.ExamplePayload value) { + if (payloadBuilder_ == null) { + if (payload_ != null) { + payload_ = + com.google.cloud.automl.v1.ExamplePayload.newBuilder(payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + payloadBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Payload to perform a prediction on. The payload must match the
+     * problem type that the model was trained to solve.
+     * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payload_ = null; + payloadBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Payload to perform a prediction on. The payload must match the
+     * problem type that the model was trained to solve.
+     * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public com.google.cloud.automl.v1.ExamplePayload.Builder getPayloadBuilder() { + + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Payload to perform a prediction on. The payload must match the
+     * problem type that the model was trained to solve.
+     * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + public com.google.cloud.automl.v1.ExamplePayloadOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null + ? com.google.cloud.automl.v1.ExamplePayload.getDefaultInstance() + : payload_; + } + } + /** + * + * + *
+     * Required. Payload to perform a prediction on. The payload must match the
+     * problem type that the model was trained to solve.
+     * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.ExamplePayload, + com.google.cloud.automl.v1.ExamplePayload.Builder, + com.google.cloud.automl.v1.ExamplePayloadOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.ExamplePayload, + com.google.cloud.automl.v1.ExamplePayload.Builder, + com.google.cloud.automl.v1.ExamplePayloadOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + private com.google.protobuf.MapField + internalGetMutableParams() { + onChanged(); + ; + if (params_ == null) { + params_ = com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); + } + if (!params_.isMutable()) { + params_ = params_.copy(); + } + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + /** + * + * + *
+     * Additional domain-specific parameters, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 3; + */ + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetParams().getMap().containsKey(key); + } + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + /** + * + * + *
+     * Additional domain-specific parameters, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 3; + */ + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + /** + * + * + *
+     * Additional domain-specific parameters, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 3; + */ + public java.lang.String getParamsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Additional domain-specific parameters, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 3; + */ + public java.lang.String getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearParams() { + internalGetMutableParams().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Additional domain-specific parameters, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 3; + */ + public Builder removeParams(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableParams().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableParams() { + return internalGetMutableParams().getMutableMap(); + } + /** + * + * + *
+     * Additional domain-specific parameters, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 3; + */ + public Builder putParams(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableParams().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Additional domain-specific parameters, any string must be up to 25000
+     * characters long.
+     * 
+ * + * map<string, string> params = 3; + */ + public Builder putAllParams(java.util.Map values) { + internalGetMutableParams().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.PredictRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.PredictRequest) + private static final com.google.cloud.automl.v1.PredictRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.PredictRequest(); + } + + public static com.google.cloud.automl.v1.PredictRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredictRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PredictRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.PredictRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequestOrBuilder.java new file mode 100644 index 000000000..6623665b7 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequestOrBuilder.java @@ -0,0 +1,139 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/prediction_service.proto + +package com.google.cloud.automl.v1; + +public interface PredictRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.PredictRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the model requested to serve the prediction.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the model requested to serve the prediction.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Payload to perform a prediction on. The payload must match the
+   * problem type that the model was trained to solve.
+   * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + boolean hasPayload(); + /** + * + * + *
+   * Required. Payload to perform a prediction on. The payload must match the
+   * problem type that the model was trained to solve.
+   * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + com.google.cloud.automl.v1.ExamplePayload getPayload(); + /** + * + * + *
+   * Required. Payload to perform a prediction on. The payload must match the
+   * problem type that the model was trained to solve.
+   * 
+ * + * .google.cloud.automl.v1.ExamplePayload payload = 2; + */ + com.google.cloud.automl.v1.ExamplePayloadOrBuilder getPayloadOrBuilder(); + + /** + * + * + *
+   * Additional domain-specific parameters, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 3; + */ + int getParamsCount(); + /** + * + * + *
+   * Additional domain-specific parameters, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 3; + */ + boolean containsParams(java.lang.String key); + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getParams(); + /** + * + * + *
+   * Additional domain-specific parameters, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 3; + */ + java.util.Map getParamsMap(); + /** + * + * + *
+   * Additional domain-specific parameters, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 3; + */ + java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Additional domain-specific parameters, any string must be up to 25000
+   * characters long.
+   * 
+ * + * map<string, string> params = 3; + */ + java.lang.String getParamsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponse.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponse.java new file mode 100644 index 000000000..c811b5dc7 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponse.java @@ -0,0 +1,1274 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/prediction_service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Response message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict].
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.PredictResponse} + */ +public final class PredictResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.PredictResponse) + PredictResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PredictResponse.newBuilder() to construct. + private PredictResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PredictResponse() { + payload_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PredictResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + payload_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + payload_.add( + input.readMessage( + com.google.cloud.automl.v1.AnnotationPayload.parser(), extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + metadata_ = + com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + payload_ = java.util.Collections.unmodifiableList(payload_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.PredictResponse.class, + com.google.cloud.automl.v1.PredictResponse.Builder.class); + } + + public static final int PAYLOAD_FIELD_NUMBER = 1; + private java.util.List payload_; + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public java.util.List getPayloadList() { + return payload_; + } + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public java.util.List + getPayloadOrBuilderList() { + return payload_; + } + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public int getPayloadCount() { + return payload_.size(); + } + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public com.google.cloud.automl.v1.AnnotationPayload getPayload(int index) { + return payload_.get(index); + } + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public com.google.cloud.automl.v1.AnnotationPayloadOrBuilder getPayloadOrBuilder(int index) { + return payload_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 2; + + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictResponse_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+   * Additional domain-specific prediction response metadata.
+   * 
+ * + * map<string, string> metadata = 2; + */ + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+   * Additional domain-specific prediction response metadata.
+   * 
+ * + * map<string, string> metadata = 2; + */ + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+   * Additional domain-specific prediction response metadata.
+   * 
+ * + * map<string, string> metadata = 2; + */ + public java.lang.String getMetadataOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Additional domain-specific prediction response metadata.
+   * 
+ * + * map<string, string> metadata = 2; + */ + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < payload_.size(); i++) { + output.writeMessage(1, payload_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < payload_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, payload_.get(i)); + } + for (java.util.Map.Entry entry : + internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry metadata__ = + MetadataDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metadata__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.PredictResponse)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.PredictResponse other = + (com.google.cloud.automl.v1.PredictResponse) obj; + + if (!getPayloadList().equals(other.getPayloadList())) return false; + if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPayloadCount() > 0) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayloadList().hashCode(); + } + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.PredictResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.PredictResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.PredictResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict].
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.PredictResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.PredictResponse) + com.google.cloud.automl.v1.PredictResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.PredictResponse.class, + com.google.cloud.automl.v1.PredictResponse.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.PredictResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (payloadBuilder_ == null) { + payload_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + payloadBuilder_.clear(); + } + internalGetMutableMetadata().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.PredictionServiceProto + .internal_static_google_cloud_automl_v1_PredictResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.PredictResponse getDefaultInstanceForType() { + return com.google.cloud.automl.v1.PredictResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.PredictResponse build() { + com.google.cloud.automl.v1.PredictResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.PredictResponse buildPartial() { + com.google.cloud.automl.v1.PredictResponse result = + new com.google.cloud.automl.v1.PredictResponse(this); + int from_bitField0_ = bitField0_; + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + payload_ = java.util.Collections.unmodifiableList(payload_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.payload_ = payload_; + } else { + result.payload_ = payloadBuilder_.build(); + } + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.PredictResponse) { + return mergeFrom((com.google.cloud.automl.v1.PredictResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.PredictResponse other) { + if (other == com.google.cloud.automl.v1.PredictResponse.getDefaultInstance()) return this; + if (payloadBuilder_ == null) { + if (!other.payload_.isEmpty()) { + if (payload_.isEmpty()) { + payload_ = other.payload_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePayloadIsMutable(); + payload_.addAll(other.payload_); + } + onChanged(); + } + } else { + if (!other.payload_.isEmpty()) { + if (payloadBuilder_.isEmpty()) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + payload_ = other.payload_; + bitField0_ = (bitField0_ & ~0x00000001); + payloadBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPayloadFieldBuilder() + : null; + } else { + payloadBuilder_.addAllMessages(other.payload_); + } + } + } + internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.PredictResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.PredictResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List payload_ = + java.util.Collections.emptyList(); + + private void ensurePayloadIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + payload_ = new java.util.ArrayList(payload_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.AnnotationPayload, + com.google.cloud.automl.v1.AnnotationPayload.Builder, + com.google.cloud.automl.v1.AnnotationPayloadOrBuilder> + payloadBuilder_; + + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public java.util.List getPayloadList() { + if (payloadBuilder_ == null) { + return java.util.Collections.unmodifiableList(payload_); + } else { + return payloadBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public int getPayloadCount() { + if (payloadBuilder_ == null) { + return payload_.size(); + } else { + return payloadBuilder_.getCount(); + } + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public com.google.cloud.automl.v1.AnnotationPayload getPayload(int index) { + if (payloadBuilder_ == null) { + return payload_.get(index); + } else { + return payloadBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public Builder setPayload(int index, com.google.cloud.automl.v1.AnnotationPayload value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePayloadIsMutable(); + payload_.set(index, value); + onChanged(); + } else { + payloadBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public Builder setPayload( + int index, com.google.cloud.automl.v1.AnnotationPayload.Builder builderForValue) { + if (payloadBuilder_ == null) { + ensurePayloadIsMutable(); + payload_.set(index, builderForValue.build()); + onChanged(); + } else { + payloadBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public Builder addPayload(com.google.cloud.automl.v1.AnnotationPayload value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePayloadIsMutable(); + payload_.add(value); + onChanged(); + } else { + payloadBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public Builder addPayload(int index, com.google.cloud.automl.v1.AnnotationPayload value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePayloadIsMutable(); + payload_.add(index, value); + onChanged(); + } else { + payloadBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public Builder addPayload( + com.google.cloud.automl.v1.AnnotationPayload.Builder builderForValue) { + if (payloadBuilder_ == null) { + ensurePayloadIsMutable(); + payload_.add(builderForValue.build()); + onChanged(); + } else { + payloadBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public Builder addPayload( + int index, com.google.cloud.automl.v1.AnnotationPayload.Builder builderForValue) { + if (payloadBuilder_ == null) { + ensurePayloadIsMutable(); + payload_.add(index, builderForValue.build()); + onChanged(); + } else { + payloadBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public Builder addAllPayload( + java.lang.Iterable values) { + if (payloadBuilder_ == null) { + ensurePayloadIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, payload_); + onChanged(); + } else { + payloadBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + payloadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public Builder removePayload(int index) { + if (payloadBuilder_ == null) { + ensurePayloadIsMutable(); + payload_.remove(index); + onChanged(); + } else { + payloadBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public com.google.cloud.automl.v1.AnnotationPayload.Builder getPayloadBuilder(int index) { + return getPayloadFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public com.google.cloud.automl.v1.AnnotationPayloadOrBuilder getPayloadOrBuilder(int index) { + if (payloadBuilder_ == null) { + return payload_.get(index); + } else { + return payloadBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public java.util.List + getPayloadOrBuilderList() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(payload_); + } + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public com.google.cloud.automl.v1.AnnotationPayload.Builder addPayloadBuilder() { + return getPayloadFieldBuilder() + .addBuilder(com.google.cloud.automl.v1.AnnotationPayload.getDefaultInstance()); + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public com.google.cloud.automl.v1.AnnotationPayload.Builder addPayloadBuilder(int index) { + return getPayloadFieldBuilder() + .addBuilder(index, com.google.cloud.automl.v1.AnnotationPayload.getDefaultInstance()); + } + /** + * + * + *
+     * Prediction result.
+     * Translation and Text Sentiment will return precisely one payload.
+     * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + public java.util.List + getPayloadBuilderList() { + return getPayloadFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.AnnotationPayload, + com.google.cloud.automl.v1.AnnotationPayload.Builder, + com.google.cloud.automl.v1.AnnotationPayloadOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.automl.v1.AnnotationPayload, + com.google.cloud.automl.v1.AnnotationPayload.Builder, + com.google.cloud.automl.v1.AnnotationPayloadOrBuilder>( + payload_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + private com.google.protobuf.MapField + internalGetMutableMetadata() { + onChanged(); + ; + if (metadata_ == null) { + metadata_ = + com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+     * Additional domain-specific prediction response metadata.
+     * 
+ * + * map<string, string> metadata = 2; + */ + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+     * Additional domain-specific prediction response metadata.
+     * 
+ * + * map<string, string> metadata = 2; + */ + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+     * Additional domain-specific prediction response metadata.
+     * 
+ * + * map<string, string> metadata = 2; + */ + public java.lang.String getMetadataOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Additional domain-specific prediction response metadata.
+     * 
+ * + * map<string, string> metadata = 2; + */ + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetadata() { + internalGetMutableMetadata().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Additional domain-specific prediction response metadata.
+     * 
+ * + * map<string, string> metadata = 2; + */ + public Builder removeMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableMetadata().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableMetadata() { + return internalGetMutableMetadata().getMutableMap(); + } + /** + * + * + *
+     * Additional domain-specific prediction response metadata.
+     * 
+ * + * map<string, string> metadata = 2; + */ + public Builder putMetadata(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableMetadata().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Additional domain-specific prediction response metadata.
+     * 
+ * + * map<string, string> metadata = 2; + */ + public Builder putAllMetadata(java.util.Map values) { + internalGetMutableMetadata().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.PredictResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.PredictResponse) + private static final com.google.cloud.automl.v1.PredictResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.PredictResponse(); + } + + public static com.google.cloud.automl.v1.PredictResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredictResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PredictResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.PredictResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponseOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponseOrBuilder.java new file mode 100644 index 000000000..43140f250 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponseOrBuilder.java @@ -0,0 +1,136 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/prediction_service.proto + +package com.google.cloud.automl.v1; + +public interface PredictResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.PredictResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + java.util.List getPayloadList(); + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + com.google.cloud.automl.v1.AnnotationPayload getPayload(int index); + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + int getPayloadCount(); + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + java.util.List + getPayloadOrBuilderList(); + /** + * + * + *
+   * Prediction result.
+   * Translation and Text Sentiment will return precisely one payload.
+   * 
+ * + * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; + */ + com.google.cloud.automl.v1.AnnotationPayloadOrBuilder getPayloadOrBuilder(int index); + + /** + * + * + *
+   * Additional domain-specific prediction response metadata.
+   * 
+ * + * map<string, string> metadata = 2; + */ + int getMetadataCount(); + /** + * + * + *
+   * Additional domain-specific prediction response metadata.
+   * 
+ * + * map<string, string> metadata = 2; + */ + boolean containsMetadata(java.lang.String key); + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Deprecated + java.util.Map getMetadata(); + /** + * + * + *
+   * Additional domain-specific prediction response metadata.
+   * 
+ * + * map<string, string> metadata = 2; + */ + java.util.Map getMetadataMap(); + /** + * + * + *
+   * Additional domain-specific prediction response metadata.
+   * 
+ * + * map<string, string> metadata = 2; + */ + java.lang.String getMetadataOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Additional domain-specific prediction response metadata.
+   * 
+ * + * map<string, string> metadata = 2; + */ + java.lang.String getMetadataOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictionServiceProto.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictionServiceProto.java new file mode 100644 index 000000000..6fe3699c2 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictionServiceProto.java @@ -0,0 +1,152 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/prediction_service.proto + +package com.google.cloud.automl.v1; + +public final class PredictionServiceProto { + private PredictionServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_PredictRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_PredictRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_PredictRequest_ParamsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_PredictRequest_ParamsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_PredictResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_PredictResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_PredictResponse_MetadataEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_PredictResponse_MetadataEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/automl/v1/prediction_serv" + + "ice.proto\022\026google.cloud.automl.v1\032\034googl" + + "e/api/annotations.proto\032/google/cloud/au" + + "toml/v1/annotation_payload.proto\032\'google" + + "/cloud/automl/v1/data_items.proto\032\037googl" + + "e/cloud/automl/v1/io.proto\032#google/longr" + + "unning/operations.proto\032\027google/api/clie" + + "nt.proto\"\312\001\n\016PredictRequest\022\014\n\004name\030\001 \001(" + + "\t\0227\n\007payload\030\002 \001(\0132&.google.cloud.automl" + + ".v1.ExamplePayload\022B\n\006params\030\003 \003(\01322.goo" + + "gle.cloud.automl.v1.PredictRequest.Param" + + "sEntry\032-\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001\"\307\001\n\017PredictResponse\022:\n\007pay" + + "load\030\001 \003(\0132).google.cloud.automl.v1.Anno" + + "tationPayload\022G\n\010metadata\030\002 \003(\01325.google" + + ".cloud.automl.v1.PredictResponse.Metadat" + + "aEntry\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\0012\372\001\n\021PredictionService\022\231\001" + + "\n\007Predict\022&.google.cloud.automl.v1.Predi" + + "ctRequest\032\'.google.cloud.automl.v1.Predi" + + "ctResponse\"=\202\323\344\223\0027\"2/v1/{name=projects/*" + + "/locations/*/models/*}:predict:\001*\032I\312A\025au" + + "toml.googleapis.com\322A.https://www.google" + + "apis.com/auth/cloud-platformB\302\001\n\032com.goo" + + "gle.cloud.automl.v1B\026PredictionServicePr" + + "otoP\001Z + * A representation of a text snippet. + * + * + * Protobuf type {@code google.cloud.automl.v1.TextSnippet} + */ +public final class TextSnippet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.TextSnippet) + TextSnippetOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextSnippet.newBuilder() to construct. + private TextSnippet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextSnippet() { + content_ = ""; + mimeType_ = ""; + contentUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextSnippet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + contentUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_TextSnippet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_TextSnippet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TextSnippet.class, + com.google.cloud.automl.v1.TextSnippet.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object content_; + /** + * + * + *
+   * Required. The content of the text snippet as a string. Up to 250000
+   * characters long.
+   * 
+ * + * string content = 1; + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The content of the text snippet as a string. Up to 250000
+   * characters long.
+   * 
+ * + * string content = 1; + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIME_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+   * Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
+   * values are "text/html" and "text/plain". If left blank, the format is
+   * automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
+   * 
+ * + * string mime_type = 2; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
+   * values are "text/html" and "text/plain". If left blank, the format is
+   * automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
+   * 
+ * + * string mime_type = 2; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object contentUri_; + /** + * + * + *
+   * Output only. HTTP URI where you can download the content.
+   * 
+ * + * string content_uri = 4; + */ + public java.lang.String getContentUri() { + java.lang.Object ref = contentUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. HTTP URI where you can download the content.
+   * 
+ * + * string content_uri = 4; + */ + public com.google.protobuf.ByteString getContentUriBytes() { + java.lang.Object ref = contentUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getContentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_); + } + if (!getMimeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); + } + if (!getContentUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, contentUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getContentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_); + } + if (!getMimeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); + } + if (!getContentUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, contentUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.TextSnippet)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.TextSnippet other = (com.google.cloud.automl.v1.TextSnippet) obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getContentUri().equals(other.getContentUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + CONTENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getContentUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TextSnippet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TextSnippet parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TextSnippet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.TextSnippet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A representation of a text snippet.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.TextSnippet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.TextSnippet) + com.google.cloud.automl.v1.TextSnippetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_TextSnippet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_TextSnippet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TextSnippet.class, + com.google.cloud.automl.v1.TextSnippet.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.TextSnippet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + content_ = ""; + + mimeType_ = ""; + + contentUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.DataItems + .internal_static_google_cloud_automl_v1_TextSnippet_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TextSnippet getDefaultInstanceForType() { + return com.google.cloud.automl.v1.TextSnippet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.TextSnippet build() { + com.google.cloud.automl.v1.TextSnippet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TextSnippet buildPartial() { + com.google.cloud.automl.v1.TextSnippet result = + new com.google.cloud.automl.v1.TextSnippet(this); + result.content_ = content_; + result.mimeType_ = mimeType_; + result.contentUri_ = contentUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.TextSnippet) { + return mergeFrom((com.google.cloud.automl.v1.TextSnippet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.TextSnippet other) { + if (other == com.google.cloud.automl.v1.TextSnippet.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (!other.getContentUri().isEmpty()) { + contentUri_ = other.contentUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.TextSnippet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.TextSnippet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * Required. The content of the text snippet as a string. Up to 250000
+     * characters long.
+     * 
+ * + * string content = 1; + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The content of the text snippet as a string. Up to 250000
+     * characters long.
+     * 
+ * + * string content = 1; + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The content of the text snippet as a string. Up to 250000
+     * characters long.
+     * 
+ * + * string content = 1; + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The content of the text snippet as a string. Up to 250000
+     * characters long.
+     * 
+ * + * string content = 1; + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The content of the text snippet as a string. Up to 250000
+     * characters long.
+     * 
+ * + * string content = 1; + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + content_ = value; + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
+     * values are "text/html" and "text/plain". If left blank, the format is
+     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
+     * 
+ * + * string mime_type = 2; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
+     * values are "text/html" and "text/plain". If left blank, the format is
+     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
+     * 
+ * + * string mime_type = 2; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
+     * values are "text/html" and "text/plain". If left blank, the format is
+     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
+     * 
+ * + * string mime_type = 2; + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
+     * values are "text/html" and "text/plain". If left blank, the format is
+     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
+     * 
+ * + * string mime_type = 2; + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
+     * values are "text/html" and "text/plain". If left blank, the format is
+     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
+     * 
+ * + * string mime_type = 2; + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + + private java.lang.Object contentUri_ = ""; + /** + * + * + *
+     * Output only. HTTP URI where you can download the content.
+     * 
+ * + * string content_uri = 4; + */ + public java.lang.String getContentUri() { + java.lang.Object ref = contentUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. HTTP URI where you can download the content.
+     * 
+ * + * string content_uri = 4; + */ + public com.google.protobuf.ByteString getContentUriBytes() { + java.lang.Object ref = contentUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. HTTP URI where you can download the content.
+     * 
+ * + * string content_uri = 4; + */ + public Builder setContentUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + contentUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. HTTP URI where you can download the content.
+     * 
+ * + * string content_uri = 4; + */ + public Builder clearContentUri() { + + contentUri_ = getDefaultInstance().getContentUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. HTTP URI where you can download the content.
+     * 
+ * + * string content_uri = 4; + */ + public Builder setContentUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + contentUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.TextSnippet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.TextSnippet) + private static final com.google.cloud.automl.v1.TextSnippet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.TextSnippet(); + } + + public static com.google.cloud.automl.v1.TextSnippet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextSnippet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextSnippet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TextSnippet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSnippetOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSnippetOrBuilder.java new file mode 100644 index 000000000..e6d7e55d6 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSnippetOrBuilder.java @@ -0,0 +1,94 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/data_items.proto + +package com.google.cloud.automl.v1; + +public interface TextSnippetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.TextSnippet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The content of the text snippet as a string. Up to 250000
+   * characters long.
+   * 
+ * + * string content = 1; + */ + java.lang.String getContent(); + /** + * + * + *
+   * Required. The content of the text snippet as a string. Up to 250000
+   * characters long.
+   * 
+ * + * string content = 1; + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
+   * values are "text/html" and "text/plain". If left blank, the format is
+   * automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
+   * 
+ * + * string mime_type = 2; + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
+   * values are "text/html" and "text/plain". If left blank, the format is
+   * automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
+   * 
+ * + * string mime_type = 2; + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * Output only. HTTP URI where you can download the content.
+   * 
+ * + * string content_uri = 4; + */ + java.lang.String getContentUri(); + /** + * + * + *
+   * Output only. HTTP URI where you can download the content.
+   * 
+ * + * string content_uri = 4; + */ + com.google.protobuf.ByteString getContentUriBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotation.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotation.java new file mode 100644 index 000000000..c91520fe0 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotation.java @@ -0,0 +1,717 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/translation.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Annotation details specific to translation.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.TranslationAnnotation} + */ +public final class TranslationAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.TranslationAnnotation) + TranslationAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TranslationAnnotation.newBuilder() to construct. + private TranslationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TranslationAnnotation() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TranslationAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.automl.v1.TextSnippet.Builder subBuilder = null; + if (translatedContent_ != null) { + subBuilder = translatedContent_.toBuilder(); + } + translatedContent_ = + input.readMessage( + com.google.cloud.automl.v1.TextSnippet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(translatedContent_); + translatedContent_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TranslationAnnotation.class, + com.google.cloud.automl.v1.TranslationAnnotation.Builder.class); + } + + public static final int TRANSLATED_CONTENT_FIELD_NUMBER = 1; + private com.google.cloud.automl.v1.TextSnippet translatedContent_; + /** + * + * + *
+   * Output only . The translated content.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public boolean hasTranslatedContent() { + return translatedContent_ != null; + } + /** + * + * + *
+   * Output only . The translated content.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public com.google.cloud.automl.v1.TextSnippet getTranslatedContent() { + return translatedContent_ == null + ? com.google.cloud.automl.v1.TextSnippet.getDefaultInstance() + : translatedContent_; + } + /** + * + * + *
+   * Output only . The translated content.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public com.google.cloud.automl.v1.TextSnippetOrBuilder getTranslatedContentOrBuilder() { + return getTranslatedContent(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (translatedContent_ != null) { + output.writeMessage(1, getTranslatedContent()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (translatedContent_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTranslatedContent()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.TranslationAnnotation)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.TranslationAnnotation other = + (com.google.cloud.automl.v1.TranslationAnnotation) obj; + + if (hasTranslatedContent() != other.hasTranslatedContent()) return false; + if (hasTranslatedContent()) { + if (!getTranslatedContent().equals(other.getTranslatedContent())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTranslatedContent()) { + hash = (37 * hash) + TRANSLATED_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getTranslatedContent().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.TranslationAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Annotation details specific to translation.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.TranslationAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.TranslationAnnotation) + com.google.cloud.automl.v1.TranslationAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TranslationAnnotation.class, + com.google.cloud.automl.v1.TranslationAnnotation.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.TranslationAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (translatedContentBuilder_ == null) { + translatedContent_ = null; + } else { + translatedContent_ = null; + translatedContentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationAnnotation getDefaultInstanceForType() { + return com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationAnnotation build() { + com.google.cloud.automl.v1.TranslationAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationAnnotation buildPartial() { + com.google.cloud.automl.v1.TranslationAnnotation result = + new com.google.cloud.automl.v1.TranslationAnnotation(this); + if (translatedContentBuilder_ == null) { + result.translatedContent_ = translatedContent_; + } else { + result.translatedContent_ = translatedContentBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.TranslationAnnotation) { + return mergeFrom((com.google.cloud.automl.v1.TranslationAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.TranslationAnnotation other) { + if (other == com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance()) + return this; + if (other.hasTranslatedContent()) { + mergeTranslatedContent(other.getTranslatedContent()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.TranslationAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.TranslationAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.automl.v1.TextSnippet translatedContent_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TextSnippet, + com.google.cloud.automl.v1.TextSnippet.Builder, + com.google.cloud.automl.v1.TextSnippetOrBuilder> + translatedContentBuilder_; + /** + * + * + *
+     * Output only . The translated content.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public boolean hasTranslatedContent() { + return translatedContentBuilder_ != null || translatedContent_ != null; + } + /** + * + * + *
+     * Output only . The translated content.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public com.google.cloud.automl.v1.TextSnippet getTranslatedContent() { + if (translatedContentBuilder_ == null) { + return translatedContent_ == null + ? com.google.cloud.automl.v1.TextSnippet.getDefaultInstance() + : translatedContent_; + } else { + return translatedContentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only . The translated content.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public Builder setTranslatedContent(com.google.cloud.automl.v1.TextSnippet value) { + if (translatedContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + translatedContent_ = value; + onChanged(); + } else { + translatedContentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only . The translated content.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public Builder setTranslatedContent( + com.google.cloud.automl.v1.TextSnippet.Builder builderForValue) { + if (translatedContentBuilder_ == null) { + translatedContent_ = builderForValue.build(); + onChanged(); + } else { + translatedContentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only . The translated content.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public Builder mergeTranslatedContent(com.google.cloud.automl.v1.TextSnippet value) { + if (translatedContentBuilder_ == null) { + if (translatedContent_ != null) { + translatedContent_ = + com.google.cloud.automl.v1.TextSnippet.newBuilder(translatedContent_) + .mergeFrom(value) + .buildPartial(); + } else { + translatedContent_ = value; + } + onChanged(); + } else { + translatedContentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only . The translated content.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public Builder clearTranslatedContent() { + if (translatedContentBuilder_ == null) { + translatedContent_ = null; + onChanged(); + } else { + translatedContent_ = null; + translatedContentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only . The translated content.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public com.google.cloud.automl.v1.TextSnippet.Builder getTranslatedContentBuilder() { + + onChanged(); + return getTranslatedContentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only . The translated content.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + public com.google.cloud.automl.v1.TextSnippetOrBuilder getTranslatedContentOrBuilder() { + if (translatedContentBuilder_ != null) { + return translatedContentBuilder_.getMessageOrBuilder(); + } else { + return translatedContent_ == null + ? com.google.cloud.automl.v1.TextSnippet.getDefaultInstance() + : translatedContent_; + } + } + /** + * + * + *
+     * Output only . The translated content.
+     * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TextSnippet, + com.google.cloud.automl.v1.TextSnippet.Builder, + com.google.cloud.automl.v1.TextSnippetOrBuilder> + getTranslatedContentFieldBuilder() { + if (translatedContentBuilder_ == null) { + translatedContentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.TextSnippet, + com.google.cloud.automl.v1.TextSnippet.Builder, + com.google.cloud.automl.v1.TextSnippetOrBuilder>( + getTranslatedContent(), getParentForChildren(), isClean()); + translatedContent_ = null; + } + return translatedContentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.TranslationAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.TranslationAnnotation) + private static final com.google.cloud.automl.v1.TranslationAnnotation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.TranslationAnnotation(); + } + + public static com.google.cloud.automl.v1.TranslationAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TranslationAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TranslationAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotationOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotationOrBuilder.java new file mode 100644 index 000000000..3f8f1c882 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotationOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/translation.proto + +package com.google.cloud.automl.v1; + +public interface TranslationAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.TranslationAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only . The translated content.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + boolean hasTranslatedContent(); + /** + * + * + *
+   * Output only . The translated content.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + com.google.cloud.automl.v1.TextSnippet getTranslatedContent(); + /** + * + * + *
+   * Output only . The translated content.
+   * 
+ * + * .google.cloud.automl.v1.TextSnippet translated_content = 1; + */ + com.google.cloud.automl.v1.TextSnippetOrBuilder getTranslatedContentOrBuilder(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadata.java new file mode 100644 index 000000000..101f6e909 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadata.java @@ -0,0 +1,775 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/translation.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Dataset metadata that is specific to translation.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.TranslationDatasetMetadata} + */ +public final class TranslationDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.TranslationDatasetMetadata) + TranslationDatasetMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use TranslationDatasetMetadata.newBuilder() to construct. + private TranslationDatasetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TranslationDatasetMetadata() { + sourceLanguageCode_ = ""; + targetLanguageCode_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TranslationDatasetMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceLanguageCode_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetLanguageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationDatasetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationDatasetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TranslationDatasetMetadata.class, + com.google.cloud.automl.v1.TranslationDatasetMetadata.Builder.class); + } + + public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceLanguageCode_; + /** + * + * + *
+   * Required. The BCP-47 language code of the source language.
+   * 
+ * + * string source_language_code = 1; + */ + public java.lang.String getSourceLanguageCode() { + java.lang.Object ref = sourceLanguageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceLanguageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The BCP-47 language code of the source language.
+   * 
+ * + * string source_language_code = 1; + */ + public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { + java.lang.Object ref = sourceLanguageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object targetLanguageCode_; + /** + * + * + *
+   * Required. The BCP-47 language code of the target language.
+   * 
+ * + * string target_language_code = 2; + */ + public java.lang.String getTargetLanguageCode() { + java.lang.Object ref = targetLanguageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetLanguageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The BCP-47 language code of the target language.
+   * 
+ * + * string target_language_code = 2; + */ + public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { + java.lang.Object ref = targetLanguageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getSourceLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceLanguageCode_); + } + if (!getTargetLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetLanguageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceLanguageCode_); + } + if (!getTargetLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetLanguageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.TranslationDatasetMetadata)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.TranslationDatasetMetadata other = + (com.google.cloud.automl.v1.TranslationDatasetMetadata) obj; + + if (!getSourceLanguageCode().equals(other.getSourceLanguageCode())) return false; + if (!getTargetLanguageCode().equals(other.getTargetLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SOURCE_LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getSourceLanguageCode().hashCode(); + hash = (37 * hash) + TARGET_LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getTargetLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.automl.v1.TranslationDatasetMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Dataset metadata that is specific to translation.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.TranslationDatasetMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.TranslationDatasetMetadata) + com.google.cloud.automl.v1.TranslationDatasetMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationDatasetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationDatasetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TranslationDatasetMetadata.class, + com.google.cloud.automl.v1.TranslationDatasetMetadata.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.TranslationDatasetMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + sourceLanguageCode_ = ""; + + targetLanguageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationDatasetMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationDatasetMetadata getDefaultInstanceForType() { + return com.google.cloud.automl.v1.TranslationDatasetMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationDatasetMetadata build() { + com.google.cloud.automl.v1.TranslationDatasetMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationDatasetMetadata buildPartial() { + com.google.cloud.automl.v1.TranslationDatasetMetadata result = + new com.google.cloud.automl.v1.TranslationDatasetMetadata(this); + result.sourceLanguageCode_ = sourceLanguageCode_; + result.targetLanguageCode_ = targetLanguageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.TranslationDatasetMetadata) { + return mergeFrom((com.google.cloud.automl.v1.TranslationDatasetMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.TranslationDatasetMetadata other) { + if (other == com.google.cloud.automl.v1.TranslationDatasetMetadata.getDefaultInstance()) + return this; + if (!other.getSourceLanguageCode().isEmpty()) { + sourceLanguageCode_ = other.sourceLanguageCode_; + onChanged(); + } + if (!other.getTargetLanguageCode().isEmpty()) { + targetLanguageCode_ = other.targetLanguageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.TranslationDatasetMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.automl.v1.TranslationDatasetMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sourceLanguageCode_ = ""; + /** + * + * + *
+     * Required. The BCP-47 language code of the source language.
+     * 
+ * + * string source_language_code = 1; + */ + public java.lang.String getSourceLanguageCode() { + java.lang.Object ref = sourceLanguageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceLanguageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The BCP-47 language code of the source language.
+     * 
+ * + * string source_language_code = 1; + */ + public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { + java.lang.Object ref = sourceLanguageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The BCP-47 language code of the source language.
+     * 
+ * + * string source_language_code = 1; + */ + public Builder setSourceLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceLanguageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BCP-47 language code of the source language.
+     * 
+ * + * string source_language_code = 1; + */ + public Builder clearSourceLanguageCode() { + + sourceLanguageCode_ = getDefaultInstance().getSourceLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BCP-47 language code of the source language.
+     * 
+ * + * string source_language_code = 1; + */ + public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceLanguageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetLanguageCode_ = ""; + /** + * + * + *
+     * Required. The BCP-47 language code of the target language.
+     * 
+ * + * string target_language_code = 2; + */ + public java.lang.String getTargetLanguageCode() { + java.lang.Object ref = targetLanguageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetLanguageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The BCP-47 language code of the target language.
+     * 
+ * + * string target_language_code = 2; + */ + public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { + java.lang.Object ref = targetLanguageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The BCP-47 language code of the target language.
+     * 
+ * + * string target_language_code = 2; + */ + public Builder setTargetLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetLanguageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BCP-47 language code of the target language.
+     * 
+ * + * string target_language_code = 2; + */ + public Builder clearTargetLanguageCode() { + + targetLanguageCode_ = getDefaultInstance().getTargetLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BCP-47 language code of the target language.
+     * 
+ * + * string target_language_code = 2; + */ + public Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetLanguageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.TranslationDatasetMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.TranslationDatasetMetadata) + private static final com.google.cloud.automl.v1.TranslationDatasetMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.TranslationDatasetMetadata(); + } + + public static com.google.cloud.automl.v1.TranslationDatasetMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TranslationDatasetMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TranslationDatasetMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationDatasetMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadataOrBuilder.java new file mode 100644 index 000000000..ed7ffbf5b --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadataOrBuilder.java @@ -0,0 +1,67 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/translation.proto + +package com.google.cloud.automl.v1; + +public interface TranslationDatasetMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.TranslationDatasetMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The BCP-47 language code of the source language.
+   * 
+ * + * string source_language_code = 1; + */ + java.lang.String getSourceLanguageCode(); + /** + * + * + *
+   * Required. The BCP-47 language code of the source language.
+   * 
+ * + * string source_language_code = 1; + */ + com.google.protobuf.ByteString getSourceLanguageCodeBytes(); + + /** + * + * + *
+   * Required. The BCP-47 language code of the target language.
+   * 
+ * + * string target_language_code = 2; + */ + java.lang.String getTargetLanguageCode(); + /** + * + * + *
+   * Required. The BCP-47 language code of the target language.
+   * 
+ * + * string target_language_code = 2; + */ + com.google.protobuf.ByteString getTargetLanguageCodeBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetrics.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetrics.java new file mode 100644 index 000000000..db7986fe9 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetrics.java @@ -0,0 +1,618 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/translation.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Evaluation metrics for the dataset.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.TranslationEvaluationMetrics} + */ +public final class TranslationEvaluationMetrics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.TranslationEvaluationMetrics) + TranslationEvaluationMetricsOrBuilder { + private static final long serialVersionUID = 0L; + // Use TranslationEvaluationMetrics.newBuilder() to construct. + private TranslationEvaluationMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TranslationEvaluationMetrics() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TranslationEvaluationMetrics( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + bleuScore_ = input.readDouble(); + break; + } + case 17: + { + baseBleuScore_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationEvaluationMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationEvaluationMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TranslationEvaluationMetrics.class, + com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder.class); + } + + public static final int BLEU_SCORE_FIELD_NUMBER = 1; + private double bleuScore_; + /** + * + * + *
+   * Output only. BLEU score.
+   * 
+ * + * double bleu_score = 1; + */ + public double getBleuScore() { + return bleuScore_; + } + + public static final int BASE_BLEU_SCORE_FIELD_NUMBER = 2; + private double baseBleuScore_; + /** + * + * + *
+   * Output only. BLEU score for base model.
+   * 
+ * + * double base_bleu_score = 2; + */ + public double getBaseBleuScore() { + return baseBleuScore_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (bleuScore_ != 0D) { + output.writeDouble(1, bleuScore_); + } + if (baseBleuScore_ != 0D) { + output.writeDouble(2, baseBleuScore_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bleuScore_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, bleuScore_); + } + if (baseBleuScore_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, baseBleuScore_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.TranslationEvaluationMetrics)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.TranslationEvaluationMetrics other = + (com.google.cloud.automl.v1.TranslationEvaluationMetrics) obj; + + if (java.lang.Double.doubleToLongBits(getBleuScore()) + != java.lang.Double.doubleToLongBits(other.getBleuScore())) return false; + if (java.lang.Double.doubleToLongBits(getBaseBleuScore()) + != java.lang.Double.doubleToLongBits(other.getBaseBleuScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BLEU_SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBleuScore())); + hash = (37 * hash) + BASE_BLEU_SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBaseBleuScore())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.automl.v1.TranslationEvaluationMetrics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Evaluation metrics for the dataset.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.TranslationEvaluationMetrics} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.TranslationEvaluationMetrics) + com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationEvaluationMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationEvaluationMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TranslationEvaluationMetrics.class, + com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.TranslationEvaluationMetrics.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bleuScore_ = 0D; + + baseBleuScore_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationEvaluationMetrics_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationEvaluationMetrics getDefaultInstanceForType() { + return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationEvaluationMetrics build() { + com.google.cloud.automl.v1.TranslationEvaluationMetrics result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationEvaluationMetrics buildPartial() { + com.google.cloud.automl.v1.TranslationEvaluationMetrics result = + new com.google.cloud.automl.v1.TranslationEvaluationMetrics(this); + result.bleuScore_ = bleuScore_; + result.baseBleuScore_ = baseBleuScore_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.TranslationEvaluationMetrics) { + return mergeFrom((com.google.cloud.automl.v1.TranslationEvaluationMetrics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.TranslationEvaluationMetrics other) { + if (other == com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance()) + return this; + if (other.getBleuScore() != 0D) { + setBleuScore(other.getBleuScore()); + } + if (other.getBaseBleuScore() != 0D) { + setBaseBleuScore(other.getBaseBleuScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.TranslationEvaluationMetrics parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.automl.v1.TranslationEvaluationMetrics) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double bleuScore_; + /** + * + * + *
+     * Output only. BLEU score.
+     * 
+ * + * double bleu_score = 1; + */ + public double getBleuScore() { + return bleuScore_; + } + /** + * + * + *
+     * Output only. BLEU score.
+     * 
+ * + * double bleu_score = 1; + */ + public Builder setBleuScore(double value) { + + bleuScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. BLEU score.
+     * 
+ * + * double bleu_score = 1; + */ + public Builder clearBleuScore() { + + bleuScore_ = 0D; + onChanged(); + return this; + } + + private double baseBleuScore_; + /** + * + * + *
+     * Output only. BLEU score for base model.
+     * 
+ * + * double base_bleu_score = 2; + */ + public double getBaseBleuScore() { + return baseBleuScore_; + } + /** + * + * + *
+     * Output only. BLEU score for base model.
+     * 
+ * + * double base_bleu_score = 2; + */ + public Builder setBaseBleuScore(double value) { + + baseBleuScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. BLEU score for base model.
+     * 
+ * + * double base_bleu_score = 2; + */ + public Builder clearBaseBleuScore() { + + baseBleuScore_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.TranslationEvaluationMetrics) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.TranslationEvaluationMetrics) + private static final com.google.cloud.automl.v1.TranslationEvaluationMetrics DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.TranslationEvaluationMetrics(); + } + + public static com.google.cloud.automl.v1.TranslationEvaluationMetrics getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TranslationEvaluationMetrics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TranslationEvaluationMetrics(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationEvaluationMetrics getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetricsOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetricsOrBuilder.java new file mode 100644 index 000000000..6459eb50f --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetricsOrBuilder.java @@ -0,0 +1,47 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/translation.proto + +package com.google.cloud.automl.v1; + +public interface TranslationEvaluationMetricsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.TranslationEvaluationMetrics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. BLEU score.
+   * 
+ * + * double bleu_score = 1; + */ + double getBleuScore(); + + /** + * + * + *
+   * Output only. BLEU score for base model.
+   * 
+ * + * double base_bleu_score = 2; + */ + double getBaseBleuScore(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadata.java new file mode 100644 index 000000000..8868bb5bf --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadata.java @@ -0,0 +1,970 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/translation.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Model metadata that is specific to translation.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.TranslationModelMetadata} + */ +public final class TranslationModelMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.TranslationModelMetadata) + TranslationModelMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use TranslationModelMetadata.newBuilder() to construct. + private TranslationModelMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TranslationModelMetadata() { + baseModel_ = ""; + sourceLanguageCode_ = ""; + targetLanguageCode_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TranslationModelMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + baseModel_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceLanguageCode_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetLanguageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TranslationModelMetadata.class, + com.google.cloud.automl.v1.TranslationModelMetadata.Builder.class); + } + + public static final int BASE_MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object baseModel_; + /** + * + * + *
+   * The resource name of the model to use as a baseline to train the custom
+   * model. If unset, we use the default base model provided by Google
+   * Translate. Format:
+   * `projects/{project_id}/locations/{location_id}/models/{model_id}`
+   * 
+ * + * string base_model = 1; + */ + public java.lang.String getBaseModel() { + java.lang.Object ref = baseModel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseModel_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the model to use as a baseline to train the custom
+   * model. If unset, we use the default base model provided by Google
+   * Translate. Format:
+   * `projects/{project_id}/locations/{location_id}/models/{model_id}`
+   * 
+ * + * string base_model = 1; + */ + public com.google.protobuf.ByteString getBaseModelBytes() { + java.lang.Object ref = baseModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object sourceLanguageCode_; + /** + * + * + *
+   * Output only. Inferred from the dataset.
+   * The source languge (The BCP-47 language code) that is used for training.
+   * 
+ * + * string source_language_code = 2; + */ + public java.lang.String getSourceLanguageCode() { + java.lang.Object ref = sourceLanguageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceLanguageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Inferred from the dataset.
+   * The source languge (The BCP-47 language code) that is used for training.
+   * 
+ * + * string source_language_code = 2; + */ + public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { + java.lang.Object ref = sourceLanguageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER = 3; + private volatile java.lang.Object targetLanguageCode_; + /** + * + * + *
+   * Output only. The target languge (The BCP-47 language code) that is used for
+   * training.
+   * 
+ * + * string target_language_code = 3; + */ + public java.lang.String getTargetLanguageCode() { + java.lang.Object ref = targetLanguageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetLanguageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The target languge (The BCP-47 language code) that is used for
+   * training.
+   * 
+ * + * string target_language_code = 3; + */ + public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { + java.lang.Object ref = targetLanguageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getBaseModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, baseModel_); + } + if (!getSourceLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceLanguageCode_); + } + if (!getTargetLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetLanguageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBaseModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, baseModel_); + } + if (!getSourceLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceLanguageCode_); + } + if (!getTargetLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetLanguageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.TranslationModelMetadata)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.TranslationModelMetadata other = + (com.google.cloud.automl.v1.TranslationModelMetadata) obj; + + if (!getBaseModel().equals(other.getBaseModel())) return false; + if (!getSourceLanguageCode().equals(other.getSourceLanguageCode())) return false; + if (!getTargetLanguageCode().equals(other.getTargetLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BASE_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getBaseModel().hashCode(); + hash = (37 * hash) + SOURCE_LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getSourceLanguageCode().hashCode(); + hash = (37 * hash) + TARGET_LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getTargetLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.TranslationModelMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Model metadata that is specific to translation.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.TranslationModelMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.TranslationModelMetadata) + com.google.cloud.automl.v1.TranslationModelMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.TranslationModelMetadata.class, + com.google.cloud.automl.v1.TranslationModelMetadata.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.TranslationModelMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + baseModel_ = ""; + + sourceLanguageCode_ = ""; + + targetLanguageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.TranslationProto + .internal_static_google_cloud_automl_v1_TranslationModelMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationModelMetadata getDefaultInstanceForType() { + return com.google.cloud.automl.v1.TranslationModelMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationModelMetadata build() { + com.google.cloud.automl.v1.TranslationModelMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationModelMetadata buildPartial() { + com.google.cloud.automl.v1.TranslationModelMetadata result = + new com.google.cloud.automl.v1.TranslationModelMetadata(this); + result.baseModel_ = baseModel_; + result.sourceLanguageCode_ = sourceLanguageCode_; + result.targetLanguageCode_ = targetLanguageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.TranslationModelMetadata) { + return mergeFrom((com.google.cloud.automl.v1.TranslationModelMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.TranslationModelMetadata other) { + if (other == com.google.cloud.automl.v1.TranslationModelMetadata.getDefaultInstance()) + return this; + if (!other.getBaseModel().isEmpty()) { + baseModel_ = other.baseModel_; + onChanged(); + } + if (!other.getSourceLanguageCode().isEmpty()) { + sourceLanguageCode_ = other.sourceLanguageCode_; + onChanged(); + } + if (!other.getTargetLanguageCode().isEmpty()) { + targetLanguageCode_ = other.targetLanguageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.TranslationModelMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.automl.v1.TranslationModelMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object baseModel_ = ""; + /** + * + * + *
+     * The resource name of the model to use as a baseline to train the custom
+     * model. If unset, we use the default base model provided by Google
+     * Translate. Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string base_model = 1; + */ + public java.lang.String getBaseModel() { + java.lang.Object ref = baseModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the model to use as a baseline to train the custom
+     * model. If unset, we use the default base model provided by Google
+     * Translate. Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string base_model = 1; + */ + public com.google.protobuf.ByteString getBaseModelBytes() { + java.lang.Object ref = baseModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the model to use as a baseline to train the custom
+     * model. If unset, we use the default base model provided by Google
+     * Translate. Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string base_model = 1; + */ + public Builder setBaseModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseModel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the model to use as a baseline to train the custom
+     * model. If unset, we use the default base model provided by Google
+     * Translate. Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string base_model = 1; + */ + public Builder clearBaseModel() { + + baseModel_ = getDefaultInstance().getBaseModel(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the model to use as a baseline to train the custom
+     * model. If unset, we use the default base model provided by Google
+     * Translate. Format:
+     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
+     * 
+ * + * string base_model = 1; + */ + public Builder setBaseModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + baseModel_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceLanguageCode_ = ""; + /** + * + * + *
+     * Output only. Inferred from the dataset.
+     * The source languge (The BCP-47 language code) that is used for training.
+     * 
+ * + * string source_language_code = 2; + */ + public java.lang.String getSourceLanguageCode() { + java.lang.Object ref = sourceLanguageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceLanguageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Inferred from the dataset.
+     * The source languge (The BCP-47 language code) that is used for training.
+     * 
+ * + * string source_language_code = 2; + */ + public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { + java.lang.Object ref = sourceLanguageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Inferred from the dataset.
+     * The source languge (The BCP-47 language code) that is used for training.
+     * 
+ * + * string source_language_code = 2; + */ + public Builder setSourceLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceLanguageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Inferred from the dataset.
+     * The source languge (The BCP-47 language code) that is used for training.
+     * 
+ * + * string source_language_code = 2; + */ + public Builder clearSourceLanguageCode() { + + sourceLanguageCode_ = getDefaultInstance().getSourceLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Inferred from the dataset.
+     * The source languge (The BCP-47 language code) that is used for training.
+     * 
+ * + * string source_language_code = 2; + */ + public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceLanguageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetLanguageCode_ = ""; + /** + * + * + *
+     * Output only. The target languge (The BCP-47 language code) that is used for
+     * training.
+     * 
+ * + * string target_language_code = 3; + */ + public java.lang.String getTargetLanguageCode() { + java.lang.Object ref = targetLanguageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetLanguageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The target languge (The BCP-47 language code) that is used for
+     * training.
+     * 
+ * + * string target_language_code = 3; + */ + public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { + java.lang.Object ref = targetLanguageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The target languge (The BCP-47 language code) that is used for
+     * training.
+     * 
+ * + * string target_language_code = 3; + */ + public Builder setTargetLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetLanguageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The target languge (The BCP-47 language code) that is used for
+     * training.
+     * 
+ * + * string target_language_code = 3; + */ + public Builder clearTargetLanguageCode() { + + targetLanguageCode_ = getDefaultInstance().getTargetLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The target languge (The BCP-47 language code) that is used for
+     * training.
+     * 
+ * + * string target_language_code = 3; + */ + public Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetLanguageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.TranslationModelMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.TranslationModelMetadata) + private static final com.google.cloud.automl.v1.TranslationModelMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.TranslationModelMetadata(); + } + + public static com.google.cloud.automl.v1.TranslationModelMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TranslationModelMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TranslationModelMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.TranslationModelMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadataOrBuilder.java new file mode 100644 index 000000000..e52aab3ba --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadataOrBuilder.java @@ -0,0 +1,98 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/translation.proto + +package com.google.cloud.automl.v1; + +public interface TranslationModelMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.TranslationModelMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the model to use as a baseline to train the custom
+   * model. If unset, we use the default base model provided by Google
+   * Translate. Format:
+   * `projects/{project_id}/locations/{location_id}/models/{model_id}`
+   * 
+ * + * string base_model = 1; + */ + java.lang.String getBaseModel(); + /** + * + * + *
+   * The resource name of the model to use as a baseline to train the custom
+   * model. If unset, we use the default base model provided by Google
+   * Translate. Format:
+   * `projects/{project_id}/locations/{location_id}/models/{model_id}`
+   * 
+ * + * string base_model = 1; + */ + com.google.protobuf.ByteString getBaseModelBytes(); + + /** + * + * + *
+   * Output only. Inferred from the dataset.
+   * The source languge (The BCP-47 language code) that is used for training.
+   * 
+ * + * string source_language_code = 2; + */ + java.lang.String getSourceLanguageCode(); + /** + * + * + *
+   * Output only. Inferred from the dataset.
+   * The source languge (The BCP-47 language code) that is used for training.
+   * 
+ * + * string source_language_code = 2; + */ + com.google.protobuf.ByteString getSourceLanguageCodeBytes(); + + /** + * + * + *
+   * Output only. The target languge (The BCP-47 language code) that is used for
+   * training.
+   * 
+ * + * string target_language_code = 3; + */ + java.lang.String getTargetLanguageCode(); + /** + * + * + *
+   * Output only. The target languge (The BCP-47 language code) that is used for
+   * training.
+   * 
+ * + * string target_language_code = 3; + */ + com.google.protobuf.ByteString getTargetLanguageCodeBytes(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationProto.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationProto.java new file mode 100644 index 000000000..11c27d0a2 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationProto.java @@ -0,0 +1,126 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/translation.proto + +package com.google.cloud.automl.v1; + +public final class TranslationProto { + private TranslationProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_TranslationDatasetMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_TranslationDatasetMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_TranslationEvaluationMetrics_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_TranslationEvaluationMetrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_TranslationModelMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_TranslationModelMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1_TranslationAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1_TranslationAnnotation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n(google/cloud/automl/v1/translation.pro" + + "to\022\026google.cloud.automl.v1\032\'google/cloud" + + "/automl/v1/data_items.proto\032\034google/api/" + + "annotations.proto\"X\n\032TranslationDatasetM" + + "etadata\022\034\n\024source_language_code\030\001 \001(\t\022\034\n" + + "\024target_language_code\030\002 \001(\t\"K\n\034Translati" + + "onEvaluationMetrics\022\022\n\nbleu_score\030\001 \001(\001\022" + + "\027\n\017base_bleu_score\030\002 \001(\001\"j\n\030TranslationM" + + "odelMetadata\022\022\n\nbase_model\030\001 \001(\t\022\034\n\024sour" + + "ce_language_code\030\002 \001(\t\022\034\n\024target_languag" + + "e_code\030\003 \001(\t\"X\n\025TranslationAnnotation\022?\n" + + "\022translated_content\030\001 \001(\0132#.google.cloud" + + ".automl.v1.TextSnippetB\274\001\n\032com.google.cl" + + "oud.automl.v1B\020TranslationProtoP\001Z + * Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1.AutoMl.UpdateDataset] + * + * + * Protobuf type {@code google.cloud.automl.v1.UpdateDatasetRequest} + */ +public final class UpdateDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.UpdateDatasetRequest) + UpdateDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDatasetRequest.newBuilder() to construct. + private UpdateDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDatasetRequest() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.automl.v1.Dataset.Builder subBuilder = null; + if (dataset_ != null) { + subBuilder = dataset_.toBuilder(); + } + dataset_ = + input.readMessage(com.google.cloud.automl.v1.Dataset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataset_); + dataset_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.UpdateDatasetRequest.class, + com.google.cloud.automl.v1.UpdateDatasetRequest.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private com.google.cloud.automl.v1.Dataset dataset_; + /** + * + * + *
+   * The dataset which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public boolean hasDataset() { + return dataset_ != null; + } + /** + * + * + *
+   * The dataset which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public com.google.cloud.automl.v1.Dataset getDataset() { + return dataset_ == null ? com.google.cloud.automl.v1.Dataset.getDefaultInstance() : dataset_; + } + /** + * + * + *
+   * The dataset which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetOrBuilder() { + return getDataset(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (dataset_ != null) { + output.writeMessage(1, getDataset()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataset()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.UpdateDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.UpdateDatasetRequest other = + (com.google.cloud.automl.v1.UpdateDatasetRequest) obj; + + if (hasDataset() != other.hasDataset()) return false; + if (hasDataset()) { + if (!getDataset().equals(other.getDataset())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDataset()) { + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.UpdateDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1.AutoMl.UpdateDataset]
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.UpdateDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.UpdateDatasetRequest) + com.google.cloud.automl.v1.UpdateDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.UpdateDatasetRequest.class, + com.google.cloud.automl.v1.UpdateDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.UpdateDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (datasetBuilder_ == null) { + dataset_ = null; + } else { + dataset_ = null; + datasetBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.UpdateDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.UpdateDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.UpdateDatasetRequest build() { + com.google.cloud.automl.v1.UpdateDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.UpdateDatasetRequest buildPartial() { + com.google.cloud.automl.v1.UpdateDatasetRequest result = + new com.google.cloud.automl.v1.UpdateDatasetRequest(this); + if (datasetBuilder_ == null) { + result.dataset_ = dataset_; + } else { + result.dataset_ = datasetBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.UpdateDatasetRequest) { + return mergeFrom((com.google.cloud.automl.v1.UpdateDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.UpdateDatasetRequest other) { + if (other == com.google.cloud.automl.v1.UpdateDatasetRequest.getDefaultInstance()) + return this; + if (other.hasDataset()) { + mergeDataset(other.getDataset()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.UpdateDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.UpdateDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.automl.v1.Dataset dataset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Dataset, + com.google.cloud.automl.v1.Dataset.Builder, + com.google.cloud.automl.v1.DatasetOrBuilder> + datasetBuilder_; + /** + * + * + *
+     * The dataset which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public boolean hasDataset() { + return datasetBuilder_ != null || dataset_ != null; + } + /** + * + * + *
+     * The dataset which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public com.google.cloud.automl.v1.Dataset getDataset() { + if (datasetBuilder_ == null) { + return dataset_ == null + ? com.google.cloud.automl.v1.Dataset.getDefaultInstance() + : dataset_; + } else { + return datasetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The dataset which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public Builder setDataset(com.google.cloud.automl.v1.Dataset value) { + if (datasetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + onChanged(); + } else { + datasetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The dataset which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public Builder setDataset(com.google.cloud.automl.v1.Dataset.Builder builderForValue) { + if (datasetBuilder_ == null) { + dataset_ = builderForValue.build(); + onChanged(); + } else { + datasetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The dataset which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public Builder mergeDataset(com.google.cloud.automl.v1.Dataset value) { + if (datasetBuilder_ == null) { + if (dataset_ != null) { + dataset_ = + com.google.cloud.automl.v1.Dataset.newBuilder(dataset_) + .mergeFrom(value) + .buildPartial(); + } else { + dataset_ = value; + } + onChanged(); + } else { + datasetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The dataset which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public Builder clearDataset() { + if (datasetBuilder_ == null) { + dataset_ = null; + onChanged(); + } else { + dataset_ = null; + datasetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The dataset which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public com.google.cloud.automl.v1.Dataset.Builder getDatasetBuilder() { + + onChanged(); + return getDatasetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The dataset which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetOrBuilder() { + if (datasetBuilder_ != null) { + return datasetBuilder_.getMessageOrBuilder(); + } else { + return dataset_ == null + ? com.google.cloud.automl.v1.Dataset.getDefaultInstance() + : dataset_; + } + } + /** + * + * + *
+     * The dataset which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Dataset, + com.google.cloud.automl.v1.Dataset.Builder, + com.google.cloud.automl.v1.DatasetOrBuilder> + getDatasetFieldBuilder() { + if (datasetBuilder_ == null) { + datasetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Dataset, + com.google.cloud.automl.v1.Dataset.Builder, + com.google.cloud.automl.v1.DatasetOrBuilder>( + getDataset(), getParentForChildren(), isClean()); + dataset_ = null; + } + return datasetBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.UpdateDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.UpdateDatasetRequest) + private static final com.google.cloud.automl.v1.UpdateDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.UpdateDatasetRequest(); + } + + public static com.google.cloud.automl.v1.UpdateDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.UpdateDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateDatasetRequestOrBuilder.java new file mode 100644 index 000000000..1594754f6 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateDatasetRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface UpdateDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.UpdateDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The dataset which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + boolean hasDataset(); + /** + * + * + *
+   * The dataset which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + com.google.cloud.automl.v1.Dataset getDataset(); + /** + * + * + *
+   * The dataset which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Dataset dataset = 1; + */ + com.google.cloud.automl.v1.DatasetOrBuilder getDatasetOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequest.java new file mode 100644 index 000000000..bdbe920f1 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequest.java @@ -0,0 +1,967 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +/** + * + * + *
+ * Request message for [AutoMl.UpdateModel][google.cloud.automl.v1.AutoMl.UpdateModel]
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1.UpdateModelRequest} + */ +public final class UpdateModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.UpdateModelRequest) + UpdateModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateModelRequest.newBuilder() to construct. + private UpdateModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateModelRequest() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.automl.v1.Model.Builder subBuilder = null; + if (model_ != null) { + subBuilder = model_.toBuilder(); + } + model_ = + input.readMessage(com.google.cloud.automl.v1.Model.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(model_); + model_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.UpdateModelRequest.class, + com.google.cloud.automl.v1.UpdateModelRequest.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private com.google.cloud.automl.v1.Model model_; + /** + * + * + *
+   * The model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public boolean hasModel() { + return model_ != null; + } + /** + * + * + *
+   * The model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.Model getModel() { + return model_ == null ? com.google.cloud.automl.v1.Model.getDefaultInstance() : model_; + } + /** + * + * + *
+   * The model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder() { + return getModel(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (model_ != null) { + output.writeMessage(1, getModel()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (model_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getModel()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.automl.v1.UpdateModelRequest)) { + return super.equals(obj); + } + com.google.cloud.automl.v1.UpdateModelRequest other = + (com.google.cloud.automl.v1.UpdateModelRequest) obj; + + if (hasModel() != other.hasModel()) return false; + if (hasModel()) { + if (!getModel().equals(other.getModel())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasModel()) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.automl.v1.UpdateModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [AutoMl.UpdateModel][google.cloud.automl.v1.AutoMl.UpdateModel]
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1.UpdateModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.UpdateModelRequest) + com.google.cloud.automl.v1.UpdateModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1.UpdateModelRequest.class, + com.google.cloud.automl.v1.UpdateModelRequest.Builder.class); + } + + // Construct using com.google.cloud.automl.v1.UpdateModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelBuilder_ == null) { + model_ = null; + } else { + model_ = null; + modelBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1.AutoMlProto + .internal_static_google_cloud_automl_v1_UpdateModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1.UpdateModelRequest getDefaultInstanceForType() { + return com.google.cloud.automl.v1.UpdateModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1.UpdateModelRequest build() { + com.google.cloud.automl.v1.UpdateModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1.UpdateModelRequest buildPartial() { + com.google.cloud.automl.v1.UpdateModelRequest result = + new com.google.cloud.automl.v1.UpdateModelRequest(this); + if (modelBuilder_ == null) { + result.model_ = model_; + } else { + result.model_ = modelBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.automl.v1.UpdateModelRequest) { + return mergeFrom((com.google.cloud.automl.v1.UpdateModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.automl.v1.UpdateModelRequest other) { + if (other == com.google.cloud.automl.v1.UpdateModelRequest.getDefaultInstance()) return this; + if (other.hasModel()) { + mergeModel(other.getModel()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1.UpdateModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.automl.v1.UpdateModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.automl.v1.Model model_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Model, + com.google.cloud.automl.v1.Model.Builder, + com.google.cloud.automl.v1.ModelOrBuilder> + modelBuilder_; + /** + * + * + *
+     * The model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public boolean hasModel() { + return modelBuilder_ != null || model_ != null; + } + /** + * + * + *
+     * The model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.Model getModel() { + if (modelBuilder_ == null) { + return model_ == null ? com.google.cloud.automl.v1.Model.getDefaultInstance() : model_; + } else { + return modelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public Builder setModel(com.google.cloud.automl.v1.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + onChanged(); + } else { + modelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public Builder setModel(com.google.cloud.automl.v1.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + model_ = builderForValue.build(); + onChanged(); + } else { + modelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public Builder mergeModel(com.google.cloud.automl.v1.Model value) { + if (modelBuilder_ == null) { + if (model_ != null) { + model_ = + com.google.cloud.automl.v1.Model.newBuilder(model_).mergeFrom(value).buildPartial(); + } else { + model_ = value; + } + onChanged(); + } else { + modelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public Builder clearModel() { + if (modelBuilder_ == null) { + model_ = null; + onChanged(); + } else { + model_ = null; + modelBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.Model.Builder getModelBuilder() { + + onChanged(); + return getModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder() { + if (modelBuilder_ != null) { + return modelBuilder_.getMessageOrBuilder(); + } else { + return model_ == null ? com.google.cloud.automl.v1.Model.getDefaultInstance() : model_; + } + } + /** + * + * + *
+     * The model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Model, + com.google.cloud.automl.v1.Model.Builder, + com.google.cloud.automl.v1.ModelOrBuilder> + getModelFieldBuilder() { + if (modelBuilder_ == null) { + modelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1.Model, + com.google.cloud.automl.v1.Model.Builder, + com.google.cloud.automl.v1.ModelOrBuilder>( + getModel(), getParentForChildren(), isClean()); + model_ = null; + } + return modelBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.UpdateModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.UpdateModelRequest) + private static final com.google.cloud.automl.v1.UpdateModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.automl.v1.UpdateModelRequest(); + } + + public static com.google.cloud.automl.v1.UpdateModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1.UpdateModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequestOrBuilder.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequestOrBuilder.java new file mode 100644 index 000000000..8a7d31ebc --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1/service.proto + +package com.google.cloud.automl.v1; + +public interface UpdateModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.UpdateModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + boolean hasModel(); + /** + * + * + *
+   * The model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + com.google.cloud.automl.v1.Model getModel(); + /** + * + * + *
+   * The model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.automl.v1.Model model = 1; + */ + com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/annotation_payload.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/annotation_payload.proto new file mode 100644 index 000000000..9469c2618 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/annotation_payload.proto @@ -0,0 +1,39 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/translation.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Contains annotation information that is relevant to AutoML. +message AnnotationPayload { + // Output only . Additional information about the annotation + // specific to the AutoML domain. + oneof detail { + // Annotation details for translation. + TranslationAnnotation translation = 2; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/data_items.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/data_items.proto new file mode 100644 index 000000000..d5337ac57 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/data_items.proto @@ -0,0 +1,55 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/io.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// A representation of a text snippet. +message TextSnippet { + // Required. The content of the text snippet as a string. Up to 250000 + // characters long. + string content = 1; + + // Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed + // values are "text/html" and "text/plain". If left blank, the format is + // automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content]. + string mime_type = 2; + + // Output only. HTTP URI where you can download the content. + string content_uri = 4; +} + +// Example data used for training or prediction. +message ExamplePayload { + // Required. Input only. The example data. + oneof payload { + // Example text. + TextSnippet text_snippet = 2; + } +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/dataset.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/dataset.proto new file mode 100644 index 000000000..73b7d6027 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/dataset.proto @@ -0,0 +1,74 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/translation.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// A workspace for solving a single, particular machine learning (ML) problem. +// A workspace contains examples that may be annotated. +message Dataset { + // Required. + // The dataset metadata that is specific to the problem type. + oneof dataset_metadata { + // Metadata for a dataset used for translation. + TranslationDatasetMetadata translation_dataset_metadata = 23; + } + + // Output only. The resource name of the dataset. + // Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` + string name = 1; + + // Required. The name of the dataset to show in the interface. The name can be + // up to 32 characters long and can consist only of ASCII Latin letters A-Z + // and a-z, underscores + // (_), and ASCII digits 0-9. + string display_name = 2; + + // User-provided description of the dataset. The description can be up to + // 25000 characters long. + string description = 3; + + // Output only. The number of examples in the dataset. + int32 example_count = 21; + + // Output only. Timestamp when this dataset was created. + google.protobuf.Timestamp create_time = 14; + + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 17; + + // Optional. The labels with user-defined metadata to organize your dataset. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://goo.gl/xmQnxf for more information on and examples of labels. + map labels = 39; +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/io.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/io.proto new file mode 100644 index 000000000..fd835d250 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/io.proto @@ -0,0 +1,109 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Input configuration for ImportData Action. +// +// The format of input depends on dataset_metadata the Dataset into which +// the import is happening has. As input source the +// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] +// is expected, unless specified otherwise. Additionally any input .CSV file +// by itself must be 100MB or smaller, unless specified otherwise. +// If an "example" file (that is, image, video etc.) with identical content +// (even if it had different GCS_FILE_PATH) is mentioned multiple times, then +// its label, bounding boxes etc. are appended. The same file should be always +// provided with the same ML_USE and GCS_FILE_PATH, if it is not, then +// these values are nondeterministically selected from the given ones. +// +// Errors: +// If any of the provided CSV files can't be parsed or if more than certain +// percent of CSV rows cannot be processed then the operation fails and +// nothing is imported. Regardless of overall success or failure the per-row +// failures, up to a certain count cap, is listed in +// Operation.metadata.partial_failures. +// +message InputConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for the input content. + // In ImportData, the gcs_source points to a csv with structure described in + // the comment. + GcsSource gcs_source = 1; + } + + // Additional domain-specific parameters describing the semantic of the + // imported data, any string must be up to 25000 + // characters long. + map params = 2; +} + +// * For Translation: +// CSV file `translation.csv`, with each line in format: +// ML_USE,GCS_FILE_PATH +// GCS_FILE_PATH leads to a .TSV file which describes examples that have +// given ML_USE, using the following row format per line: +// TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target +// language) +// +// `export_data__` +// where will be made +// BigQuery-dataset-name compatible (e.g. most special characters will +// become underscores), and timestamp will be in +// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that +// dataset a new table called `primary_table` will be created, and +// filled with precisely the same data as this obtained on import. +message OutputConfig { + // Required. The destination of the output. + oneof destination { + // The Google Cloud Storage location where the output is to be written to. + // For Image Object Detection, Text Extraction, Video Classification and + // Tables, in the given directory a new directory will be created with name: + // export_data-- where + // timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export + // output will be written into that directory. + GcsDestination gcs_destination = 1; + } +} + +// The Google Cloud Storage location for the input content. +message GcsSource { + // Required. Google Cloud Storage URIs to input files, up to 2000 characters + // long. Accepted forms: + // * Full object path, e.g. gs://bucket/directory/object.csv + repeated string input_uris = 1; +} + +// The Google Cloud Storage location where the output is to be written to. +message GcsDestination { + // Required. Google Cloud Storage URI to output directory, up to 2000 + // characters long. + // Accepted forms: + // * Prefix path: gs://bucket/directory + // The requesting user must have write permission to the bucket. + // The directory is created if it doesn't exist. + string output_uri_prefix = 1; +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/model.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/model.proto new file mode 100644 index 000000000..5f820b420 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/model.proto @@ -0,0 +1,86 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/translation.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// API proto representing a trained machine learning model. +message Model { + // Deployment state of the model. + enum DeploymentState { + // Should not be used, an un-set enum has this value by default. + DEPLOYMENT_STATE_UNSPECIFIED = 0; + + // Model is deployed. + DEPLOYED = 1; + + // Model is not deployed. + UNDEPLOYED = 2; + } + + // Required. + // The model metadata that is specific to the problem type. + // Must match the metadata type of the dataset used to train the model. + oneof model_metadata { + // Metadata for translation models. + TranslationModelMetadata translation_model_metadata = 15; + } + + // Output only. Resource name of the model. + // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + string name = 1; + + // Required. The name of the model to show in the interface. The name can be + // up to 32 characters long and can consist only of ASCII Latin letters A-Z + // and a-z, underscores + // (_), and ASCII digits 0-9. It must start with a letter. + string display_name = 2; + + // Required. The resource ID of the dataset used to create the model. The dataset must + // come from the same ancestor project and location. + string dataset_id = 3; + + // Output only. Timestamp when the model training finished and can be used for prediction. + google.protobuf.Timestamp create_time = 7; + + // Output only. Timestamp when this model was last updated. + google.protobuf.Timestamp update_time = 11; + + // Output only. Deployment state of the model. A model can only serve + // prediction requests after it gets deployed. + DeploymentState deployment_state = 8; + + // Optional. The labels with user-defined metadata to organize your model. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // Label values are optional. Label keys must start with a letter. + // + // See https://goo.gl/xmQnxf for more information on and examples of labels. + map labels = 34; +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/model_evaluation.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/model_evaluation.proto new file mode 100644 index 000000000..fe9df1b94 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/model_evaluation.proto @@ -0,0 +1,62 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/translation.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Evaluation results of a model. +message ModelEvaluation { + // Output only. Problem type specific evaluation metrics. + oneof metrics { + // Model evaluation metrics for translation. + TranslationEvaluationMetrics translation_evaluation_metrics = 9; + } + + // Output only. Resource name of the model evaluation. + // Format: + // + // `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` + string name = 1; + + // Output only. The ID of the annotation spec that the model evaluation applies to. The + // The ID is empty for the overall model evaluation. + string annotation_spec_id = 2; + + // Output only. Timestamp when this model evaluation was created. + google.protobuf.Timestamp create_time = 5; + + // Output only. The number of examples used for model evaluation, i.e. for + // which ground truth from time of model creation is compared against the + // predicted annotations created by the model. + // For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is + // the total number of all examples used for evaluation. + // Otherwise, this is the count of examples that according to the ground + // truth were annotated by the + // + // [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id]. + int32 evaluated_example_count = 6; +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/operations.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/operations.proto new file mode 100644 index 000000000..30a1f4689 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/operations.proto @@ -0,0 +1,74 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/io.proto"; +import "google/cloud/automl/v1/model.proto"; +import "google/cloud/automl/v1/model_evaluation.proto"; +import "google/cloud/automl/v1/prediction_service.proto"; +import "google/cloud/automl/v1/service.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Metadata used across all long running operations returned by AutoML API. +message OperationMetadata { + // Ouptut only. Details of specific operation. Even if this field is empty, + // the presence allows to distinguish different types of operations. + oneof details { + // Details of a Delete operation. + DeleteOperationMetadata delete_details = 8; + + // Details of CreateModel operation. + CreateModelOperationMetadata create_model_details = 10; + } + + // Output only. Progress of operation. Range: [0, 100]. + // Not used currently. + int32 progress_percent = 13; + + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // This field should never exceed 20 entries. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; + + // Output only. Time when the operation was created. + google.protobuf.Timestamp create_time = 3; + + // Output only. Time when the operation was updated for the last time. + google.protobuf.Timestamp update_time = 4; +} + +// Details of operations that perform deletes of any entities. +message DeleteOperationMetadata { + +} + +// Details of CreateModel operation. +message CreateModelOperationMetadata { + +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/prediction_service.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/prediction_service.proto new file mode 100644 index 000000000..2f0ae2aaa --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/prediction_service.proto @@ -0,0 +1,78 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/annotations.proto"; +import "google/cloud/automl/v1/annotation_payload.proto"; +import "google/cloud/automl/v1/data_items.proto"; +import "google/cloud/automl/v1/io.proto"; +import "google/longrunning/operations.proto"; +import "google/api/client.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_outer_classname = "PredictionServiceProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// AutoML Prediction API. +// +// On any input that is documented to expect a string parameter in +// snake_case or kebab-case, either of those cases is accepted. +service PredictionService { + option (google.api.default_host) = "automl.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Perform an online prediction. The prediction result will be directly + // returned in the response. + // Available for following ML problems, and their expected request payloads: + // * Translation - TextSnippet, content up to 25,000 characters, UTF-8 + // encoded. + rpc Predict(PredictRequest) returns (PredictResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/models/*}:predict" + body: "*" + }; + } +} + +// Request message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict]. +message PredictRequest { + // Name of the model requested to serve the prediction. + string name = 1; + + // Required. Payload to perform a prediction on. The payload must match the + // problem type that the model was trained to solve. + ExamplePayload payload = 2; + + // Additional domain-specific parameters, any string must be up to 25000 + // characters long. + map params = 3; +} + +// Response message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict]. +message PredictResponse { + // Prediction result. + // Translation and Text Sentiment will return precisely one payload. + repeated AnnotationPayload payload = 1; + + // Additional domain-specific prediction response metadata. + map metadata = 2; +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/service.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/service.proto new file mode 100644 index 000000000..f484eefd2 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/service.proto @@ -0,0 +1,372 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/api/annotations.proto"; +import "google/cloud/automl/v1/annotation_payload.proto"; +import "google/cloud/automl/v1/dataset.proto"; +import "google/cloud/automl/v1/io.proto"; +import "google/cloud/automl/v1/model.proto"; +import "google/cloud/automl/v1/model_evaluation.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_outer_classname = "AutoMlProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// AutoML Server API. +// +// The resource names are assigned by the server. +// The server never reuses names that it has created after the resources with +// those names are deleted. +// +// An ID of a resource is the last element of the item's resource name. For +// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then +// the id for the item is `{dataset_id}`. +// +// Currently the only supported `location_id` is "us-central1". +// +// On any input that is documented to expect a string parameter in +// snake_case or kebab-case, either of those cases is accepted. +service AutoMl { + option (google.api.default_host) = "automl.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a dataset. + rpc CreateDataset(CreateDatasetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/datasets" + body: "dataset" + }; + } + + // Gets a dataset. + rpc GetDataset(GetDatasetRequest) returns (Dataset) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/datasets/*}" + }; + } + + // Lists datasets in a project. + rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/datasets" + }; + } + + // Updates a dataset. + rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) { + option (google.api.http) = { + patch: "/v1/{dataset.name=projects/*/locations/*/datasets/*}" + body: "dataset" + }; + } + + // Deletes a dataset and all of its contents. + // Returns empty response in the + // [response][google.longrunning.Operation.response] field when it completes, + // and `delete_details` in the + // [metadata][google.longrunning.Operation.metadata] field. + rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/datasets/*}" + }; + } + + // Imports data into a dataset. + rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/datasets/*}:importData" + body: "*" + }; + } + + // Exports dataset's data to the provided output location. + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/datasets/*}:exportData" + body: "*" + }; + } + + // Creates a model. + // Returns a Model in the [response][google.longrunning.Operation.response] + // field when it completes. + // When you create a model, several model evaluations are created for it: + // a global evaluation, and one evaluation for each annotation spec. + rpc CreateModel(CreateModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/models" + body: "model" + }; + } + + // Gets a model. + rpc GetModel(GetModelRequest) returns (Model) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/models/*}" + }; + } + + // Lists models. + rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/models" + }; + } + + // Deletes a model. + // Returns `google.protobuf.Empty` in the + // [response][google.longrunning.Operation.response] field when it completes, + // and `delete_details` in the + // [metadata][google.longrunning.Operation.metadata] field. + rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/models/*}" + }; + } + + // Updates a model. + rpc UpdateModel(UpdateModelRequest) returns (Model) { + option (google.api.http) = { + patch: "/v1/{model.name=projects/*/locations/*/models/*}" + body: "model" + }; + } + + // Gets a model evaluation. + rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/models/*/modelEvaluations/*}" + }; + } + + // Lists model evaluations. + rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/models/*}/modelEvaluations" + }; + } +} + +// Request message for [AutoMl.CreateDataset][google.cloud.automl.v1.AutoMl.CreateDataset]. +message CreateDatasetRequest { + // The resource name of the project to create the dataset for. + string parent = 1; + + // The dataset to create. + Dataset dataset = 2; +} + +// Request message for [AutoMl.GetDataset][google.cloud.automl.v1.AutoMl.GetDataset]. +message GetDatasetRequest { + // The resource name of the dataset to retrieve. + string name = 1; +} + +// Request message for [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets]. +message ListDatasetsRequest { + // The resource name of the project from which to list datasets. + string parent = 1; + + // An expression for filtering the results of the request. + // + // * `dataset_metadata` - for existence of the case (e.g. + // image_classification_dataset_metadata:*). + // Some examples of using the filter are: + // + // * `translation_dataset_metadata:*` --> The dataset has + // translation_dataset_metadata. + string filter = 3; + + // Requested page size. Server may return fewer results than requested. + // If unspecified, server will pick a default size. + int32 page_size = 4; + + // A token identifying a page of results for the server to return + // Typically obtained via + // [ListDatasetsResponse.next_page_token][google.cloud.automl.v1.ListDatasetsResponse.next_page_token] of the previous + // [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListDatasets][google.cloud.automl.v1.AutoMl.ListDatasets]. +message ListDatasetsResponse { + // The datasets read. + repeated Dataset datasets = 1; + + // A token to retrieve next page of results. + // Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1.ListDatasetsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1.AutoMl.UpdateDataset] +message UpdateDatasetRequest { + // The dataset which replaces the resource on the server. + Dataset dataset = 1; + + // Required. The update mask applies to the resource. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1.AutoMl.DeleteDataset]. +message DeleteDatasetRequest { + // The resource name of the dataset to delete. + string name = 1; +} + +// Request message for [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData]. +message ImportDataRequest { + // Required. Dataset name. Dataset must already exist. All imported + // annotations and examples will be added. + string name = 1; + + // Required. The desired input location and its domain specific semantics, + // if any. + InputConfig input_config = 3; +} + +// Request message for [AutoMl.ExportData][google.cloud.automl.v1.AutoMl.ExportData]. +message ExportDataRequest { + // Required. The resource name of the dataset. + string name = 1; + + // Required. The desired output location. + OutputConfig output_config = 3; +} + +// Request message for [AutoMl.CreateModel][google.cloud.automl.v1.AutoMl.CreateModel]. +message CreateModelRequest { + // Resource name of the parent project where the model is being created. + string parent = 1; + + // The model to create. + Model model = 4; +} + +// Request message for [AutoMl.GetModel][google.cloud.automl.v1.AutoMl.GetModel]. +message GetModelRequest { + // Resource name of the model. + string name = 1; +} + +// Request message for [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels]. +message ListModelsRequest { + // Resource name of the project, from which to list the models. + string parent = 1; + + // An expression for filtering the results of the request. + // + // * `model_metadata` - for existence of the case (e.g. + // video_classification_model_metadata:*). + // * `dataset_id` - for = or !=. Some examples of using the filter are: + // + // * `image_classification_model_metadata:*` --> The model has + // image_classification_model_metadata. + // * `dataset_id=5` --> The model was created from a dataset with ID 5. + string filter = 3; + + // Requested page size. + int32 page_size = 4; + + // A token identifying a page of results for the server to return + // Typically obtained via + // [ListModelsResponse.next_page_token][google.cloud.automl.v1.ListModelsResponse.next_page_token] of the previous + // [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListModels][google.cloud.automl.v1.AutoMl.ListModels]. +message ListModelsResponse { + // List of models in the requested page. + repeated Model model = 1; + + // A token to retrieve next page of results. + // Pass to [ListModelsRequest.page_token][google.cloud.automl.v1.ListModelsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [AutoMl.DeleteModel][google.cloud.automl.v1.AutoMl.DeleteModel]. +message DeleteModelRequest { + // Resource name of the model being deleted. + string name = 1; +} + +// Request message for [AutoMl.UpdateModel][google.cloud.automl.v1.AutoMl.UpdateModel] +message UpdateModelRequest { + // The model which replaces the resource on the server. + Model model = 1; + + // Required. The update mask applies to the resource. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1.AutoMl.GetModelEvaluation]. +message GetModelEvaluationRequest { + // Resource name for the model evaluation. + string name = 1; +} + +// Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations]. +message ListModelEvaluationsRequest { + // Resource name of the model to list the model evaluations for. + // If modelId is set as "-", this will list model evaluations from across all + // models of the parent location. + string parent = 1; + + // An expression for filtering the results of the request. + // + // * `annotation_spec_id` - for =, != or existence. See example below for + // the last. + // + // Some examples of using the filter are: + // + // * `annotation_spec_id!=4` --> The model evaluation was done for + // annotation spec with ID different than 4. + // * `NOT annotation_spec_id:*` --> The model evaluation was done for + // aggregate of all annotation specs. + string filter = 3; + + // Requested page size. + int32 page_size = 4; + + // A token identifying a page of results for the server to return. + // Typically obtained via + // [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token] of the previous + // [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] call. + string page_token = 6; +} + +// Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations]. +message ListModelEvaluationsResponse { + // List of model evaluations in the requested page. + repeated ModelEvaluation model_evaluation = 1; + + // A token to retrieve next page of results. + // Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1.ListModelEvaluationsRequest.page_token] field of a new + // [AutoMl.ListModelEvaluations][google.cloud.automl.v1.AutoMl.ListModelEvaluations] request to obtain that page. + string next_page_token = 2; +} diff --git a/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/translation.proto b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/translation.proto new file mode 100644 index 000000000..bc449fe79 --- /dev/null +++ b/proto-google-cloud-automl-v1/src/main/proto/google/cloud/automl/v1/translation.proto @@ -0,0 +1,70 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.automl.v1; + +import "google/cloud/automl/v1/data_items.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; +option csharp_namespace = "Google.Cloud.AutoML.V1"; +option java_multiple_files = true; +option java_outer_classname = "TranslationProto"; +option java_package = "com.google.cloud.automl.v1"; +option php_namespace = "Google\\Cloud\\AutoML\\V1"; +option ruby_package = "Google::Cloud::AutoML::V1"; + +// Dataset metadata that is specific to translation. +message TranslationDatasetMetadata { + // Required. The BCP-47 language code of the source language. + string source_language_code = 1; + + // Required. The BCP-47 language code of the target language. + string target_language_code = 2; +} + +// Evaluation metrics for the dataset. +message TranslationEvaluationMetrics { + // Output only. BLEU score. + double bleu_score = 1; + + // Output only. BLEU score for base model. + double base_bleu_score = 2; +} + +// Model metadata that is specific to translation. +message TranslationModelMetadata { + // The resource name of the model to use as a baseline to train the custom + // model. If unset, we use the default base model provided by Google + // Translate. Format: + // `projects/{project_id}/locations/{location_id}/models/{model_id}` + string base_model = 1; + + // Output only. Inferred from the dataset. + // The source languge (The BCP-47 language code) that is used for training. + string source_language_code = 2; + + // Output only. The target languge (The BCP-47 language code) that is used for + // training. + string target_language_code = 3; +} + +// Annotation details specific to translation. +message TranslationAnnotation { + // Output only . The translated content. + TextSnippet translated_content = 1; +} diff --git a/proto-google-cloud-automl-v1beta1/pom.xml b/proto-google-cloud-automl-v1beta1/pom.xml index 661c42aa6..d70ee7f4b 100644 --- a/proto-google-cloud-automl-v1beta1/pom.xml +++ b/proto-google-cloud-automl-v1beta1/pom.xml @@ -2,30 +2,32 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + com.google.api.grpc proto-google-cloud-automl-v1beta1 - 0.76.0 + 0.77.0 proto-google-cloud-automl-v1beta1 PROTO library for proto-google-cloud-automl-v1beta1 - com.google.api.grpc - google-api-grpc - 0.76.0 + com.google.cloud + google-cloud-automl-parent + 0.112.0-beta com.google.protobuf protobuf-java - compile + + + com.google.api.grpc + proto-google-common-protos com.google.api api-common - compile - com.google.api.grpc - proto-google-common-protos - compile + com.google.guava + guava - + \ No newline at end of file diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayload.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayload.java index 2d14ae4f3..a1d7872c0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayload.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayload.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/annotation_payload.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOrBuilder.java index 6407c71ab..1e71269c9 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/annotation_payload.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOuterClass.java index 4d007690f..9880d0a02 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOuterClass.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOuterClass.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/annotation_payload.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpec.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpec.java index c9873a0fe..03cf1a7ac 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpec.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpec.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/annotation_spec.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java index 0d77be05f..793fb5a2b 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * 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 + * 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. + * 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.automl.v1beta1; diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOrBuilder.java index 42385342d..d7fd55874 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/annotation_spec.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOuterClass.java index a6a229436..2857b20fa 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOuterClass.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOuterClass.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/annotation_spec.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStats.java index c37dd0822..e75f83a32 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStats.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStats.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStatsOrBuilder.java index 493c5fc5a..b57064d85 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStatsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStatsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlProto.java index 6122cf25a..52b23d664 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto @@ -204,142 +219,145 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_token\030\006 \001(\t\"`\n\022ListModelsResponse\0221\n\005mo" + "del\030\001 \003(\0132\".google.cloud.automl.v1beta1." + "Model\022\027\n\017next_page_token\030\002 \001(\t\"\"\n\022Delete" - + "ModelRequest\022\014\n\004name\030\001 \001(\t\"\306\001\n\022DeployMod" + + "ModelRequest\022\014\n\004name\030\001 \001(\t\"\312\002\n\022DeployMod" + "elRequest\022\204\001\n0image_object_detection_mod" + "el_deployment_metadata\030\002 \001(\0132H.google.cl" + "oud.automl.v1beta1.ImageObjectDetectionM" - + "odelDeploymentMetadataH\000\022\014\n\004name\030\001 \001(\tB\033" - + "\n\031model_deployment_metadata\"$\n\024UndeployM" - + "odelRequest\022\014\n\004name\030\001 \001(\t\"o\n\022ExportModel" - + "Request\022\014\n\004name\030\001 \001(\t\022K\n\routput_config\030\003" - + " \001(\01324.google.cloud.automl.v1beta1.Model" - + "ExportOutputConfig\"\207\001\n\036ExportEvaluatedEx" - + "amplesRequest\022\014\n\004name\030\001 \001(\t\022W\n\routput_co" - + "nfig\030\003 \001(\0132@.google.cloud.automl.v1beta1" - + ".ExportEvaluatedExamplesOutputConfig\")\n\031" - + "GetModelEvaluationRequest\022\014\n\004name\030\001 \001(\t\"" - + "d\n\033ListModelEvaluationsRequest\022\016\n\006parent" - + "\030\001 \001(\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(" - + "\005\022\022\n\npage_token\030\006 \001(\t\"\177\n\034ListModelEvalua" - + "tionsResponse\022F\n\020model_evaluation\030\001 \003(\0132" - + ",.google.cloud.automl.v1beta1.ModelEvalu" - + "ation\022\027\n\017next_page_token\030\002 \001(\t2\331\"\n\006AutoM" - + "l\022\254\001\n\rCreateDataset\0221.google.cloud.autom" - + "l.v1beta1.CreateDatasetRequest\032$.google." - + "cloud.automl.v1beta1.Dataset\"B\202\323\344\223\002<\"1/v" - + "1beta1/{parent=projects/*/locations/*}/d" - + "atasets:\007dataset\022\235\001\n\nGetDataset\022..google" - + ".cloud.automl.v1beta1.GetDatasetRequest\032" - + "$.google.cloud.automl.v1beta1.Dataset\"9\202" - + "\323\344\223\0023\0221/v1beta1/{name=projects/*/locatio" - + "ns/*/datasets/*}\022\256\001\n\014ListDatasets\0220.goog" - + "le.cloud.automl.v1beta1.ListDatasetsRequ" - + "est\0321.google.cloud.automl.v1beta1.ListDa" - + "tasetsResponse\"9\202\323\344\223\0023\0221/v1beta1/{parent" - + "=projects/*/locations/*}/datasets\022\264\001\n\rUp" - + "dateDataset\0221.google.cloud.automl.v1beta" - + "1.UpdateDatasetRequest\032$.google.cloud.au" - + "toml.v1beta1.Dataset\"J\202\323\344\223\002D29/v1beta1/{" - + "dataset.name=projects/*/locations/*/data" - + "sets/*}:\007dataset\022\234\001\n\rDeleteDataset\0221.goo" - + "gle.cloud.automl.v1beta1.DeleteDatasetRe" - + "quest\032\035.google.longrunning.Operation\"9\202\323" - + "\344\223\0023*1/v1beta1/{name=projects/*/location" - + "s/*/datasets/*}\022\244\001\n\nImportData\022..google." - + "cloud.automl.v1beta1.ImportDataRequest\032\035" - + ".google.longrunning.Operation\"G\202\323\344\223\002A\"/v1beta1/{name=" - + "projects/*/locations/*/datasets/*/tableS" - + "pecs/*}\022\301\001\n\016ListTableSpecs\0222.google.clou" - + "d.automl.v1beta1.ListTableSpecsRequest\0323" + + "odelDeploymentMetadataH\000\022\201\001\n.image_class" + + "ification_model_deployment_metadata\030\004 \001(" + + "\0132G.google.cloud.automl.v1beta1.ImageCla" + + "ssificationModelDeploymentMetadataH\000\022\014\n\004" + + "name\030\001 \001(\tB\033\n\031model_deployment_metadata\"" + + "$\n\024UndeployModelRequest\022\014\n\004name\030\001 \001(\t\"o\n" + + "\022ExportModelRequest\022\014\n\004name\030\001 \001(\t\022K\n\rout" + + "put_config\030\003 \001(\01324.google.cloud.automl.v" + + "1beta1.ModelExportOutputConfig\"\207\001\n\036Expor" + + "tEvaluatedExamplesRequest\022\014\n\004name\030\001 \001(\t\022" + + "W\n\routput_config\030\003 \001(\0132@.google.cloud.au" + + "toml.v1beta1.ExportEvaluatedExamplesOutp" + + "utConfig\")\n\031GetModelEvaluationRequest\022\014\n" + + "\004name\030\001 \001(\t\"d\n\033ListModelEvaluationsReque" + + "st\022\016\n\006parent\030\001 \001(\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpa" + + "ge_size\030\004 \001(\005\022\022\n\npage_token\030\006 \001(\t\"\177\n\034Lis" + + "tModelEvaluationsResponse\022F\n\020model_evalu" + + "ation\030\001 \003(\0132,.google.cloud.automl.v1beta" + + "1.ModelEvaluation\022\027\n\017next_page_token\030\002 \001" + + "(\t2\331\"\n\006AutoMl\022\254\001\n\rCreateDataset\0221.google" + + ".cloud.automl.v1beta1.CreateDatasetReque" + + "st\032$.google.cloud.automl.v1beta1.Dataset" + + "\"B\202\323\344\223\002<\"1/v1beta1/{parent=projects/*/lo" + + "cations/*}/datasets:\007dataset\022\235\001\n\nGetData" + + "set\022..google.cloud.automl.v1beta1.GetDat" + + "asetRequest\032$.google.cloud.automl.v1beta" + + "1.Dataset\"9\202\323\344\223\0023\0221/v1beta1/{name=projec" + + "ts/*/locations/*/datasets/*}\022\256\001\n\014ListDat" + + "asets\0220.google.cloud.automl.v1beta1.List" + + "DatasetsRequest\0321.google.cloud.automl.v1" + + "beta1.ListDatasetsResponse\"9\202\323\344\223\0023\0221/v1b" + + "eta1/{parent=projects/*/locations/*}/dat" + + "asets\022\264\001\n\rUpdateDataset\0221.google.cloud.a" + + "utoml.v1beta1.UpdateDatasetRequest\032$.goo" + + "gle.cloud.automl.v1beta1.Dataset\"J\202\323\344\223\002D" + + "29/v1beta1/{dataset.name=projects/*/loca" + + "tions/*/datasets/*}:\007dataset\022\234\001\n\rDeleteD" + + "ataset\0221.google.cloud.automl.v1beta1.Del" + + "eteDatasetRequest\032\035.google.longrunning.O" + + "peration\"9\202\323\344\223\0023*1/v1beta1/{name=project" + + "s/*/locations/*/datasets/*}\022\244\001\n\nImportDa" + + "ta\022..google.cloud.automl.v1beta1.ImportD" + + "ataRequest\032\035.google.longrunning.Operatio" + + "n\"G\202\323\344\223\002A\"/v1" + + "beta1/{name=projects/*/locations/*/datas" + + "ets/*/tableSpecs/*}\022\301\001\n\016ListTableSpecs\0222" + ".google.cloud.automl.v1beta1.ListTableSp" - + "ecsResponse\"F\202\323\344\223\002@\022>/v1beta1/{parent=pr" - + "ojects/*/locations/*/datasets/*}/tableSp" - + "ecs\022\315\001\n\017UpdateTableSpec\0223.google.cloud.a" - + "utoml.v1beta1.UpdateTableSpecRequest\032&.g" - + "oogle.cloud.automl.v1beta1.TableSpec\"]\202\323" - + "\344\223\002W2I/v1beta1/{table_spec.name=projects" - + "/*/locations/*/datasets/*/tableSpecs/*}:" - + "\ntable_spec\022\301\001\n\rGetColumnSpec\0221.google.c" - + "loud.automl.v1beta1.GetColumnSpecRequest" - + "\032\'.google.cloud.automl.v1beta1.ColumnSpe" - + "c\"T\202\323\344\223\002N\022L/v1beta1/{name=projects/*/loc" - + "ations/*/datasets/*/tableSpecs/*/columnS" - + "pecs/*}\022\322\001\n\017ListColumnSpecs\0223.google.clo" - + "ud.automl.v1beta1.ListColumnSpecsRequest" - + "\0324.google.cloud.automl.v1beta1.ListColum" - + "nSpecsResponse\"T\202\323\344\223\002N\022L/v1beta1/{parent" - + "=projects/*/locations/*/datasets/*/table" - + "Specs/*}/columnSpecs\022\340\001\n\020UpdateColumnSpe" - + "c\0224.google.cloud.automl.v1beta1.UpdateCo" - + "lumnSpecRequest\032\'.google.cloud.automl.v1" - + "beta1.ColumnSpec\"m\202\323\344\223\002g2X/v1beta1/{colu" - + "mn_spec.name=projects/*/locations/*/data" - + "sets/*/tableSpecs/*/columnSpecs/*}:\013colu" - + "mn_spec\022\235\001\n\013CreateModel\022/.google.cloud.a" - + "utoml.v1beta1.CreateModelRequest\032\035.googl" - + "e.longrunning.Operation\">\202\323\344\223\0028\"//v1beta" - + "1/{parent=projects/*/locations/*}/models" - + ":\005model\022\225\001\n\010GetModel\022,.google.cloud.auto" - + "ml.v1beta1.GetModelRequest\032\".google.clou" - + "d.automl.v1beta1.Model\"7\202\323\344\223\0021\022//v1beta1" - + "/{name=projects/*/locations/*/models/*}\022" - + "\246\001\n\nListModels\022..google.cloud.automl.v1b" - + "eta1.ListModelsRequest\032/.google.cloud.au" - + "toml.v1beta1.ListModelsResponse\"7\202\323\344\223\0021\022" - + "//v1beta1/{parent=projects/*/locations/*" - + "}/models\022\226\001\n\013DeleteModel\022/.google.cloud." - + "automl.v1beta1.DeleteModelRequest\032\035.goog" - + "le.longrunning.Operation\"7\202\323\344\223\0021*//v1bet" - + "a1/{name=projects/*/locations/*/models/*" - + "}\022\240\001\n\013DeployModel\022/.google.cloud.automl." - + "v1beta1.DeployModelRequest\032\035.google.long" - + "running.Operation\"A\202\323\344\223\002;\"6/v1beta1/{nam" - + "e=projects/*/locations/*/models/*}:deplo" - + "y:\001*\022\246\001\n\rUndeployModel\0221.google.cloud.au" - + "toml.v1beta1.UndeployModelRequest\032\035.goog" - + "le.longrunning.Operation\"C\202\323\344\223\002=\"8/v1bet" - + "a1/{name=projects/*/locations/*/models/*" - + "}:undeploy:\001*\022\240\001\n\013ExportModel\022/.google.c" - + "loud.automl.v1beta1.ExportModelRequest\032\035" + + "ecsRequest\0323.google.cloud.automl.v1beta1" + + ".ListTableSpecsResponse\"F\202\323\344\223\002@\022>/v1beta" + + "1/{parent=projects/*/locations/*/dataset" + + "s/*}/tableSpecs\022\315\001\n\017UpdateTableSpec\0223.go" + + "ogle.cloud.automl.v1beta1.UpdateTableSpe" + + "cRequest\032&.google.cloud.automl.v1beta1.T" + + "ableSpec\"]\202\323\344\223\002W2I/v1beta1/{table_spec.n" + + "ame=projects/*/locations/*/datasets/*/ta" + + "bleSpecs/*}:\ntable_spec\022\301\001\n\rGetColumnSpe" + + "c\0221.google.cloud.automl.v1beta1.GetColum" + + "nSpecRequest\032\'.google.cloud.automl.v1bet" + + "a1.ColumnSpec\"T\202\323\344\223\002N\022L/v1beta1/{name=pr" + + "ojects/*/locations/*/datasets/*/tableSpe" + + "cs/*/columnSpecs/*}\022\322\001\n\017ListColumnSpecs\022" + + "3.google.cloud.automl.v1beta1.ListColumn" + + "SpecsRequest\0324.google.cloud.automl.v1bet" + + "a1.ListColumnSpecsResponse\"T\202\323\344\223\002N\022L/v1b" + + "eta1/{parent=projects/*/locations/*/data" + + "sets/*/tableSpecs/*}/columnSpecs\022\340\001\n\020Upd" + + "ateColumnSpec\0224.google.cloud.automl.v1be" + + "ta1.UpdateColumnSpecRequest\032\'.google.clo" + + "ud.automl.v1beta1.ColumnSpec\"m\202\323\344\223\002g2X/v" + + "1beta1/{column_spec.name=projects/*/loca" + + "tions/*/datasets/*/tableSpecs/*/columnSp" + + "ecs/*}:\013column_spec\022\235\001\n\013CreateModel\022/.go" + + "ogle.cloud.automl.v1beta1.CreateModelReq" + + "uest\032\035.google.longrunning.Operation\">\202\323\344" + + "\223\0028\"//v1beta1/{parent=projects/*/locatio" + + "ns/*}/models:\005model\022\225\001\n\010GetModel\022,.googl" + + "e.cloud.automl.v1beta1.GetModelRequest\032\"" + + ".google.cloud.automl.v1beta1.Model\"7\202\323\344\223" + + "\0021\022//v1beta1/{name=projects/*/locations/" + + "*/models/*}\022\246\001\n\nListModels\022..google.clou" + + "d.automl.v1beta1.ListModelsRequest\032/.goo" + + "gle.cloud.automl.v1beta1.ListModelsRespo" + + "nse\"7\202\323\344\223\0021\022//v1beta1/{parent=projects/*" + + "/locations/*}/models\022\226\001\n\013DeleteModel\022/.g" + + "oogle.cloud.automl.v1beta1.DeleteModelRe" + + "quest\032\035.google.longrunning.Operation\"7\202\323" + + "\344\223\0021*//v1beta1/{name=projects/*/location" + + "s/*/models/*}\022\240\001\n\013DeployModel\022/.google.c" + + "loud.automl.v1beta1.DeployModelRequest\032\035" + ".google.longrunning.Operation\"A\202\323\344\223\002;\"6/" + "v1beta1/{name=projects/*/locations/*/mod" - + "els/*}:export:\001*\022\311\001\n\027ExportEvaluatedExam" - + "ples\022;.google.cloud.automl.v1beta1.Expor" - + "tEvaluatedExamplesRequest\032\035.google.longr" - + "unning.Operation\"R\202\323\344\223\002L\"G/v1beta1/{name" - + "=projects/*/locations/*/models/*}:export" - + "EvaluatedExamples:\001*\022\306\001\n\022GetModelEvaluat" - + "ion\0226.google.cloud.automl.v1beta1.GetMod" - + "elEvaluationRequest\032,.google.cloud.autom" - + "l.v1beta1.ModelEvaluation\"J\202\323\344\223\002D\022B/v1be" - + "ta1/{name=projects/*/locations/*/models/" - + "*/modelEvaluations/*}\022\327\001\n\024ListModelEvalu" - + "ations\0228.google.cloud.automl.v1beta1.Lis" - + "tModelEvaluationsRequest\0329.google.cloud." - + "automl.v1beta1.ListModelEvaluationsRespo" - + "nse\"J\202\323\344\223\002D\022B/v1beta1/{parent=projects/*" - + "/locations/*/models/*}/modelEvaluations\032" - + "I\312A\025automl.googleapis.com\322A.https://www." - + "googleapis.com/auth/cloud-platformB\262\001\n\037c" - + "om.google.cloud.automl.v1beta1B\013AutoMlPr" - + "otoP\001ZAgoogle.golang.org/genproto/google" - + "apis/cloud/automl/v1beta1;automl\312\002\033Googl" - + "e\\Cloud\\AutoMl\\V1beta1\352\002\036Google::Cloud::" - + "AutoML::V1beta1b\006proto3" + + "els/*}:deploy:\001*\022\246\001\n\rUndeployModel\0221.goo" + + "gle.cloud.automl.v1beta1.UndeployModelRe" + + "quest\032\035.google.longrunning.Operation\"C\202\323" + + "\344\223\002=\"8/v1beta1/{name=projects/*/location" + + "s/*/models/*}:undeploy:\001*\022\240\001\n\013ExportMode" + + "l\022/.google.cloud.automl.v1beta1.ExportMo" + + "delRequest\032\035.google.longrunning.Operatio" + + "n\"A\202\323\344\223\002;\"6/v1beta1/{name=projects/*/loc" + + "ations/*/models/*}:export:\001*\022\311\001\n\027ExportE" + + "valuatedExamples\022;.google.cloud.automl.v" + + "1beta1.ExportEvaluatedExamplesRequest\032\035." + + "google.longrunning.Operation\"R\202\323\344\223\002L\"G/v" + + "1beta1/{name=projects/*/locations/*/mode" + + "ls/*}:exportEvaluatedExamples:\001*\022\306\001\n\022Get" + + "ModelEvaluation\0226.google.cloud.automl.v1" + + "beta1.GetModelEvaluationRequest\032,.google" + + ".cloud.automl.v1beta1.ModelEvaluation\"J\202" + + "\323\344\223\002D\022B/v1beta1/{name=projects/*/locatio" + + "ns/*/models/*/modelEvaluations/*}\022\327\001\n\024Li" + + "stModelEvaluations\0228.google.cloud.automl" + + ".v1beta1.ListModelEvaluationsRequest\0329.g" + + "oogle.cloud.automl.v1beta1.ListModelEval" + + "uationsResponse\"J\202\323\344\223\002D\022B/v1beta1/{paren" + + "t=projects/*/locations/*/models/*}/model" + + "Evaluations\032I\312A\025automl.googleapis.com\322A." + + "https://www.googleapis.com/auth/cloud-pl" + + "atformB\262\001\n\037com.google.cloud.automl.v1bet" + + "a1B\013AutoMlProtoP\001ZAgoogle.golang.org/gen" + + "proto/googleapis/cloud/automl/v1beta1;au" + + "toml\312\002\033Google\\Cloud\\AutoMl\\V1beta1\352\002\036Goo" + + "gle::Cloud::AutoML::V1beta1b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -550,7 +568,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_automl_v1beta1_DeployModelRequest_descriptor, new java.lang.String[] { - "ImageObjectDetectionModelDeploymentMetadata", "Name", "ModelDeploymentMetadata", + "ImageObjectDetectionModelDeploymentMetadata", + "ImageClassificationModelDeploymentMetadata", + "Name", + "ModelDeploymentMetadata", }); internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_descriptor = getDescriptor().getMessageTypes().get(23); diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfig.java index 93f945048..138489410 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfig.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfig.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfigOrBuilder.java index 4cbc658bc..dd2e0fa3b 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfigOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfigOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadata.java index 88b4107c3..30c17228a 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadataOrBuilder.java index 185b932dd..6d3cc97aa 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfig.java index d46ba7378..1d9f99585 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfig.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfig.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfigOrBuilder.java index e8470dd57..7f2951984 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfigOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfigOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequest.java index ec179a011..70c64a628 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/prediction_service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequestOrBuilder.java index d2ffc3952..9750ccb75 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/prediction_service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResult.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResult.java index b3bdcdfda..36c686b0d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResult.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResult.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/prediction_service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResultOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResultOrBuilder.java index 3e2c587a0..0cf22e03f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResultOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResultOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/prediction_service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestination.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestination.java index b566076c8..2a0ce1285 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestination.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestination.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestinationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestinationOrBuilder.java index a615c9d72..8b1d5f08b 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestinationOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestinationOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySource.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySource.java index d0fc9f073..134302d44 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySource.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySource.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySourceOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySourceOrBuilder.java index aedfca13e..d8c2f6314 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySourceOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySourceOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntry.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntry.java index 47dbef7e9..df3c05166 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntry.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntry.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntryOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntryOrBuilder.java index 4007a1f14..e59d96421 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntryOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntryOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPoly.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPoly.java index 6b00329c8..6efc8aa8f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPoly.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPoly.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/geometry.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPolyOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPolyOrBuilder.java index bf1037ea1..9ae277247 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPolyOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPolyOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/geometry.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStats.java index adab96f9e..1c94e19a9 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStats.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStats.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStatsOrBuilder.java index ef02267c3..7f27757ca 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStatsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStatsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ClassificationProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ClassificationProto.java index fffd21d33..24f5e5541 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ClassificationProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ClassificationProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/classification.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpec.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpec.java index d6441d36b..f3600b969 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpec.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpec.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/column_spec.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java index f0c11dcfb..62ae86fac 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * 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 + * 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. + * 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.automl.v1beta1; diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOrBuilder.java index a7fca8947..056548bff 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/column_spec.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOuterClass.java index 005327eb1..6156f83a3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOuterClass.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOuterClass.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/column_spec.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStats.java index af1cac80f..1e400851f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStats.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStats.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStatsOrBuilder.java index 6fcfaedd3..d21d53238 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStatsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStatsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequest.java index 78726d109..432f608ea 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequestOrBuilder.java index 6fdb677b9..565492fa4 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadata.java index 0a0bc1b57..f998afaa3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadataOrBuilder.java index 3f98a654f..e942641fe 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequest.java index 3d98a53a8..7869612c7 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequestOrBuilder.java index b9584e7e6..78d9a4c8c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataItems.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataItems.java index 3098c097c..a590c830e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataItems.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataItems.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStats.java index 1ab65fc64..26a77f56c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStats.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStats.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOrBuilder.java index 4e09e1397..3b3bcc79d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOuterClass.java index 0f26d08d9..e1fe4090c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOuterClass.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOuterClass.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataType.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataType.java index 26e3cb81f..4df831b82 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataType.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataType.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_types.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypeOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypeOrBuilder.java index c042ff6aa..5fe8c4062 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypeOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypeOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_types.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypes.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypes.java index 2d86afbcc..ab5569fa1 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypes.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypes.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_types.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Dataset.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Dataset.java index 36d06f091..592d1de86 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Dataset.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Dataset.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/dataset.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetName.java index c0868d604..01ef37db0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetName.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * 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 + * 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. + * 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.automl.v1beta1; diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOrBuilder.java index 51a335139..1b4d2f274 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/dataset.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOuterClass.java index e52fc0915..d3ea2698c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOuterClass.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOuterClass.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/dataset.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequest.java index e2af9e1e1..911f62ea9 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequestOrBuilder.java index b12b408f5..ef75c9c1f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequest.java index 98338a47b..82059e2f3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequestOrBuilder.java index 081d4d4f7..aa9e55127 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadata.java index 7680c468e..b1450e4d5 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadataOrBuilder.java index 71d57d82c..638aadb5f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadata.java index 0dec74e3b..e65bf1d2e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadataOrBuilder.java index 72c02e2c3..c3b1f7825 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequest.java index 84cf059a2..3dfa70003 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto @@ -81,6 +96,30 @@ private DeployModelRequest( modelDeploymentMetadataCase_ = 2; break; } + case 34: + { + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder + subBuilder = null; + if (modelDeploymentMetadataCase_ == 4) { + subBuilder = + ((com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_) + .toBuilder(); + } + modelDeploymentMetadata_ = + input.readMessage( + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_); + modelDeploymentMetadata_ = subBuilder.buildPartial(); + } + modelDeploymentMetadataCase_ = 4; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -120,6 +159,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public enum ModelDeploymentMetadataCase implements com.google.protobuf.Internal.EnumLite { IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA(2), + IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA(4), MODELDEPLOYMENTMETADATA_NOT_SET(0); private final int value; @@ -136,6 +176,8 @@ public static ModelDeploymentMetadataCase forNumber(int value) { switch (value) { case 2: return IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA; + case 4: + return IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA; case 0: return MODELDEPLOYMENTMETADATA_NOT_SET; default: @@ -208,6 +250,62 @@ public boolean hasImageObjectDetectionModelDeploymentMetadata() { .getDefaultInstance(); } + public static final int IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER = 4; + /** + * + * + *
+   * Model deployment metadata specific to Image Classification.
+   * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public boolean hasImageClassificationModelDeploymentMetadata() { + return modelDeploymentMetadataCase_ == 4; + } + /** + * + * + *
+   * Model deployment metadata specific to Image Classification.
+   * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + getImageClassificationModelDeploymentMetadata() { + if (modelDeploymentMetadataCase_ == 4) { + return (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_; + } + return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .getDefaultInstance(); + } + /** + * + * + *
+   * Model deployment metadata specific to Image Classification.
+   * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder + getImageClassificationModelDeploymentMetadataOrBuilder() { + if (modelDeploymentMetadataCase_ == 4) { + return (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_; + } + return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .getDefaultInstance(); + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -274,6 +372,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) modelDeploymentMetadata_); } + if (modelDeploymentMetadataCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_); + } unknownFields.writeTo(output); } @@ -293,6 +397,13 @@ public int getSerializedSize() { (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) modelDeploymentMetadata_); } + if (modelDeploymentMetadataCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -317,6 +428,10 @@ public boolean equals(final java.lang.Object obj) { if (!getImageObjectDetectionModelDeploymentMetadata() .equals(other.getImageObjectDetectionModelDeploymentMetadata())) return false; break; + case 4: + if (!getImageClassificationModelDeploymentMetadata() + .equals(other.getImageClassificationModelDeploymentMetadata())) return false; + break; case 0: default: } @@ -338,6 +453,10 @@ public int hashCode() { hash = (37 * hash) + IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER; hash = (53 * hash) + getImageObjectDetectionModelDeploymentMetadata().hashCode(); break; + case 4: + hash = (37 * hash) + IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getImageClassificationModelDeploymentMetadata().hashCode(); + break; case 0: default: } @@ -525,6 +644,14 @@ public com.google.cloud.automl.v1beta1.DeployModelRequest buildPartial() { imageObjectDetectionModelDeploymentMetadataBuilder_.build(); } } + if (modelDeploymentMetadataCase_ == 4) { + if (imageClassificationModelDeploymentMetadataBuilder_ == null) { + result.modelDeploymentMetadata_ = modelDeploymentMetadata_; + } else { + result.modelDeploymentMetadata_ = + imageClassificationModelDeploymentMetadataBuilder_.build(); + } + } result.name_ = name_; result.modelDeploymentMetadataCase_ = modelDeploymentMetadataCase_; onBuilt(); @@ -588,6 +715,12 @@ public Builder mergeFrom(com.google.cloud.automl.v1beta1.DeployModelRequest othe other.getImageObjectDetectionModelDeploymentMetadata()); break; } + case IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA: + { + mergeImageClassificationModelDeploymentMetadata( + other.getImageClassificationModelDeploymentMetadata()); + break; + } case MODELDEPLOYMENTMETADATA_NOT_SET: { break; @@ -877,6 +1010,245 @@ public Builder clearImageObjectDetectionModelDeploymentMetadata() { return imageObjectDetectionModelDeploymentMetadataBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata, + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder, + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder> + imageClassificationModelDeploymentMetadataBuilder_; + /** + * + * + *
+     * Model deployment metadata specific to Image Classification.
+     * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public boolean hasImageClassificationModelDeploymentMetadata() { + return modelDeploymentMetadataCase_ == 4; + } + /** + * + * + *
+     * Model deployment metadata specific to Image Classification.
+     * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + getImageClassificationModelDeploymentMetadata() { + if (imageClassificationModelDeploymentMetadataBuilder_ == null) { + if (modelDeploymentMetadataCase_ == 4) { + return (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_; + } + return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .getDefaultInstance(); + } else { + if (modelDeploymentMetadataCase_ == 4) { + return imageClassificationModelDeploymentMetadataBuilder_.getMessage(); + } + return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Model deployment metadata specific to Image Classification.
+     * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public Builder setImageClassificationModelDeploymentMetadata( + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata value) { + if (imageClassificationModelDeploymentMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelDeploymentMetadata_ = value; + onChanged(); + } else { + imageClassificationModelDeploymentMetadataBuilder_.setMessage(value); + } + modelDeploymentMetadataCase_ = 4; + return this; + } + /** + * + * + *
+     * Model deployment metadata specific to Image Classification.
+     * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public Builder setImageClassificationModelDeploymentMetadata( + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder + builderForValue) { + if (imageClassificationModelDeploymentMetadataBuilder_ == null) { + modelDeploymentMetadata_ = builderForValue.build(); + onChanged(); + } else { + imageClassificationModelDeploymentMetadataBuilder_.setMessage(builderForValue.build()); + } + modelDeploymentMetadataCase_ = 4; + return this; + } + /** + * + * + *
+     * Model deployment metadata specific to Image Classification.
+     * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public Builder mergeImageClassificationModelDeploymentMetadata( + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata value) { + if (imageClassificationModelDeploymentMetadataBuilder_ == null) { + if (modelDeploymentMetadataCase_ == 4 + && modelDeploymentMetadata_ + != com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .getDefaultInstance()) { + modelDeploymentMetadata_ = + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.newBuilder( + (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + modelDeploymentMetadata_ = value; + } + onChanged(); + } else { + if (modelDeploymentMetadataCase_ == 4) { + imageClassificationModelDeploymentMetadataBuilder_.mergeFrom(value); + } + imageClassificationModelDeploymentMetadataBuilder_.setMessage(value); + } + modelDeploymentMetadataCase_ = 4; + return this; + } + /** + * + * + *
+     * Model deployment metadata specific to Image Classification.
+     * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public Builder clearImageClassificationModelDeploymentMetadata() { + if (imageClassificationModelDeploymentMetadataBuilder_ == null) { + if (modelDeploymentMetadataCase_ == 4) { + modelDeploymentMetadataCase_ = 0; + modelDeploymentMetadata_ = null; + onChanged(); + } + } else { + if (modelDeploymentMetadataCase_ == 4) { + modelDeploymentMetadataCase_ = 0; + modelDeploymentMetadata_ = null; + } + imageClassificationModelDeploymentMetadataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Model deployment metadata specific to Image Classification.
+     * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder + getImageClassificationModelDeploymentMetadataBuilder() { + return getImageClassificationModelDeploymentMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Model deployment metadata specific to Image Classification.
+     * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder + getImageClassificationModelDeploymentMetadataOrBuilder() { + if ((modelDeploymentMetadataCase_ == 4) + && (imageClassificationModelDeploymentMetadataBuilder_ != null)) { + return imageClassificationModelDeploymentMetadataBuilder_.getMessageOrBuilder(); + } else { + if (modelDeploymentMetadataCase_ == 4) { + return (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_; + } + return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Model deployment metadata specific to Image Classification.
+     * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata, + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder, + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder> + getImageClassificationModelDeploymentMetadataFieldBuilder() { + if (imageClassificationModelDeploymentMetadataBuilder_ == null) { + if (!(modelDeploymentMetadataCase_ == 4)) { + modelDeploymentMetadata_ = + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .getDefaultInstance(); + } + imageClassificationModelDeploymentMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata, + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder, + com.google.cloud.automl.v1beta1 + .ImageClassificationModelDeploymentMetadataOrBuilder>( + (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + modelDeploymentMetadata_, + getParentForChildren(), + isClean()); + modelDeploymentMetadata_ = null; + } + modelDeploymentMetadataCase_ = 4; + onChanged(); + ; + return imageClassificationModelDeploymentMetadataBuilder_; + } + private java.lang.Object name_ = ""; /** * diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequestOrBuilder.java index 86ded9933..dfa836332 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto @@ -47,6 +62,45 @@ public interface DeployModelRequestOrBuilder com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadataOrBuilder getImageObjectDetectionModelDeploymentMetadataOrBuilder(); + /** + * + * + *
+   * Model deployment metadata specific to Image Classification.
+   * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + boolean hasImageClassificationModelDeploymentMetadata(); + /** + * + * + *
+   * Model deployment metadata specific to Image Classification.
+   * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + getImageClassificationModelDeploymentMetadata(); + /** + * + * + *
+   * Model deployment metadata specific to Image Classification.
+   * 
+ * + * + * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; + * + */ + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder + getImageClassificationModelDeploymentMetadataOrBuilder(); + /** * * diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Detection.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Detection.java index 490d2c098..fe5fcc5cc 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Detection.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Detection.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Document.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Document.java index 86ef40f74..95759b718 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Document.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Document.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensions.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensions.java index 64ffb652d..014b8ac2c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensions.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensions.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensionsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensionsOrBuilder.java index 81cc740d1..f4f5b7f08 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensionsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensionsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfig.java index ed5b65481..a2de1cc8e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfig.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfig.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfigOrBuilder.java index f76aa9eb7..2fd4e6b81 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfigOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfigOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentOrBuilder.java index a11d5a2bb..fd62a1223 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRange.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRange.java index a9986dcee..cb36993e3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRange.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRange.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/ranges.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRangeOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRangeOrBuilder.java index 8ab2e5c02..d7ea4ed80 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRangeOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRangeOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/ranges.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayload.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayload.java index f396d6aa8..deca62f7f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayload.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayload.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayloadOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayloadOrBuilder.java index 708edeb31..3025bd3a3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayloadOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayloadOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadata.java index 8839cb990..f024d56f4 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadataOrBuilder.java index 837b64620..9d47f1d83 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequest.java index f247a4ba5..1ed42f833 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequestOrBuilder.java index fc40e6f8a..0c7859375 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadata.java index 1d1d6f286..0a2f3abf0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadataOrBuilder.java index f243496c8..5e7ca751f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfig.java index 4cb68ab45..b69a3cf3f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfig.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfig.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfigOrBuilder.java index eb1fbe5f9..7f0092e97 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfigOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfigOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequest.java index 8326c44a3..b25d29f56 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequestOrBuilder.java index 4b37fb7a1..b74918065 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadata.java index 3b5cd4001..6f4631073 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadataOrBuilder.java index b3328ef9f..19aa0f6ec 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequest.java index 8602c62f5..0db8399a0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequestOrBuilder.java index bf7bb3c77..88eee191d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64Stats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64Stats.java index 53a7f2dde..7cd5ab2f3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64Stats.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64Stats.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64StatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64StatsOrBuilder.java index 9ba76a286..1fe7b7fb6 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64StatsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64StatsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestination.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestination.java index 473c4f7d5..ab7b18ad3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestination.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestination.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestinationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestinationOrBuilder.java index 165dd3210..a284de5b9 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestinationOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestinationOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestination.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestination.java index 6682db40c..0195099ba 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestination.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestination.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestinationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestinationOrBuilder.java index becbf3fcc..b2df32e50 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestinationOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestinationOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSource.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSource.java index 9a30dcc33..34661eaac 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSource.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSource.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSourceOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSourceOrBuilder.java index a5d264226..4298fb9fe 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSourceOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSourceOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Geometry.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Geometry.java index 618af1b45..a3b518207 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Geometry.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Geometry.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/geometry.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequest.java index 56e200df0..04a74f44e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequestOrBuilder.java index f6dabd2f5..25b5393f8 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequest.java index e787ad74b..e7cedf11d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequestOrBuilder.java index 160579ea7..de1e40278 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequest.java index 88bc93b0d..336a39b7f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequestOrBuilder.java index 921325cc5..4ddd6345d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequest.java index f75d8bfe7..7ac0c6260 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequestOrBuilder.java index ca90e38e7..e8fc1ca1e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequest.java index c050a856b..848495d98 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequestOrBuilder.java index c55cf6591..f9e72475f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequest.java index 175355443..c9ca82418 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequestOrBuilder.java index c672159c9..4d4fc6d40 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Image.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Image.java index b1bf12598..95e891ead 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Image.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Image.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadata.java index 5489618c5..c15319089 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadataOrBuilder.java index 8644d375c..cedcaf172 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadata.java new file mode 100644 index 000000000..94fab20b6 --- /dev/null +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadata.java @@ -0,0 +1,574 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1beta1/image.proto + +package com.google.cloud.automl.v1beta1; + +/** + * + * + *
+ * Model deployment metadata specific to Image Classification.
+ * 
+ * + * Protobuf type {@code google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} + */ +public final class ImageClassificationModelDeploymentMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + ImageClassificationModelDeploymentMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageClassificationModelDeploymentMetadata.newBuilder() to construct. + private ImageClassificationModelDeploymentMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageClassificationModelDeploymentMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageClassificationModelDeploymentMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + nodeCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1beta1.ImageProto + .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1beta1.ImageProto + .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.class, + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder + .class); + } + + public static final int NODE_COUNT_FIELD_NUMBER = 1; + private long nodeCount_; + /** + * + * + *
+   * Input only. The number of nodes to deploy the model on. A node is an
+   * abstraction of a machine resource, which can handle online prediction QPS
+   * as given in the model's
+   * [node_qps][google.cloud.automl.v1p1beta.ImageClassificationModelMetadata.node_qps].
+   * Must be between 1 and 100, inclusive on both ends.
+   * 
+ * + * int64 node_count = 1; + */ + public long getNodeCount() { + return nodeCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (nodeCount_ != 0L) { + output.writeInt64(1, nodeCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nodeCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, nodeCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata)) { + return super.equals(obj); + } + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata other = + (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) obj; + + if (getNodeCount() != other.getNodeCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNodeCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Model deployment metadata specific to Image Classification.
+   * 
+ * + * Protobuf type {@code google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.automl.v1beta1.ImageProto + .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.automl.v1beta1.ImageProto + .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.class, + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + nodeCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.automl.v1beta1.ImageProto + .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + getDefaultInstanceForType() { + return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata build() { + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + buildPartial() { + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata result = + new com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata(this); + result.nodeCount_ = nodeCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) { + return mergeFrom( + (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata other) { + if (other + == com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + .getDefaultInstance()) return this; + if (other.getNodeCount() != 0L) { + setNodeCount(other.getNodeCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long nodeCount_; + /** + * + * + *
+     * Input only. The number of nodes to deploy the model on. A node is an
+     * abstraction of a machine resource, which can handle online prediction QPS
+     * as given in the model's
+     * [node_qps][google.cloud.automl.v1p1beta.ImageClassificationModelMetadata.node_qps].
+     * Must be between 1 and 100, inclusive on both ends.
+     * 
+ * + * int64 node_count = 1; + */ + public long getNodeCount() { + return nodeCount_; + } + /** + * + * + *
+     * Input only. The number of nodes to deploy the model on. A node is an
+     * abstraction of a machine resource, which can handle online prediction QPS
+     * as given in the model's
+     * [node_qps][google.cloud.automl.v1p1beta.ImageClassificationModelMetadata.node_qps].
+     * Must be between 1 and 100, inclusive on both ends.
+     * 
+ * + * int64 node_count = 1; + */ + public Builder setNodeCount(long value) { + + nodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The number of nodes to deploy the model on. A node is an
+     * abstraction of a machine resource, which can handle online prediction QPS
+     * as given in the model's
+     * [node_qps][google.cloud.automl.v1p1beta.ImageClassificationModelMetadata.node_qps].
+     * Must be between 1 and 100, inclusive on both ends.
+     * 
+ * + * int64 node_count = 1; + */ + public Builder clearNodeCount() { + + nodeCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + private static final com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata(); + } + + public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageClassificationModelDeploymentMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageClassificationModelDeploymentMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadataOrBuilder.java new file mode 100644 index 000000000..6736006b3 --- /dev/null +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadataOrBuilder.java @@ -0,0 +1,40 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/automl/v1beta1/image.proto + +package com.google.cloud.automl.v1beta1; + +public interface ImageClassificationModelDeploymentMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Input only. The number of nodes to deploy the model on. A node is an
+   * abstraction of a machine resource, which can handle online prediction QPS
+   * as given in the model's
+   * [node_qps][google.cloud.automl.v1p1beta.ImageClassificationModelMetadata.node_qps].
+   * Must be between 1 and 100, inclusive on both ends.
+   * 
+ * + * int64 node_count = 1; + */ + long getNodeCount(); +} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadata.java index 48db692ce..112d38f6c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto @@ -258,34 +273,38 @@ public com.google.protobuf.ByteString getStopReasonBytes() { * This is the default value. * * `mobile-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have low latency, but may have lower + * prediction quality than other models. * * `mobile-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. * * `mobile-high-accuracy-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have a higher latency, but should + * also have a higher prediction quality than other models. * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have low latency, but may have lower prediction quality + * than other models. * * `mobile-core-ml-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to * providing prediction via AutoML API, can also be exported - * (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. + * (see + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have a higher latency, but should also have a higher + * prediction quality than other models. * * * string model_type = 7; @@ -310,34 +329,38 @@ public java.lang.String getModelType() { * This is the default value. * * `mobile-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have low latency, but may have lower + * prediction quality than other models. * * `mobile-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. * * `mobile-high-accuracy-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have a higher latency, but should + * also have a higher prediction quality than other models. * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have low latency, but may have lower prediction quality + * than other models. * * `mobile-core-ml-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to * providing prediction via AutoML API, can also be exported - * (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. + * (see + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have a higher latency, but should also have a higher + * prediction quality than other models. * * * string model_type = 7; @@ -1059,34 +1082,38 @@ public Builder setStopReasonBytes(com.google.protobuf.ByteString value) { * This is the default value. * * `mobile-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have low latency, but may have lower + * prediction quality than other models. * * `mobile-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. * * `mobile-high-accuracy-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have a higher latency, but should + * also have a higher prediction quality than other models. * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have low latency, but may have lower prediction quality + * than other models. * * `mobile-core-ml-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to * providing prediction via AutoML API, can also be exported - * (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. + * (see + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have a higher latency, but should also have a higher + * prediction quality than other models. * * * string model_type = 7; @@ -1111,34 +1138,38 @@ public java.lang.String getModelType() { * This is the default value. * * `mobile-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have low latency, but may have lower + * prediction quality than other models. * * `mobile-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. * * `mobile-high-accuracy-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have a higher latency, but should + * also have a higher prediction quality than other models. * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have low latency, but may have lower prediction quality + * than other models. * * `mobile-core-ml-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to * providing prediction via AutoML API, can also be exported - * (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. + * (see + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have a higher latency, but should also have a higher + * prediction quality than other models. * * * string model_type = 7; @@ -1163,34 +1194,38 @@ public com.google.protobuf.ByteString getModelTypeBytes() { * This is the default value. * * `mobile-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have low latency, but may have lower + * prediction quality than other models. * * `mobile-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. * * `mobile-high-accuracy-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have a higher latency, but should + * also have a higher prediction quality than other models. * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have low latency, but may have lower prediction quality + * than other models. * * `mobile-core-ml-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to * providing prediction via AutoML API, can also be exported - * (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. + * (see + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have a higher latency, but should also have a higher + * prediction quality than other models. * * * string model_type = 7; @@ -1213,34 +1248,38 @@ public Builder setModelType(java.lang.String value) { * This is the default value. * * `mobile-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have low latency, but may have lower + * prediction quality than other models. * * `mobile-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. * * `mobile-high-accuracy-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have a higher latency, but should + * also have a higher prediction quality than other models. * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have low latency, but may have lower prediction quality + * than other models. * * `mobile-core-ml-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to * providing prediction via AutoML API, can also be exported - * (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. + * (see + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have a higher latency, but should also have a higher + * prediction quality than other models. * * * string model_type = 7; @@ -1260,34 +1299,38 @@ public Builder clearModelType() { * This is the default value. * * `mobile-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have low latency, but may have lower + * prediction quality than other models. * * `mobile-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. * * `mobile-high-accuracy-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have a higher latency, but should + * also have a higher prediction quality than other models. * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have low latency, but may have lower prediction quality + * than other models. * * `mobile-core-ml-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to * providing prediction via AutoML API, can also be exported - * (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. + * (see + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have a higher latency, but should also have a higher + * prediction quality than other models. * * * string model_type = 7; diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadataOrBuilder.java index ba74180f7..920658b4c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto @@ -94,34 +109,38 @@ public interface ImageClassificationModelMetadataOrBuilder * This is the default value. * * `mobile-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have low latency, but may have lower + * prediction quality than other models. * * `mobile-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. * * `mobile-high-accuracy-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have a higher latency, but should + * also have a higher prediction quality than other models. * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have low latency, but may have lower prediction quality + * than other models. * * `mobile-core-ml-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to * providing prediction via AutoML API, can also be exported - * (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. + * (see + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have a higher latency, but should also have a higher + * prediction quality than other models. * * * string model_type = 7; @@ -136,34 +155,38 @@ public interface ImageClassificationModelMetadataOrBuilder * This is the default value. * * `mobile-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have low latency, but - * may have lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have low latency, but may have lower + * prediction quality than other models. * * `mobile-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. * * `mobile-high-accuracy-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - * with TensorFlow afterwards. Expected to have a higher - * latency, but should also have a higher prediction quality - * than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile or edge device with TensorFlow + * afterwards. Expected to have a higher latency, but should + * also have a higher prediction quality than other models. * * `mobile-core-ml-low-latency-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. Expected to have low latency, but may have - * lower prediction quality than other models. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have low latency, but may have lower prediction quality + * than other models. * * `mobile-core-ml-versatile-1` - A model that, in addition to providing * prediction via AutoML API, can also be exported (see - * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - * ML afterwards. + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. * * `mobile-core-ml-high-accuracy-1` - A model that, in addition to * providing prediction via AutoML API, can also be exported - * (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - * Core ML afterwards. Expected to have a higher latency, but - * should also have a higher prediction quality than other - * models. + * (see + * [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + * and used on a mobile device with Core ML afterwards. Expected + * to have a higher latency, but should also have a higher + * prediction quality than other models. * * * string model_type = 7; diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotation.java index f37d49723..20c15628a 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotation.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotation.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotationOrBuilder.java index 216fcf448..d4adaa627 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotationOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotationOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadata.java index 360b6c3f5..66a8013f8 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadataOrBuilder.java index 19e402790..f2397dc4e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetrics.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetrics.java index 9763abd1f..c78090b82 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetrics.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetrics.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetricsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetricsOrBuilder.java index e216f8210..533cfcdac 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetricsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetricsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadata.java index a6d58a4af..e82c27310 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadataOrBuilder.java index db18d4a3f..e59173e22 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadata.java index 9105bb900..f00b7ea4f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadataOrBuilder.java index 5368bca53..75b1b9d54 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageOrBuilder.java index 88505cf84..d99f1d62c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageProto.java index 20b400594..ddca2bd72 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/image.proto @@ -28,6 +43,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -42,11 +61,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\'google/cloud/automl/v1beta1/image.prot" - + "o\022\033google.cloud.automl.v1beta1\0321google/c" - + "loud/automl/v1beta1/annotation_spec.prot" - + "o\0320google/cloud/automl/v1beta1/classific" - + "ation.proto\032\037google/protobuf/timestamp.p" - + "roto\032\034google/api/annotations.proto\"r\n\"Im" + + "o\022\033google.cloud.automl.v1beta1\032\034google/a" + + "pi/annotations.proto\0321google/cloud/autom" + + "l/v1beta1/annotation_spec.proto\0320google/" + + "cloud/automl/v1beta1/classification.prot" + + "o\032\037google/protobuf/timestamp.proto\"r\n\"Im" + "ageClassificationDatasetMetadata\022L\n\023clas" + "sification_type\030\001 \001(\0162/.google.cloud.aut" + "oml.v1beta1.ClassificationType\"%\n#ImageO" @@ -59,13 +78,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ount\030\003 \001(\003\022\020\n\010node_qps\030\004 \001(\001\022\023\n\013stop_rea" + "son\030\005 \001(\t\022%\n\035train_budget_milli_node_hou" + "rs\030\006 \001(\003\022#\n\033train_cost_milli_node_hours\030" - + "\007 \001(\003\"A\n+ImageObjectDetectionModelDeploy" - + "mentMetadata\022\022\n\nnode_count\030\001 \001(\003B\261\001\n\037com" - + ".google.cloud.automl.v1beta1B\nImageProto" - + "P\001ZAgoogle.golang.org/genproto/googleapi" - + "s/cloud/automl/v1beta1;automl\312\002\033Google\\C" - + "loud\\AutoMl\\V1beta1\352\002\036Google::Cloud::Aut" - + "oML::V1beta1b\006proto3" + + "\007 \001(\003\"@\n*ImageClassificationModelDeploym" + + "entMetadata\022\022\n\nnode_count\030\001 \001(\003\"A\n+Image" + + "ObjectDetectionModelDeploymentMetadata\022\022" + + "\n\nnode_count\030\001 \001(\003B\261\001\n\037com.google.cloud." + + "automl.v1beta1B\nImageProtoP\001ZAgoogle.gol" + + "ang.org/genproto/googleapis/cloud/automl" + + "/v1beta1;automl\312\002\033Google\\Cloud\\AutoMl\\V1" + + "beta1\352\002\036Google::Cloud::AutoML::V1beta1b\006" + + "proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -78,10 +99,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass.getDescriptor(), com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), }, assigner); internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_descriptor = @@ -119,18 +140,26 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( "TrainBudgetMilliNodeHours", "TrainCostMilliNodeHours", }); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor = + internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor, + new java.lang.String[] { + "NodeCount", + }); + internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor, new java.lang.String[] { "NodeCount", }); + com.google.api.AnnotationsProto.getDescriptor(); com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass.getDescriptor(); com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadata.java index 171ba077e..f6037f524 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadataOrBuilder.java index 2195a654e..520ac9d88 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequest.java index 53ac8002e..9a600ba7a 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequestOrBuilder.java index a22c4e2a8..e08fd7fe5 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfig.java index 388c873bd..9aa315f19 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfig.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfig.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfigOrBuilder.java index d998798c8..f948288ec 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfigOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfigOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Io.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Io.java index 341da4c87..1dfb14302 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Io.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Io.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequest.java index 38365aec0..0d9ddbc1d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequestOrBuilder.java index 3a0592a09..4307f45b8 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponse.java index 4ac0d5381..2c75f37b6 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponse.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponse.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponseOrBuilder.java index edaa21785..366e9e521 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponseOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequest.java index 42f3d7cf5..fd1cb0389 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequestOrBuilder.java index aa7b8abe8..ac3d251c3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponse.java index 1615cb509..6c9485456 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponse.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponse.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponseOrBuilder.java index a8cf02992..55cc80d44 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponseOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequest.java index d76f31195..6866ecce0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequestOrBuilder.java index 095d28fdb..d3eb46db1 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponse.java index dcb332ebb..0fa85186a 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponse.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponse.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponseOrBuilder.java index cd1d1ac71..5644935f2 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponseOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequest.java index 1bd44d98b..fa8919d38 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequestOrBuilder.java index ee307557b..ec6ff215d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponse.java index 4bd608396..d8bb7176b 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponse.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponse.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponseOrBuilder.java index 1a90866e6..8bec071c1 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponseOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequest.java index 58da1ec33..29f2bf288 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequestOrBuilder.java index 1844ab600..4eb49d9af 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponse.java index 792e3803a..c141e9098 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponse.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponse.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponseOrBuilder.java index 5e35622eb..9f5d44b15 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponseOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/LocationName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/LocationName.java index 902fdc7df..107cf12dc 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/LocationName.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/LocationName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * 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 + * 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. + * 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.automl.v1beta1; diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Model.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Model.java index 142e50dab..13a6916cc 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Model.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Model.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/model.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluation.java index 7b26be1ed..ec517b5e5 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluation.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluation.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/model_evaluation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationName.java index 2e98da1f5..9d69a75b9 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationName.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * 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 + * 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. + * 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.automl.v1beta1; diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOrBuilder.java index 5dd27a691..e5e4f6f8e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/model_evaluation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOuterClass.java index ad8343a29..a6294c5ca 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOuterClass.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOuterClass.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/model_evaluation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java index 9d2eadac8..fe371535d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java index 7b165d2da..6ebabd7aa 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelName.java index f17868ee8..4ba7eef5d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelName.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * 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 + * 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. + * 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.automl.v1beta1; diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOrBuilder.java index ad01b6d6e..14abe3f39 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/model.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOuterClass.java index 8efc04ccf..83bb201c1 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOuterClass.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOuterClass.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/model.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertex.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertex.java index ef46f31ba..c5f558607 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertex.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertex.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/geometry.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertexOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertexOrBuilder.java index ff48ad54b..fa236844d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertexOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertexOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/geometry.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadata.java index 7c7f81e02..0443f8cbf 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadataOrBuilder.java index a410566ac..34f44c678 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Operations.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Operations.java index 79210ef0d..00d7a6458 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Operations.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Operations.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfig.java index 1d7b08fa4..55a02974f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfig.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfig.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfigOrBuilder.java index 7489142f9..947c23de7 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfigOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfigOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/io.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequest.java index 030840858..a08388fe2 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/prediction_service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequestOrBuilder.java index 7f01a9976..33ddb456e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/prediction_service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponse.java index e6e3c0574..f5a2ef581 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponse.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponse.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/prediction_service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponseOrBuilder.java index 517c501d1..cb9209347 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponseOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/prediction_service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceProto.java index 9094cd586..88fc285b9 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/prediction_service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RangesProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RangesProto.java index c458e163d..5c02213b0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RangesProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RangesProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/ranges.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RegressionProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RegressionProto.java index 580cfb040..6c5d2e713 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RegressionProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RegressionProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/regression.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Row.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Row.java index 634765436..8834a96b5 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Row.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Row.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RowOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RowOrBuilder.java index 38ee2c4bb..a12ec8b4d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RowOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RowOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStats.java index f17305698..f3eb2c9e9 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStats.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStats.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStatsOrBuilder.java index d8b106001..088694858 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStatsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStatsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStats.java index b3299518b..248d011d3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStats.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStats.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStatsOrBuilder.java index 7f3a487fd..4902d2f54 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStatsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStatsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructType.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructType.java index 8c11ad3ca..f99278aed 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructType.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructType.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_types.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructTypeOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructTypeOrBuilder.java index 2af3c7ce0..f19e80d99 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructTypeOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructTypeOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_types.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpec.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpec.java index 5b8f98997..0c96f4c9c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpec.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpec.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/table_spec.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java index ef1bfe7d1..af558726e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * 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 + * 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. + * 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.automl.v1beta1; diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOrBuilder.java index 3d7f44e30..2e04bf60a 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/table_spec.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOuterClass.java index e93182b5b..aaaac5c1b 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOuterClass.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOuterClass.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/table_spec.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Tables.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Tables.java index d5688682a..7abaa0f90 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Tables.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Tables.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/tables.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotation.java index 1ab31b5ef..20ab86962 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotation.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotation.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/tables.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotationOrBuilder.java index 432595520..f9c233376 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotationOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotationOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/tables.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadata.java index 9e288cdf7..b157a8034 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/tables.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadataOrBuilder.java index 1e1b2661f..5e7559f5d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/tables.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfo.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfo.java index ba7e9988e..a844f83b1 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfo.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfo.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/tables.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfoOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfoOrBuilder.java index 73f7b8f54..c39d0c618 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfoOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfoOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/tables.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadata.java index ae06625e7..fbcc7334e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/tables.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadataOrBuilder.java index 95dddccc2..a3171c5ed 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/tables.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Temporal.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Temporal.java index d92aef2d6..ac2e37762 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Temporal.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Temporal.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/temporal.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadata.java index ee40a27f5..85a6ef101 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadataOrBuilder.java index c2c9ad442..cc6706ec6 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadata.java index 587fdd95b..1822a0c9c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadataOrBuilder.java index 670bb6be3..9d610c779 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtraction.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtraction.java index 78ea862cd..1dc8e361f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtraction.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtraction.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text_extraction.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotation.java index 11015266d..3cba0f880 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotation.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotation.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text_extraction.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotationOrBuilder.java index e7d42f9c1..09d68a152 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotationOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotationOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text_extraction.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadata.java index 64e30d332..87988b7c1 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadataOrBuilder.java index 6788d811c..b682cefd3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetrics.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetrics.java index 3f6da27ef..f642821d8 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetrics.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetrics.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text_extraction.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetricsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetricsOrBuilder.java index ce9b9f1ce..2adc6ca75 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetricsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetricsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text_extraction.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadata.java index 7e5c1775b..a5458baf3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadataOrBuilder.java index 861b77f93..07e804889 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextProto.java index 0444b942f..46e0e30a0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegment.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegment.java index 5e52261a4..1e171c0fa 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegment.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegment.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text_segment.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentOrBuilder.java index 2f5b02d1d..8fc74d222 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text_segment.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentProto.java index b4ecc3feb..39cbf022e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text_segment.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadata.java index 739cd07ec..b53f40559 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadataOrBuilder.java index 5a9bad487..0ecedf54b 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadata.java index 69d6740d9..21097cb1d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadataOrBuilder.java index 4d10b4c33..8114684bf 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentProto.java index 2d3e95b9b..2f013b30b 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/text_sentiment.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippet.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippet.java index 6a33e6178..4abdcb0db 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippet.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippet.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippetOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippetOrBuilder.java index 786549431..91ffb08d0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippetOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippetOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_items.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegment.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegment.java index f21b44736..ee673c694 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegment.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegment.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/temporal.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegmentOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegmentOrBuilder.java index 0f48a11d5..0ec37eceb 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegmentOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegmentOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/temporal.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStats.java index 8a5f045e3..701141526 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStats.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStats.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStatsOrBuilder.java index fcd5cd3d1..6b50248e3 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStatsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStatsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_stats.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotation.java index 1126a6986..931bf34a2 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotation.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotation.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/translation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotationOrBuilder.java index cf7fa3e4e..531a02e58 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotationOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotationOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/translation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadata.java index 0bcd4893f..27c3d2b2b 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/translation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadataOrBuilder.java index 49f67fa50..250ef0652 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/translation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetrics.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetrics.java index 8cc171058..4fe68068f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetrics.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetrics.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/translation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetricsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetricsOrBuilder.java index b4fb67cf3..8b917823d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetricsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetricsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/translation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadata.java index 29cdf867a..274f7aac0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/translation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadataOrBuilder.java index ec5b9bff8..df606f070 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/translation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationProto.java index 305384fd3..6a10e47be 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/translation.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TypeCode.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TypeCode.java index 7b0669235..aab67a260 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TypeCode.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TypeCode.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/data_types.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadata.java index 6a2e71a67..e80e44a78 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadataOrBuilder.java index a1f099c32..a27eabbfc 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/operations.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequest.java index 56b66a4d8..22b7fc5d0 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequestOrBuilder.java index fa7526757..c5ea1e14f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequest.java index e70e7e094..963dbce3f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequestOrBuilder.java index 9b0e3c3d1..6a19fa406 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequest.java index 2f00aea2c..f5b489911 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequestOrBuilder.java index 6f359da94..b0ce4e88e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequest.java index f4255ed83..5c9c42427 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequest.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequestOrBuilder.java index bdb4c129e..9237a821d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequestOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/service.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadata.java index d450d5e6c..d9aee1a2d 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/video.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadataOrBuilder.java index 73ec80d95..baac0088f 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/video.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadata.java index 89adaca50..7931bdd4e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/video.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadataOrBuilder.java index e116c93da..cc54f0088 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/video.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotation.java index 80d66232b..d298498a9 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotation.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotation.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java index bbe88e381..b4f48f705 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadata.java index 5d5882c33..081bd741c 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/video.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadataOrBuilder.java index 9afbc061b..360c7bf53 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/video.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetrics.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetrics.java index 9c3211a8f..fafb250be 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetrics.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetrics.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetricsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetricsOrBuilder.java index 9651cb2d9..2b36b78a6 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetricsOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetricsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/detection.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadata.java index 1efd7e426..126fb7ec1 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadata.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadata.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/video.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadataOrBuilder.java index 9e3d45903..2da7b7da4 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadataOrBuilder.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadataOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/video.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoProto.java index e88e9c902..49068a224 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoProto.java +++ b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoProto.java @@ -1,3 +1,18 @@ +/* + * 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. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/automl/v1beta1/video.proto diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/image.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/image.proto index 241d11ebe..61e48d12e 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/image.proto +++ b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/image.proto @@ -17,10 +17,10 @@ syntax = "proto3"; package google.cloud.automl.v1beta1; +import "google/api/annotations.proto"; import "google/cloud/automl/v1beta1/annotation_spec.proto"; import "google/cloud/automl/v1beta1/classification.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; option java_multiple_files = true; @@ -36,9 +36,7 @@ message ImageClassificationDatasetMetadata { } // Dataset metadata specific to image object detection. -message ImageObjectDetectionDatasetMetadata { - -} +message ImageObjectDetectionDatasetMetadata {} // Model metadata for image classification. message ImageClassificationModelMetadata { @@ -67,34 +65,38 @@ message ImageClassificationModelMetadata { // This is the default value. // * `mobile-low-latency-1` - A model that, in addition to providing // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - // with TensorFlow afterwards. Expected to have low latency, but - // may have lower prediction quality than other models. + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + // and used on a mobile or edge device with TensorFlow + // afterwards. Expected to have low latency, but may have lower + // prediction quality than other models. // * `mobile-versatile-1` - A model that, in addition to providing // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - // with TensorFlow afterwards. + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + // and used on a mobile or edge device with TensorFlow + // afterwards. // * `mobile-high-accuracy-1` - A model that, in addition to providing // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - // with TensorFlow afterwards. Expected to have a higher - // latency, but should also have a higher prediction quality - // than other models. + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + // and used on a mobile or edge device with TensorFlow + // afterwards. Expected to have a higher latency, but should + // also have a higher prediction quality than other models. // * `mobile-core-ml-low-latency-1` - A model that, in addition to providing // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - // ML afterwards. Expected to have low latency, but may have - // lower prediction quality than other models. + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + // and used on a mobile device with Core ML afterwards. Expected + // to have low latency, but may have lower prediction quality + // than other models. // * `mobile-core-ml-versatile-1` - A model that, in addition to providing // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - // ML afterwards. + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + // and used on a mobile device with Core ML afterwards. // * `mobile-core-ml-high-accuracy-1` - A model that, in addition to // providing prediction via AutoML API, can also be exported - // (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - // Core ML afterwards. Expected to have a higher latency, but - // should also have a higher prediction quality than other - // models. + // (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) + // and used on a mobile device with Core ML afterwards. Expected + // to have a higher latency, but should also have a higher + // prediction quality than other models. string model_type = 7; } @@ -146,6 +148,16 @@ message ImageObjectDetectionModelMetadata { int64 train_cost_milli_node_hours = 7; } +// Model deployment metadata specific to Image Classification. +message ImageClassificationModelDeploymentMetadata { + // Input only. The number of nodes to deploy the model on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the model's + // [node_qps][google.cloud.automl.v1p1beta.ImageClassificationModelMetadata.node_qps]. + // Must be between 1 and 100, inclusive on both ends. + int64 node_count = 1; +} + // Model deployment metadata specific to Image Object Detection. message ImageObjectDetectionModelDeploymentMetadata { // Input only. The number of nodes to deploy the model on. A node is an diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/service.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/service.proto index 660d42b52..d05ac4ad6 100644 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/service.proto +++ b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/service.proto @@ -549,6 +549,8 @@ message DeployModelRequest { oneof model_deployment_metadata { // Model deployment metadata specific to Image Object Detection. ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; + // Model deployment metadata specific to Image Classification. + ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; } // Resource name of the model to deploy. diff --git a/renovate.json b/renovate.json new file mode 100644 index 000000000..dae8a245c --- /dev/null +++ b/renovate.json @@ -0,0 +1,31 @@ +{ + "extends": [ + "config:base" + ], + "ignoreDeps": [], + "packageRules": [ + { + "packagePatterns": ["*"], + "semanticCommitType": "chore" + }, + { + "depTypeList": [ + "dependencies" + ], + "semanticCommitType": "deps" + }, + { + "packagePatterns": ["^io.grpc:grpc-"], + "groupName": "gRPC packages" + }, + { + "packagePatterns": ["^com.google.protobuf:protobuf-"], + "groupName": "Protobuf packages" + }, + { + "packagePatterns": ["^io.opencensus:opencensus-"], + "groupName": "OpenCensus packages" + } + ], + "semanticCommits": true +} diff --git a/synth.metadata b/synth.metadata new file mode 100644 index 000000000..c44847a8d --- /dev/null +++ b/synth.metadata @@ -0,0 +1,49 @@ +{ + "updateTime": "2019-09-30T21:08:44.463643Z", + "sources": [ + { + "generator": { + "name": "artman", + "version": "0.37.1", + "dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "6e012ef87570a258933df38c7d89732f196780cb", + "internalRef": "272026449" + } + }, + { + "template": { + "name": "java_library", + "origin": "synthtool.gcp", + "version": "2019.5.2" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "automl", + "apiVersion": "v1beta1", + "language": "java", + "generator": "gapic", + "config": "google/cloud/automl/artman_automl_v1beta1.yaml" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "automl", + "apiVersion": "v1", + "language": "java", + "generator": "gapic", + "config": "google/cloud/automl/artman_automl_v1.yaml" + } + } + ] +} \ No newline at end of file diff --git a/google-cloud-automl/synth.py b/synth.py similarity index 63% rename from google-cloud-automl/synth.py rename to synth.py index a82be2252..d1147c559 100644 --- a/google-cloud-automl/synth.py +++ b/synth.py @@ -21,7 +21,7 @@ gapic = gcp.GAPICGenerator() service = 'automl' -versions = ['v1beta1'] +versions = ['v1beta1', 'v1'] config_pattern = '/google/cloud/automl/artman_automl_{version}.yaml' for version in versions: @@ -31,10 +31,21 @@ config_path=config_pattern.format(version=version), artman_output_name='') - s.copy(library / f'gapic-google-cloud-{service}-{version}/src', 'src') - s.copy(library / f'grpc-google-cloud-{service}-{version}/src', f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') - s.copy(library / f'proto-google-cloud-{service}-{version}/src', f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') + package_name = f'com.google.cloud.{service}.{version}' + java.fix_proto_headers(library / f'proto-google-cloud-{service}-{version}') + java.fix_grpc_headers(library / f'grpc-google-cloud-{service}-{version}', package_name) - java.format_code('./src') - java.format_code(f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') - java.format_code(f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') + s.copy(library / f'gapic-google-cloud-{service}-{version}/src', f'google-cloud-{service}/src') + s.copy(library / f'grpc-google-cloud-{service}-{version}/src', f'grpc-google-cloud-{service}-{version}/src') + s.copy(library / f'proto-google-cloud-{service}-{version}/src', f'proto-google-cloud-{service}-{version}/src') + + java.format_code(f'google-cloud-{service}/src') + java.format_code(f'grpc-google-cloud-{service}-{version}/src') + java.format_code(f'proto-google-cloud-{service}-{version}/src') + +common_templates = gcp.CommonTemplates() +templates = common_templates.java_library() +s.copy(templates, excludes=[ + '.gitignore', + 'README.md', +]) \ No newline at end of file diff --git a/versions.txt b/versions.txt new file mode 100644 index 000000000..7f54e59b9 --- /dev/null +++ b/versions.txt @@ -0,0 +1,8 @@ +# Format: +# module:released-version:current-version + +proto-google-cloud-automl-v1beta1:0.77.0:0.77.0 +proto-google-cloud-automl-v1:0.77.0:0.77.0 +grpc-google-cloud-automl-v1beta1:0.77.0:0.77.0 +grpc-google-cloud-automl-v1:0.77.0:0.77.0 +google-cloud-automl:0.111.1-beta-SNAPSHOT:0.111.1-beta-SNAPSHOT \ No newline at end of file